]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-135450: Remove assertion in `_PyCode_CheckNoExternalState` (gh-135694)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 18 Jun 2025 23:57:18 +0000 (01:57 +0200)
committerGitHub <noreply@github.com>
Wed, 18 Jun 2025 23:57:18 +0000 (23:57 +0000)
commitc03f94e7fe2fe96827ed96ce78aed0fc88fb8358
tree19473be51a2330ccd64b0877bd5df028feb6596c
parent47ee2aedf11fe6fb274dfc2bfc9ac51136f6113c
[3.14] gh-135450: Remove assertion in `_PyCode_CheckNoExternalState` (gh-135694)

The assertion reflected a misunderstanding of situations where "hidden" variables might exist,
namely generator expressions and comprehensions.

(cherry picked from commit 15f2bac02c5e, AKA gh-135466)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Lib/test/test_interpreters/test_api.py
Objects/codeobject.c