From 01415213d72504eafc159721a8f55d57b374fd9c Mon Sep 17 00:00:00 2001 From: Peter Bierma Date: Thu, 31 Oct 2024 10:14:37 -0400 Subject: gh-126223: Propagate unicode errors in `_interpreters.create()` (#126224) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: sobolevn Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> --- Lib/test/test_interpreters/test_api.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Lib/test/test_interpreters/test_api.py') diff --git a/Lib/test/test_interpreters/test_api.py b/Lib/test/test_interpreters/test_api.py index 5e3d7a052ba..a9befbba64d 100644 --- a/Lib/test/test_interpreters/test_api.py +++ b/Lib/test/test_interpreters/test_api.py @@ -54,6 +54,9 @@ class CreateTests(TestBase): 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 -- cgit v1.2.3