
On Mon, Feb 1, 2021 at 3:41 PM Victor Stinner <vstinner@python.org> wrote:
- Create
abi4
, a new, incompatible version of the stable ABI, which doesn't include deprecated stuff. Create a flag to mark extension modules that use it.- Make it possible to create subinterpreters with a separate GIL. These can only load
abi4
extension modules.Step 4 introduces a backward incompatible change without much benefit :-)
Step 5 will only be safe once all static types will be removed, which is an incompatible change.
(...)
?. In Python 4.0, drop
abi3
.I don't see how you can run interpreters in parallel if static types are still in use. In my experience, it immediately crash on various ways: https://bugs.python.org/issue40512#msg383830
Ah I forgot to mention that removing static types from the C API is not enough to run multiple interpreters in parallel. Removing static types would be an incompatible changes with no benefit in the short term. It's the same for the PEP 620.
Other incompatible changes are required. For example, reject imports of extensions which don't implement PEP 489 multi-phase initialization API.
See https://bugs.python.org/issue40512 "Meta issue: per-interpreter GIL" for the current status and future required changes.
I also wrote an article about this project progress and what should be done next: https://vstinner.github.io/isolate-subinterpreters.html
Victor
Night gathers, and now my watch begins. It shall not end until my death.