FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-155146: Do not depend on the exact number of allocations in test_class by serhiy-storchaka · Pull Request #155150 · python/cpython · GitHub

Repository navigation

gh-155146: Do not depend on the exact number of allocations in test_class - #155150

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-155146-nomemory-alloc-index
Aug 4, 2026
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:gh-155146-nomemory-alloc-index

Conversation

Copy link
Copy Markdown
Member

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().

Also run the test with the test.support.isolation.runInSubprocess() decorator instead of executing it as a source string in a subprocess.

…test_class

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.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Aug 4, 2026
serhiy-storchaka added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 4, 2026
serhiy-storchaka merged commit 416c346 into python:main Aug 4, 2026
59 checks passed

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

bedevere-app Bot commented Aug 4, 2026

Copy link
Copy Markdown

GH-155155 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 4, 2026

bedevere-app Bot commented Aug 4, 2026

Copy link
Copy Markdown

GH-155156 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 4, 2026

bedevere-app Bot commented Aug 4, 2026

Copy link
Copy Markdown

GH-155157 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Aug 4, 2026
serhiy-storchaka added a commit that referenced this pull request Aug 4, 2026
… test_class (GH-155150) (GH-155157)

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>
serhiy-storchaka added a commit that referenced this pull request Aug 4, 2026
… test_class (GH-155150) (GH-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>
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>
hugovk pushed a commit that referenced this pull request Aug 8, 2026
… test_class (GH-155150) (#155155)

gh-155146: Do not depend on the exact number of allocations in test_class (GH-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>
mbeijen pushed a commit to mbeijen/cpython that referenced this pull request Aug 14, 2026
…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.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
serhiy-storchaka deleted the gh-155146-nomemory-alloc-index branch August 27, 2026 12:35
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

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL