Skip to content

gh-127146: Emscripten: Fix test_open_undecodable_uri by setting -sTEXTDECODER=2 #136624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

hoodmane
Copy link
Contributor

@hoodmane hoodmane commented Jul 13, 2025

This removes the JS text decoder fallback and gets rid of the bugs due to the differences in behavior on invalid utf8 strings. See emscripten-core/emscripten#24690.

…DER=2`

This removes the JS text decoder fallback and gets rid of the bugs
due to the differences in behavior on invalid utf8 strings.
See emscripten-core/emscripten#24690.
@hoodmane hoodmane requested a review from freakboy3742 July 13, 2025 12:22
@hoodmane hoodmane changed the title gh-127146: Fix test_open_undecodable_uri by setting -sTEXTDECODER=2 gh-127146: Emscripten: Fix test_open_undecodable_uri by setting -sTEXTDECODER=2 Jul 13, 2025
@hoodmane
Copy link
Contributor Author

!buildbot emscripten

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @hoodmane for commit 358e0a3 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F136624%2Fmerge

The command will test the builders whose names match following regular expression: emscripten

The builders matched are:

  • WASM Emscripten PR

@freakboy3742 freakboy3742 added the needs backport to 3.14 bugs and security fixes label Jul 13, 2025
Copy link
Contributor

@freakboy3742 freakboy3742 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it resolves the test failures in CI, so I'll call that a win

(EDIT: There are still other failures, but this patch results in less failures, and specifically no failure with the sqlite3 tests.)

@freakboy3742 freakboy3742 merged commit 283b050 into python:main Jul 13, 2025
48 of 49 checks passed
@miss-islington-app
Copy link

Thanks @hoodmane for the PR, and @freakboy3742 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 13, 2025
… `-sTEXTDECODER=2` (pythonGH-136624)

Removes the JS text decoder fallback and gets rid of the bugs due to the differences
in behavior on invalid utf8 strings. See emscripten-core/emscripten#24690.
(cherry picked from commit 283b050)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Jul 13, 2025

GH-136631 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Jul 13, 2025
freakboy3742 pushed a commit that referenced this pull request Jul 14, 2025
…g `-sTEXTDECODER=2` (GH-136624) (#136631)

Removes the JS text decoder fallback and gets rid of the bugs due to the differences
in behavior on invalid utf8 strings. See emscripten-core/emscripten#24690.
(cherry picked from commit 283b050)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
hoodmane added a commit to hoodmane/cpython that referenced this pull request Jul 16, 2025
…nymore

This might have been fixed by pythongh-136624, or by some Emscripten change.
In any case, it no longer seems to be needed.
hoodmane added a commit to hoodmane/pyodide that referenced this pull request Jul 16, 2025
This makes the code smaller and gets rid of a buggy code path. We
switched to this upstream to fix a test: see python/cpython#136624.
freakboy3742 pushed a commit that referenced this pull request Jul 16, 2025
…#136707)

This might have been fixed by gh-136624, or by some Emscripten change.
In any case, it no longer seems to be needed.
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 16, 2025
…nymore (pythonGH-136707)

This might have been fixed by pythongh-136624, or by some Emscripten change.
In any case, it no longer seems to be needed.
(cherry picked from commit dcd27aa)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
freakboy3742 pushed a commit that referenced this pull request Jul 16, 2025
…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 dcd27aa)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants