Closed dependabot[bot] closed 1 month ago
Not sure what the issue is with Ubuntu + Python3.13, but I'm hoping it's a temporary issue. Skipping this pytest update in the hope the next minor fixes it.
@dependabot ignore this minor version
OK, I won't notify you about version 8.2.x again, unless you re-open this PR.
FWIW, I played around with pytest 8.2.0 a bit.
First, the test that triggers the error is different as well as the traceback....but still consistent.
Second, if I use the command below to run the tests....the error doesn't happen...
tox -e py-cov --installpkg dist/briefcase-*.whl -- -vv --color yes \
tests/bootstraps/ \
tests/commands/ \
tests/config/ \
tests/console/ \
tests/integrations/ \
tests/platforms/ \
tests/test_cmdline.py \
tests/test_mainline.py
but running tox -e py-cov --installpkg dist/briefcase-*.whl -- -vv --color yes tests/
still fails...
At any rate, I'm not really any closer to understanding the issue...
Another thought came to to mind....what if I run tox -e py
instead of tox -e py-cov
?
Well, turning off coverage for the tests removed the error in CI....
One of the causes of a PytestUnraisableExceptionWarning
is a thread exiting with an exception....maybe coverage.py
is doing something weird and that's triggering pytest
....albeit only in CI...
Ok - that's an interesting data point. Coverage does involve opening files, and there's a binary module implementing some of that, so it's at least conceivable that there is some weird interaction going on here.
Because I can't help myself.....I've tracked this down a little further.
With a bit of debug code, I've confirmed that the ResourceWarning
for /dev/null
is, in fact, the "unraiseable exception"....however, it is not for Briefcase's file handle for /dev/null
.
Adding an audit hook for opening /dev/null
, I see it opened a few times....notably by coverage.py
.
As another twist, this only happens when pytest-xdist==3.6.1
is installed; it doesn't happen for pytest-xdist==3.5.0
. The primary change for 3.6.1 was ensuring workers run tests in the main thread by updating the execution model of the workers.
So....the coverage.py
file handle for /dev/null
is getting in to a forked process from pytest-xdist
and when that process exits....a ResourceWarning
is getting thrown.....idk....a lotta speculation here...
@dependabot reopen
Superseded by #1817.
Bumps pytest from 8.1.1 to 8.2.0.
Release notes
Sourced from pytest's releases.
... (truncated)
Commits
6bd3f31
Tweak changelog for 8.2.09b6219b
Prepare release version 8.2.0835765c
Merge pull request #12130 from bluetech/fixtures-inline7e7503c
unittest: report class cleanup exceptions (#12250)882c4da
fixtures: inlinefail_fixturefunc
2e8fb9f
fixtures: extract a_check_fixturedef
methodacf2971
fixtures: inline_getnextfixturedef
into_get_active_fixturedef
3c77aec
fixtures: move "request" check earlyd217d68
fixtures: inline_compute_fixture_value
530be28
fixtures: use early return in_get_active_fixturedef
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show