[New-bugs-announce] [issue40453] Add PyConfig._isolated_interpreter: isolated subinterpreters

STINNER Victor report at bugs.python.org
Thu Apr 30 16:00:57 EDT 2020


New submission from STINNER Victor <vstinner at python.org>:

I propose to add PyConfig._isolated_interpreter configuration parameter to disallow threads, subprocesses and fork in a subinterpreter.

_xxsubinterpreter.create() gets a new keyword-only isolated=True parameter to opt-in for not isolated mode, which is the current behavior of Py_NewInterpreter(). For example, mod_wsgi would continue to run in "non isolated" mode.

Attached PR implements this change. With the change, os.fork() is allowed again in "non isolated" subinterpreters (like mod_wsgi). os.fork() was disallowed in subinterpreters in Python 3.8, but subprocess was still allowed.

----------
components: Interpreter Core
messages: 367778
nosy: vstinner
priority: normal
severity: normal
status: open
title: Add PyConfig._isolated_interpreter: isolated subinterpreters
versions: Python 3.9

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


More information about the New-bugs-announce mailing list