summaryrefslogtreecommitdiffstats
path: root/Lib/test/_code_definitions.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-135437: Account For Duplicate Names in _PyCode_SetUnboundVarCounts() ↵Eric Snow2025-06-131-0/+10
| | | | (gh-135438)
* gh-132775: Expand the Capability of Interpreter.call() (gh-133484)Eric Snow2025-05-301-0/+20
| | | It now supports most callables, full args, and return values.
* gh-132775: Add _PyCode_GetScriptXIData() (gh-133480)Eric Snow2025-05-081-0/+53
| | | | | | | 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.
* gh-132775: Unrevert "Add _PyCode_VerifyStateless()" (gh-133528)Eric Snow2025-05-081-0/+26
| | | | | | | | This reverts commit 3c73cf5 (gh-133497), which itself reverted the original commit d270bb5 (gh-133221). We reverted the original change due to failing android tests. The checks in _PyCode_CheckNoInternalState() were too strict, so we've relaxed them.
* gh-132775: Revert "gh-132775: Add _PyCode_VerifyStateless() (gh-133221)" ↵Petr Viktorin2025-05-061-26/+0
| | | | (#133497)
* gh-132775: Add _PyCode_GetXIData() (gh-133475)Eric Snow2025-05-051-0/+14
|
* gh-132775: Add _PyCode_VerifyStateless() (gh-133221)Eric Snow2025-05-051-0/+63
| | | | | | | | "Stateless" code is a function or code object which does not rely on external state or internal state. It may rely on arguments and builtins, but not globals or a closure. I've left a comment in pycore_code.h that provides more detail. We also add _PyFunction_VerifyStateless(). The new functions will be used in several later changes that facilitate "sharing" functions and code objects between interpreters.
* gh-87859: Track Code Object Local Kinds For Arguments (gh-132980)Eric Snow2025-04-291-0/+163
Doing this was always the intention. I was finally motivated to find the time to do it. See #87859 (comment).