Repository navigation
fix(tests): let collect_until run a second collection - #2482
Merged
Merged
Conversation
Owner
Author
|
NEEDS CHANGES (Sonnet,
|
JarryShaw
force-pushed
the
fix/2481-pypy-finaliser-backstop
branch
from
October 31, 2026 02:04
7025040 to
1780a9b
Compare
Owner
Author
|
NEEDS CHANGES (Sonnet,
|
JarryShaw
force-pushed
the
fix/2481-pypy-finaliser-backstop
branch
from
October 31, 2026 02:17
1780a9b to
e78e54b
Compare
Owner
Author
|
NEEDS CHANGES (Sonnet,
|
collect_until ended on the first collection once its grace ran out. PyPy 7.3.19 ran an abandoned extractor's finaliser only after a second collection, so a slow first collection may have left the handle reported as still open (#2481). The cause is unverified; the fix matches the observed two-collection behaviour on PyPy. With a grace, collect_until cannot give up before MIN_COLLECTIONS_WITH_GRACE (2) collections. grace=0 is unchanged, as the existing helper test pins it. Adds a fake-clock test that fails without the floor. Refs #2481
JarryShaw
force-pushed
the
fix/2481-pypy-finaliser-backstop
branch
from
October 31, 2026 02:33
e78e54b to
1b34f0c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make pylint,make mypy,make isort)isort -l100 -ppcapkit --check-only tests/_support.pyflags the import block; left as is.make testpasses, and a test case covers the changetests/foundation/test_extraction_ownership.pywas run;make testwas not.docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visibleWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
collect_untilended on the first collection once its grace ran out. PyPy 7.3.19 ran an abandoned extractor's finaliser only after a second collection (observed), so a slow first collection may have left the handle reported as still open (#2481). The cause is unverified; the fix matches the observed two-collection behaviour on PyPy. With a grace,collect_untilcannot give up beforeMIN_COLLECTIONS_WITH_GRACE(2) collections.grace=0is unchanged, as its existing test pins it.Regression test: fake clock, each collection costs 2 s against a 1 s grace. It fails with the floor set to 1 and passes at 2.
Verified:
tests/foundation/test_extraction_ownership.py20/20 on CPython 3.14 and PyPy 3.10 (7.3.19). The CI failure did not reproduce in isolation, so the full-suite cause is UNVERIFIED.Refs #2481