[issue37388] unknown error handlers should be reported early

2020-04-07 Thread STINNER Victor
STINNER Victor added the comment: New changeset d8acf0d9aae71d1897e8f91989bd8bfb4a9ef9c6 by Victor Stinner in branch 'master': bpo-37388: Don't check encoding/errors during finalization (GH-19409) https://github.com/python/cpython/commit/d8acf0d9aae71d1897e8f91989bd8bfb4a9ef9c6 --

[issue37388] unknown error handlers should be reported early

2020-04-07 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +18770 pull_request: https://github.com/python/cpython/pull/19409 ___ Python tracker ___ __

[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor
STINNER Victor added the comment: I compared ref (commit e1a63c4f21011a3ae77dff624196561070c83446) to patch (commit ed076ed467264b43ed01a8223ca65b133b590919). I ran bench.py using: # edit Makefile.pre.in to use: PROFILE_TASK=-m test.regrtest --pgo test_unicode test_codecs ./configure --enabl

[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor
STINNER Victor added the comment: Ok, the encoding and errors are now checked in almost all cases if you enable the development mode using -X dev command line option. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed _

[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset ed076ed467264b43ed01a8223ca65b133b590919 by Victor Stinner in branch 'master': bpo-37388: Add PyUnicode_Decode(str, 0) fast-path (GH-14385) https://github.com/python/cpython/commit/ed076ed467264b43ed01a8223ca65b133b590919 -- _

[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +14199 pull_request: https://github.com/python/cpython/pull/14385 ___ Python tracker ___ __

[issue37388] unknown error handlers should be reported early

2019-06-25 Thread STINNER Victor
STINNER Victor added the comment: New changeset 22eb689cf3de7972a2789db3ad01a86949508ab7 by Victor Stinner in branch 'master': bpo-37388: Development mode check encoding and errors (GH-14341) https://github.com/python/cpython/commit/22eb689cf3de7972a2789db3ad01a86949508ab7 -- _

[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor
STINNER Victor added the comment: bench.py: microbenchmark to measure the overhead of PR 14341. -- Added file: https://bugs.python.org/file48435/bench.py ___ Python tracker __

[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +14162 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14341 ___ Python tracker ___ _

[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +inada.naoki, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue37388] unknown error handlers should be reported early

2019-06-24 Thread STINNER Victor
STINNER Victor added the comment: Getting an error handler is expensive compared to the time to encode text/decode bytes. Python loads the error handler lazily to provide best performances. Text codecs are performance critical for Python. If we add a check, it should only be enabled in devel

[issue37388] unknown error handlers should be reported early

2019-06-24 Thread Miro Hrončok
New submission from Miro Hrončok : I was just bit by specifying an nonexisitng error handler for bytes.decode() without noticing. Consider this code: >>> 'a'.encode('cp1250').decode('utf-8', errors='Boom, Shaka Laka, Boom!') 'a' Nobody notices that the error handler doesn't exist. However: