Skip to content

[3.14] gh-155146: Do not depend on the exact number of allocations in test_class (GH-155150) - #155156

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-416c346-3.14
Aug 4, 2026
Merged

[3.14] gh-155146: Do not depend on the exact number of allocations in test_class (GH-155150)#155156
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-416c346-3.14

Conversation

@miss-islington

@miss-islingtonmiss-islington commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Try to fail every one of the first allocations and accept the first one which
fails in the code detaching the instance dictionary from the object, instead
of assuming that this is the first allocation after set_nomemory().

Run the test with the test.support.isolation.runInSubprocess() decorator
instead of executing it as a source string in a subprocess.
(cherry picked from commit 416c346)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: Claude Opus 5 (1M context) noreply@anthropic.com

…test_class (pythonGH-155150)
Try to fail every one of the first allocations and accept the first one which
fails in the code detaching the instance dictionary from the object, instead
of assuming that this is the first allocation after set_nomemory().
Run the test with the test.support.isolation.runInSubprocess() decorator
instead of executing it as a source string in a subprocess.
(cherry picked from commit 416c346)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
@bedevere-appbedevere-appBot added tests Tests in the Lib/test dir skip news labels Aug 4, 2026
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) August 4, 2026 08:51
@serhiy-storchaka
serhiy-storchaka merged commit 12ac1ed into python:3.14Aug 4, 2026
52 checks passed
@miss-islington
miss-islington deleted the backport-416c346-3.14 branch August 4, 2026 09:16
deadlovelll pushed a commit to deadlovelll/cpython that referenced this pull request Aug 5, 2026
…ons in test_class (pythonGH-155150) (pythonGH-155156)
Try to fail every one of the first allocations and accept the first one which
fails in the code detaching the instance dictionary from the object, instead
of assuming that this is the first allocation after set_nomemory().
Run the test with the test.support.isolation.runInSubprocess() decorator
instead of executing it as a source string in a subprocess.
(cherry picked from commit 416c346)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@miss-islington@serhiy-storchaka