Closed
Description
Crash report
What happened?
If you use any list comprehension inside a subinterpreter (either through _interpreters
or through interpreters
), an assertion fails in _PyCode_CheckNoExternalState
:
import _interpreters
interp = _interpreters.create()
_interpreters.run_string(interp, "[None for _ in []]")
python: Objects/codeobject.c:1982: _PyCode_CheckNoExternalState: Assertion `counts->locals.hidden.total == 0' failed.
This was originally causing failures in #134606. I think that assertion can be removed, because _PyCode_CheckNoExternalState
seems to have no need for the number of hidden locals being zero.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done