This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients corona10, eric.snow, erlendaasland, lukasz.langa, shihai1991, trygveaa, vstinner
Date 2021-05-25.10:15:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> The commit that fixes the issue in 3.10 is

Right, the _ssl module was ported to multiphase initialization (PEP 489) in bpo-42333 (fixed in Python 3.10.0a3).

> This is a regression in 3.9. It didn't happen in 3.8. The commit that introduced the issue is

In Python 3.9, some stdlib modules are still using the legacy API to initialize modules, and share states between interpreters. This is bad: no Python object (nor state) must be shared between two interpreters.

Well, there is an on-going work on subinterpreters:


For example, many C extensions are being converted to the multiphase initialization API and get a "module state".

The _PyImport_FixupExtensionObject() change impacts extensions using the legacy API and so should not be used in subinterpreters.

Maybe the old behavior was better: if an extension uses the old API, share its state between all interpreters.
Date User Action Args
2021-05-25 10:15:29vstinnersetrecipients: + vstinner, lukasz.langa, eric.snow, corona10, shihai1991, erlendaasland, trygveaa
2021-05-25 10:15:29vstinnersetmessageid: <>
2021-05-25 10:15:29vstinnerlinkissue44050 messages
2021-05-25 10:15:28vstinnercreate