FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-132775: Add _PyCode_GetScriptXIData() by ericsnowcurrently · Pull Request #133480 · python/cpython · GitHub

/ cpython Public

gh-132775: Add _PyCode_GetScriptXIData() - #133480

Merged
ericsnowcurrently merged 6 commits into
python:mainfrom
ericsnowcurrently:add-pycode-getscriptxidata
May 8, 2025
Merged

gh-132775: Add _PyCode_GetScriptXIData()#133480
ericsnowcurrently merged 6 commits into
python:mainfrom
ericsnowcurrently:add-pycode-getscriptxidata

Conversation

ericsnowcurrently commented May 5, 2025
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

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.

ericsnowcurrently enabled auto-merge (squash) May 8, 2025 14:42
ericsnowcurrently added the needs backport to 3.14 bugs and security fixes label May 8, 2025
ericsnowcurrently merged commit c81fa2b into python:main May 8, 2025

Copy link
Copy Markdown

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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 <ericsnowcurrently@gmail.com>

bedevere-app Bot commented May 8, 2025

Copy link
Copy Markdown

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

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 8, 2025
ericsnowcurrently deleted the add-pycode-getscriptxidata branch May 8, 2025 16:04
ericsnowcurrently added a commit that referenced this pull request 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, AKA gh-133480)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 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.
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL