You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_codecs fails with RuntimeError on NetBSD #124476
By the way, test_decode_surrogateescape passes when run sequentially, but fails when run in parallel. This makes me think that there is a race condition or environment-specific problem in the locale handling code.
When run in the same process, the locale is C. When run in a subprocess, the locale is C.UTF-8. There must be a bug that causes such difference.
But other bug is that decoding with the surrogateescape error handler fails on C.UTF-8. #132477 makes INCOMPLETE_CHARACTER to be interpreted in the same way as DECODE_ERROR.
Activity
Merge branch 'main' into pythongh-124476
furkanonder commentedon Sep 24, 2024
USE_FORCE_ASCIIis defined, but the check_force_ascii function returns 0.To reproduce:
home$ cat fail.py
home$ ./python fail.py
furkanonder commentedon Sep 24, 2024
Example code that mimics the behavior for the decode_current_locale function.
Output on NetBSD 10.0 amd64:
Output on Arch Linux x86_64:
Merge branch 'main' into pythongh-124476
picnixz commentedon Mar 23, 2025
Dit it fail on 3.13 or was it only in 3.14?
furkanonder commentedon Mar 23, 2025
The issue is still observed in 3.12, 3.13 and 3.14
furkanonder commentedon Mar 23, 2025
By the way,
test_decode_surrogateescapepasses when run sequentially, but fails when run in parallel. This makes me think that there is a race condition or environment-specific problem in the locale handling code.pythongh-124476: Fix decoding from the locale encoding on C.UTF-8 loc…
serhiy-storchaka commentedon Apr 13, 2025
When run in the same process, the locale is C. When run in a subprocess, the locale is C.UTF-8. There must be a bug that causes such difference.
But other bug is that decoding with the surrogateescape error handler fails on C.UTF-8. #132477 makes INCOMPLETE_CHARACTER to be interpreted in the same way as DECODE_ERROR.
cc @vstinner, the original author of that code.
gh-124476: Fix decoding from the locale encoding in the C.UTF-8 locale (
[3.13] pythongh-124476: Fix decoding from the locale encoding in the …
[3.13] gh-124476: Fix decoding from the locale encoding in the C.UTF-…