]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-127146: Emscripten: Don't need to avoid unpaired surrogate anymore (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 16 Jul 2025 16:24:15 +0000 (18:24 +0200)
committerGitHub <noreply@github.com>
Wed, 16 Jul 2025 16:24:15 +0000 (16:24 +0000)
This might have been fixed by gh-136624, or by some Emscripten change.
In any case, it no longer seems to be needed.
(cherry picked from commit dcd27aace180737adaddc79c00c181816fc6e162)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Lib/test/test_warnings/__init__.py

index 5c3b1250ceb0456ab5cf3a52c051dfc212c248ef..f89e94449b30310633720f79778dabcef87953ae 100644 (file)
@@ -555,13 +555,7 @@ class WarnTests(BaseTest):
         with self.module.catch_warnings(record=True) as w:
             self.module.resetwarnings()
             self.module.filterwarnings("always", category=UserWarning)
-            filenames = ["nonascii\xe9\u20ac"]
-            if not support.is_emscripten:
-                # JavaScript does not like surrogates.
-                # Invalid UTF-8 leading byte 0x80 encountered when
-                # deserializing a UTF-8 string in wasm memory to a JS
-                # string!
-                filenames.append("surrogate\udc80")
+            filenames = ["nonascii\xe9\u20ac", "surrogate\udc80"]
             for filename in filenames:
                 try:
                     os.fsencode(filename)