See PEP 687.
Currently most stdlib extension have been ported to multi-phase init. There are still a number of them to be ported, almost entirely non-builtin modules. Also, some that have already been ported still have global state that needs to be fixed.
(This is part of the effort to finish isolating multiple interpreters from each other. See gh-100227.)
High-Level Info
How to isolate modules: https://docs.python.org/3/howto/isolating-extensions.html (AKA PEP 630).
The full list of modules that need porting can be found with: ...
The full list of remaining (unsupported) global variables is:
A full analysis of the modules may be found at the bottom of this post.
(other info)
Previous Work
Related Links
TODO
Here is the list of modules that need attention, in a rough, best-effort priority order. Additional details (e.g. if there is an issue and/or PR) is found in the analysis table at the bottom.
- builtins (high priority)
- essential (higher priority)
- non-essential (lower priority)
The above does not include test modules. They don't need to be ported/isolated (except for a few which already have been).
Modules Analysis
| module |
builtin |
Windows |
PEP 594 |
issue |
PR |
ported |
# static types |
# other global objects |
# other globals |
| _asyncio |
|
|
|
|
|
yes |
|
2 |
|
| _collections |
X |
|
|
(???) |
(branch) |
yes |
7 |
|
|
| _ctypes |
|
|
|
|
|
**NO** |
37 |
6 |
4 |
| _curses |
|
|
|
|
|
**NO** |
1 |
2 |
4 |
| _curses_panel |
|
|
|
|
|
yes |
|
|
1 |
| _datetime |
|
|
|
gh-71587 |
gh-102995 |
**NO** |
7 |
10 |
1 |
| _decimal |
|
|
|
|
|
**NO** |
4 |
10 |
6 |
| _elementtree |
|
|
|
|
|
yes |
|
|
1 |
| _io |
X |
|
|
gh-101819 |
gh-101520 |
**NO** |
5 |
|
|
| _lsprof |
|
|
|
|
|
yes |
|
|
2 |
| _multibytecodec |
|
|
|
|
|
yes |
|
|
23 |
| _pickle |
|
|
|
(???) |
(yes) |
**NO** |
5 |
|
|
| _socket |
|
|
|
|
|
**NO** |
1 |
2 |
3 |
| _ssl |
|
|
|
(???) |
(branch) |
yes |
|
|
1 |
| _tkinter |
|
|
|
|
|
**NO** |
|
8 |
9 |
| _tracemalloc |
X |
|
|
gh-101520 |
|
**NO** |
|
6 |
7 |
| array |
|
|
|
|
|
yes |
|
1 |
|
| faulthandler |
X |
|
|
gh-101509 |
|
yes |
|
3+ |
~22+ |
| msvcrt |
|
Y |
|
|
|
**NO** |
??? |
??? |
??? |
| pyexpat |
|
|
|
|
|
yes |
|
|
1 |
| readline |
|
|
|
|
|
**NO** |
|
|
9 |
| winreg |
|
Y |
|
|
|
**NO** |
??? |
??? |
??? |
| winsound |
|
Y |
|
|
|
**NO** |
??? |
??? |
??? |
test/example modules
These can be ported/isolated but don't have to be. They are the lowest priority.
| module |
issue |
PR |
ported |
# static types |
# other global objects |
# other globals |
| xxmodule |
|
|
|
3 |
1 |
|
| xxsubtype |
|
|
|
2 |
|
|
| xxlimited_35 |
|
|
|
|
2 |
|
| ... |
|
|
|
|
|
|
| ... |
|
|
|
|
|
|
Linked PRs
See PEP 687.
Currently most stdlib extension have been ported to multi-phase init. There are still a number of them to be ported, almost entirely non-builtin modules. Also, some that have already been ported still have global state that needs to be fixed.
(This is part of the effort to finish isolating multiple interpreters from each other. See gh-100227.)
High-Level Info
How to isolate modules: https://docs.python.org/3/howto/isolating-extensions.html (AKA PEP 630).
The full list of modules that need porting can be found with:
...The full list of remaining (unsupported) global variables is:
A full analysis of the modules may be found at the bottom of this post.
(other info)
Previous Work
Related Links
TODO
Here is the list of modules that need attention, in a rough, best-effort priority order. Additional details (e.g. if there is an issue and/or PR) is found in the analysis table at the bottom.
_ioextension module #101819_decimalextension module #106078The above does not include test modules. They don't need to be ported/isolated (except for a few which already have been).
Modules Analysis
test/example modules
These can be ported/isolated but don't have to be. They are the lowest priority.
Linked PRs
_pickle#102982_decimal#103381_asynciofreelist to module state #104196pyexpat#104506_elementtree#104561_ssl#104725_elementtreemodule importable in sub-interpreters #113434pyexpatmodule importable in sub-interpreters #113555_ctypesmetatypes to heap types #113620_ctypesdata types to heap types #113630_ctypestype hierarchy and features #113727_ctypesdata types to heap types (alt) #113774_ctypes.cstatic types are accessed via global state #113857_zstd(GH-133674) #133695