Mark Shannon <m...@hotpy.org> added the comment:

Victor,
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?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38500>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to