Skip to content

Conversation

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 8, 2025

This converts functions, code, str, bytes, bytearray, and memoryview objects to PyCodeObject,
and ensure that the object looks like a script. That means no args, no return, and no closure.
_PyCode_GetPureScriptXIData() takes it a step further and ensures there are no globals.

We also add _PyObject_SupportedAsScript() to the internal C-API.
(cherry picked from commit c81fa2b)

Co-authored-by: Eric Snow [email protected]

This converts functions, code, str, bytes, bytearray, and memoryview objects to PyCodeObject,
and ensure that the object looks like a script.  That means no args, no return, and no closure.
_PyCode_GetPureScriptXIData() takes it a step further and ensures there are no globals.

We also add _PyObject_SupportedAsScript() to the internal C-API.
(cherry picked from commit c81fa2b)

Co-authored-by: Eric Snow <[email protected]>
@ericsnowcurrently ericsnowcurrently merged commit 1059548 into python:3.14 May 8, 2025
44 checks passed
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.

2 participants