Skip to content

Commit

Permalink
PEP 687: amendments after feedback (python#2521)
Browse files Browse the repository at this point in the history
Co-authored-by: Petr Viktorin <encukou@gmail.com>
  • Loading branch information
Erlend Egeberg Aasland and encukou authored Apr 16, 2022
1 parent 0666a97 commit 32adbec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pep-0687.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Content-Type: text/x-rst
Requires: 489, 573, 630
Created: 04-Apr-2022
Python-Version: 3.11
Post-History: `04-Apr-2022 <https://discuss.python.org/t/14824>`__

Post-History: `04-Apr-2022 <https://discuss.python.org/t/14824>`__,
`11-Apr-2022 <https://mail.python.org/archives/list/python-dev@python.org/thread/B3HYQIE4Z5WBJCC3FUZJZHXLM32I4BZA/>`__

Abstract
========
Expand Down Expand Up @@ -67,6 +67,9 @@ All stdlib extension modules will be *isolated*. That is:
Conversion to heap types
------------------------

Static types that do not need module state access, and have no other reason to
be converted, should stay static.

Types whose methods need access to their module instance will be converted
to heap types following :pep:`630`, with the following considerations:

Expand Down Expand Up @@ -97,9 +100,6 @@ If another kind of issue is found, the module in question should be unchanged
until a solution is found and added to the Devguide, and already
converted modules are checked and fixed.

Static types that do not need module state access, and have no other reason to
be converted, should stay static.


Process
-------
Expand Down Expand Up @@ -137,7 +137,7 @@ smaller modules.
3. Add relevant global variables to the module state ``struct``, and modify code
that accesses the global state to use the module state helpers instead. This
step may be broken into several PR's.
4. Where necessary, convert heap types to static types.
4. Where necessary, convert static types to heap types.
5. Convert the global module state struct to true module state.
6. Implement multi-phase initialisation.

Expand Down

0 comments on commit 32adbec

Please sign in to comment.