SIGN IN SIGN UP

gh-98608: Fix Failure-handling in new_interpreter() (gh-102658)

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.

https://github.com/python/cpython/issues/98608
E
Eric Snow committed
d1b883b52a99427d234c20e4a92ddfa6a1da8880
Parent: 0214c7a
Committed by GitHub <noreply@github.com> on 3/21/2023, 6:47:55 PM