Skip to content

gh-156466: fix cleanup on error in codegen_class_body - #156507

Merged
iritkatriel merged 2 commits into
python:mainfrom
iritkatriel:gh-156466-5
Aug 28, 2026
Merged

gh-156466: fix cleanup on error in codegen_class_body#156507
iritkatriel merged 2 commits into
python:mainfrom
iritkatriel:gh-156466-5

Conversation

@iritkatriel

@iritkatriel iritkatriel commented Aug 28, 2026

Copy link
Copy Markdown
Member

Alternatively, we could extract all the in-scope stuff into a helper function and use the normal macros.

@iritkatriel iritkatriel added skip news needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 28, 2026
@iritkatriel
iritkatriel enabled auto-merge (squash) August 28, 2026 20:27
@iritkatriel
iritkatriel merged commit 683ef40 into python:main Aug 28, 2026
51 checks passed
@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

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

bedevere-app Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 28, 2026
iritkatriel added a commit that referenced this pull request Aug 28, 2026
…) (#156536)

gh-156466: fix cleanup on error in codegen_class_body (GH-156507)
(cherry picked from commit 683ef40)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot s390x Fedora Stable Refleaks 3.14 (tier-3) has failed when building commit 28b944c.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1776/builds/1423) and take a look at the build logs.
  4. Check if the failure is related to this commit (28b944c) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1776/builds/1423

Failed tests:

  • test_external_inspection

Failed subtests:

  • test_only_active_thread - test.test_external_inspection.TestGetStackTrace.test_only_active_thread

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "/var/lib/buildbot/worker/cstratak-fedora-stable-s390x/3.14.cstratak-fedora-stable-s390x.refleak/build/Lib/test/test_external_inspection.py", line 1289, in test_only_active_thread
    self.assertEqual(
    ~~~~~~~~~~~~~~~~^
        len(gil_traces), 1, "Should have exactly one GIL holder"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 != 1 : Should have exactly one GIL holder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants