Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-127146: Emscripten: Don't need to avoid unpaired surrogate anymore
This might have been fixed by gh-136624, or by some Emscripten change.
In any case, it no longer seems to be needed.
  • Loading branch information
hoodmane committed Jul 16, 2025
commit 41f01245a312cb2baf529a8c3c12a397093f576d
8 changes: 1 addition & 7 deletions Lib/test/test_warnings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading