[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 dcd27aace1)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-07-16 18:24:15 +02:00 committed by GitHub
parent 4eee754091
commit 9b7c4183cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)