Commit Graph
12 Commits
Author SHA1 Message Date
Jeong, YunWon 819b4b86fd Fix malformed Unicode error constructors (#8497)
* Fix malformed Unicode error constructors

Replace message-only Unicode decode and encode errors with fully initialized exceptions, preserve source objects and failure ranges, and remove the obsolete constructors.

Assisted-by: Codex:gpt-5

* Fix Windows Unicode CI regressions

Assisted-by: Codex:gpt-5
2026-08-17 00:33:56 +09:00
Jeong, YunWon 0dac28ff50 Implement UTF-32 encode/decode and fix UTF-16 empty encode
- Add UTF-32, UTF-32-LE, UTF-32-BE encode/decode in _pycodecs.py
- Register utf_32 codec functions in codecs.rs via delegate_pycodecs
- Fix PyUnicode_EncodeUTF16 returning "" instead of [] for empty input
- Remove resolved expectedFailure decorators in test_codecs.py
- Add failure reasons to remaining expectedFailure comments
2026-02-02 12:50:34 +09:00
Jiseok CHOI 9e7d291b63 Add callable validation to codecs.register_error (#6229)
Validate that the handler argument passed to codecs.register_error
is callable, raising TypeError with message 'handler must be callable'
if it is not. This matches CPython behavior.

This fix enables test_badregistercall in test_codeccallbacks.py to pass.
2025-10-31 00:08:04 +09:00
Noa c6cab4c43a Parse surrogates in string literals properly 2025-03-26 22:44:42 -05:00
Noa f323d14ed3 Refactor codecs 2025-03-26 02:24:01 -05:00
Jeong YunWon 7db813dbc6 mark failing tests again 2022-07-24 19:47:31 +09:00
CPython developers ce0ac2b11b Update encodings/test_codecs 2022-07-24 16:40:51 +09:00
CPython developers 559442c2f3 crlf -> lf test_codecs 2022-07-24 16:40:51 +09:00
Padraic Fanning 1e48510f5e Clean up skips in test_codeccallbacks 2021-10-10 19:11:24 -04:00
Jeong YunWon 7d859f54b9 unmark resolved test 2021-10-01 22:32:44 +09:00
snowapril 4014b91780 add decorators on failed & error tests
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00
snowapril c2f11e593d add test_codeccallbacks.py from cpython 3.8
Signed-off-by: snowapril <sinjihng@gmail.com>
2021-10-01 14:10:58 +09:00