GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-155146: Do not depend on the exact number of allocations in test_class by serhiy-storchaka · Pull Request #155150 · python/cpython

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Aug 4, 2026

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.

  • Issue: test_detach_materialized_dict_no_memory depends on the exact number of allocations #155146

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@serhiy-storchaka @claude
pythongh-155146: Do not depend on the exact number of allocations in …
5c32138
…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) <[email protected]>
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Aug 4, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Aug 4, 2026
test_detach_materialized_dict_no_memory depends on the exact number of allocations #155146
Closed
@serhiy-storchaka serhiy-storchaka added the skip news label Aug 4, 2026
@serhiy-storchaka serhiy-storchaka mentioned this pull request Aug 4, 2026
gh-155109: Run tests exhausting the C stack with a limited C stack #155120
Merged
@serhiy-storchaka 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 bugs and security fixes labels Aug 4, 2026
@serhiy-storchaka
serhiy-storchaka merged commit 416c346 into python:main Aug 4, 2026
59 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@miss-islington-app

miss-islington-app Bot commented Aug 4, 2026

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.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting core review label Aug 4, 2026
@bedevere-app

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app 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
@miss-islington @serhiy-storchaka @claude
[3.13] gh-155146: Do not depend on the exact number of allocations in…
42b23da
… 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 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
serhiy-storchaka added a commit that referenced this pull request Aug 4, 2026
@miss-islington @serhiy-storchaka @claude
[3.14] gh-155146: Do not depend on the exact number of allocations in…
12ac1ed
… 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 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This was referenced Aug 4, 2026
gh-154387: validate PyStructSequence_Desc field invariants #154684
Open
gh-154387: fix structseq_repr by labeling unnamed fields in repr as <unnamed@N> #154687
Open
deadlovelll pushed a commit to deadlovelll/cpython that referenced this pull request Aug 5, 2026
@miss-islington @serhiy-storchaka
@claude @deadlovelll
[3.14] pythongh-155146: Do not depend on the exact number of allocati…
6163e33
…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 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
hugovk pushed a commit that referenced this pull request Aug 8, 2026
@miss-islington @serhiy-storchaka @claude
[3.15] gh-155146: Do not depend on the exact number of allocations in…
6c406a4
… 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 <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
mbeijen pushed a commit to mbeijen/cpython that referenced this pull request Aug 14, 2026
@serhiy-storchaka @claude @mbeijen
pythongh-155146: Do not depend on the exact number of allocations in …
198a4fe
…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) <[email protected]>
@serhiy-storchaka
serhiy-storchaka deleted the gh-155146-nomemory-alloc-index branch August 27, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@serhiy-storchaka
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.