Skip to content

[3.11] gh-98608: Fix Failure-handling in new_interpreter() (gh-102658) - #102882

Merged
miss-islington merged 1 commit into
python:3.11from
miss-islington:backport-d1b883b-3.11
Mar 21, 2023
Merged

miss-islington merged 1 commit into
python:3.11from
miss-islington:backport-d1b883b-3.11

Conversation

@miss-islington

@miss-islington miss-islington commented Mar 21, 2023 •

Copy link
Copy Markdown
Contributor

The error-handling code in new_interpreter() has been broken for a while. We hadn't noticed because those code mostly doesn't fail. (I noticed while working on gh-101660.) The problem is that we try to clear/delete the newly-created thread/interpreter using itself, which just failed. The solution is to switch back to the calling thread state first.

(cherry picked from commit d1b883b)

Co-authored-by: Eric Snow ericsnowcurrently@gmail.com
https: //github.com//issues/98608

Automerge-Triggered-By: GH:ericsnowcurrently

…02658)

The error-handling code in new_interpreter() has been broken for a while.  We hadn't noticed because those code mostly doesn't fail.  (I noticed while working on pythongh-101660.)  The problem is that we try to clear/delete the newly-created thread/interpreter using itself, which just failed.  The solution is to switch back to the calling thread state first.

(cherry picked from commit d1b883b)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
https: //github.com/python/issues/98608
@miss-islington
miss-islington merged commit 4c6b354 into python:3.11 Mar 21, 2023
@miss-islington
miss-islington deleted the backport-d1b883b-3.11 branch March 21, 2023 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants