[3.13] gh-126223: Propagate unicode errors in _interpreters.create() (GH-126224) (#126242)

gh-126223: Propagate unicode errors in `_interpreters.create()` (GH-126224)
(cherry picked from commit 01415213d7)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-10-31 15:46:36 +01:00 committed by GitHub
parent ac00bf0e96
commit 89664d4d48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 1 deletions

View file

@ -55,6 +55,9 @@ def test_in_main(self):
self.assertIsInstance(interp, interpreters.Interpreter)
self.assertIn(interp, interpreters.list_all())
# GH-126221: Passing an invalid Unicode character used to cause a SystemError
self.assertRaises(UnicodeEncodeError, _interpreters.create, '\udc80')
def test_in_thread(self):
lock = threading.Lock()
interp = None