-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
Description
Feature or enhancement
Previously, you could access the co_code field in PyCodeObject directly to access the bytecode. This is no longer the case since 2bde682. Currently in 3.11a7+, C code cannot easily obtain the equivalent of co_code in 3.10. co_code_adaptive gets quickened bytecode which is not equivalent to the 3.10 behavior.
I would imagine many tools relying on the old behavior will break.
Pitch
I propose we expose some form of the currently internal _PyCode_GetCode.
Previous discussion
Related to #91397.
See also coverage.py issue nedbat/coveragepy#1367
corona10