You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New API functions should take a "context" as a first argument -- similar to PyThreadState * that a lot of current internal API takes, except opaque.
In the future, this should allow:
hopefully, a regular function argument will be easier to handle for future exotic platforms (the next Wasm)
run-time flag to enable debug checks (with a HPy-style function table)
prviding a limited context for destructors (so they can't run arbitrary Python code)
Functions that don't take a context argument should those that are safe to use before Python is initialized. (These e.g. PyStatus rather than exception objects for error handling.)
Current API that doesn't do this will need to call PyThreadState_Get before calling the new API.
The text was updated successfully, but these errors were encountered:
New API functions should take a "context" as a first argument -- similar to
PyThreadState *
that a lot of current internal API takes, except opaque.In the future, this should allow:
Functions that don't take a context argument should those that are safe to use before Python is initialized. (These e.g.
PyStatus
rather than exception objects for error handling.)Current API that doesn't do this will need to call
PyThreadState_Get
before calling the new API.The text was updated successfully, but these errors were encountered: