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.
Created on 2020年04月30日 20:00 by vstinner, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 19820 | merged | vstinner, 2020年04月30日 20:07 | |
| Messages (3) | |||
|---|---|---|---|
| msg367778 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2020年04月30日 20:00 | |
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. |
|||
| msg367830 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2020年05月01日 09:33 | |
New changeset 252346acd937ddba4845331994b8ff4f90349625 by Victor Stinner in branch 'master': bpo-40453: Add PyConfig._isolated_subinterpreter (GH-19820) https://github.com/python/cpython/commit/252346acd937ddba4845331994b8ff4f90349625 |
|||
| msg367831 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2020年05月01日 09:34 | |
TODO * check that spawning a thread is blocked in isolated subinterpreter * block loading C extensions which don't implement PEP 489 in isolated subinterpreter (see https://github.com/python/cpython/pull/19820 comments) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:30 | admin | set | github: 84633 |
| 2021年09月21日 20:05:07 | vstinner | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2020年05月15日 00:39:34 | vstinner | set | components:
+ Subinterpreters, - Interpreter Core title: Add PyConfig._isolated_interpreter: isolated subinterpreters -> [subinterpreters] Add PyConfig._isolated_interpreter: isolated subinterpreters |
| 2020年05月01日 14:55:45 | eric.snow | set | nosy:
+ eric.snow |
| 2020年05月01日 10:56:40 | corona10 | set | nosy:
+ corona10 |
| 2020年05月01日 09:34:43 | vstinner | set | messages: + msg367831 |
| 2020年05月01日 09:33:51 | vstinner | set | messages: + msg367830 |
| 2020年04月30日 22:09:25 | barry | set | nosy:
+ barry |
| 2020年04月30日 20:07:59 | vstinner | set | keywords:
+ patch stage: patch review pull_requests: + pull_request19140 |
| 2020年04月30日 20:00:57 | vstinner | create | |