Skip to content

Conversation

@DinoV
Copy link
Contributor

@DinoV DinoV commented Jan 7, 2026

This just moves the checks to see if PEP-523 is replaced to a common macro in the interpreter loop.

This will allow PEP 523 users who re-generate the interpreter loop (as in #142911) to redefine the macro to support their replacement with the optimizer as well if they so choose. And it makes it more explicit what these checks are doing when they're randomly sprinkled around.

@DinoV DinoV marked this pull request as ready for review January 7, 2026 21:25
@DinoV DinoV requested a review from markshannon as a code owner January 7, 2026 21:25
@DinoV DinoV merged commit bfc3d8d into python:main Jan 7, 2026
76 checks passed
meta-codesync bot pushed a commit to facebookincubator/cinderx that referenced this pull request Jan 8, 2026
Summary:
On yesterday imports we hit some issues with one of the opcodes we've duplicated. We duplicated it so that we could support optimized python -> python calls when we have our eval hook in place.

I landed python/cpython#143532 yesterday which makes it possible for us to just redefine the `IS_PEP523_HOOKED` macro. This macro conveniently already defined in our copy of `ceval_macros.h` so the upgrade to consume this is just deleting our overloaded opcodes and picking up the base ones.

Reviewed By: jbower-fb

Differential Revision: D90279669

fbshipit-source-id: ecc4d87981554aa5a5bf9f27519622cf17cfe2ed
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