Le ven. 24 mai 2019 à 18:14, Steve Dower <steve.dower@python.org> a écrit :
On 24May2019 0825, Victor Stinner wrote:
I started to modify Python **internals** to pass "runtime" and "tstate" in core files: pystate.c, ceval.c, pyerrors.c, signalmodule.c, pylifecycle.c, coreconfig.c, gcmodule.c, ...
This is why some of us have been advocating for a new structure - "PyContext" or similar - that can contain the information needed.
What do you plan to put in such PyContext?
Though I see you've gone ahead and modified the APIs already without waiting for discussion or review, so I guess this is how CPython works now *shrug*
Well, we had a discussion at Pycon and we agreed to add new parameters to pass a "context". But we didn't define how the context would look like. We also agreed to not touch the public API, only internals. As soon as it's internal, we are free to modify whenever.
I went ahead to "discover" through the code what we need. So far, it seems like "it depends" :-) Each function has different needs.
Victor
Night gathers, and now my watch begins. It shall not end until my death.