Author Mark.Shannon
Recipients Mark.Shannon, brett.cannon, dino.viehland, eric.snow, fabioz, vstinner
Date 2019-11-07.16:02:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I don't think this is a regression.
`PyThreadState` is an internal opaque data structure, which means we are free to change it.
That the `eval_frame` is hard to access is a feature not a bug, as it discourages misuse and enables us to remove it easily, when a better approach becomes available.

PEP 523 is quite vague, but the rationale indicates that exposing `eval_frame` is for "a method-level JIT". PEP 523 did not suggest adding an API. If it had (and I had had the time) I would have opposed it more vigorously.

IMO, the correct way to change the code object is to set `function.__code__` which can be done easily from either Python or C code.

@Fabioz, is there anything preventing you from doing that?
Date User Action Args
2019-11-07 16:02:10Mark.Shannonsetrecipients: + Mark.Shannon, brett.cannon, vstinner, fabioz, dino.viehland, eric.snow
2019-11-07 16:02:10Mark.Shannonsetmessageid: <>
2019-11-07 16:02:10Mark.Shannonlinkissue38500 messages
2019-11-07 16:02:10Mark.Shannoncreate