FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) by ambv · Pull Request #28741 · python/cpython · GitHub

/ cpython Public

[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794) - #28741

Merged
ambv merged 2 commits into
python:3.9from
ambv:backport-b9bb748-3.9
Oct 5, 2021
Merged

[3.9] bpo-44050: Extension modules can share state when they don't support sub-interpreters. (GH-27794)#28741
ambv merged 2 commits into
python:3.9from
ambv:backport-b9bb748-3.9

Conversation

ambv commented Oct 5, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

(cherry picked from commit b9bb748)

Co-authored-by: Hai Shi shihai1992@gmail.com

Note: this is a little different from 3.10 and 3.11 because in 3.10+ _Py_IsMainInterpreter takes PyInterpreterState instead of the entire PyThreadState as an argument (see GH-24577 for that).

Also, the new test uses PyModule_AddObjectRef which was only added in Python 3.10 (see GH-23122). I replaced this usage with the old PyModule_AddObject with additional increfs and decrefs per what BPO-42327 prescribes.

https://bugs.python.org/issue44050

…pport sub-interpreters. (pythonGH-27794)

Automerge-Triggered-By: GH:encukou.
(cherry picked from commit b9bb748)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
ambv merged commit 52d9d3b into python:3.9 Oct 5, 2021
ambv deleted the backport-b9bb748-3.9 branch October 5, 2021 20:41

encukou commented Oct 12, 2021

Copy link
Copy Markdown
Member

Thanks for taking this, Łukasz!
(I would only get to it now ☺)

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL