https://github.com/python/cpython/commit/9b7c4183cdfe245c06d417e871452398e4be1935 commit: 9b7c4183cdfe245c06d417e871452398e4be1935 branch: 3.14 author: Miss Islington (bot) <[email protected]> committer: freakboy3742 <[email protected]> date: 2025-07-16T16:24:15Z summary:
[3.14] gh-127146: Emscripten: Don't need to avoid unpaired surrogate anymore (GH-136707) (#136717) 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 <[email protected]> files: M Lib/test/test_warnings/__init__.py diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index 5c3b1250ceb045..f89e94449b3031 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -555,13 +555,7 @@ def test_warn_explicit_non_ascii_filename(self): 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) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
