[New-bugs-announce] [issue31862] Port the standard library to PEP 489 multiphase initialization

Marcel Plch report at bugs.python.org
Tue Oct 24 11:08:56 EDT 2017


New submission from Marcel Plch <gmarcel.plch at gmail.com>:

PEP 489 introduced multiphase initialization of extension and built-in modules.
Now, almost no module in the standard library supports this feature. This should be improved to prepare Python for better testing of subinterpreters.

Many benefits of PEP 489 don't apply to stdlib modules. However, the PEP effectively says that by using multi-phase init, the module author "promises" that the module is "subinterpreter-friendly" [0]. So, when porting, each module should be checked that it e.g. doesn't use mutable process-global state.

I'd like to port stdlib to multi-phase init, starting with the easier modules, to:
    - get familiar with contributing to CPython,
    - check and track which modules are already "subinterpreter-friendly", and
    - figure out how and where PEP 489 is lacking (beyond what is discussed in the PEP itself).


[0]: https://www.python.org/dev/peps/pep-0489/#subinterpreters-and-interpreter-reloading

----------
components: Extension Modules
messages: 304914
nosy: Dormouse759, encukou, ncoghlan
priority: normal
severity: normal
status: open
title: Port the standard library to PEP 489 multiphase initialization
type: enhancement
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31862>
_______________________________________


More information about the New-bugs-announce mailing list