classification
Title: Allow backslashreplace error handler to be used on input
Type: enhancement Stage: resolved
Components: Extension Modules Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: 22470 Superseder:
Assigned To: serhiy.storchaka Nosy List: Arfrever, haypo, martin.panter, ncoghlan, python-dev, r.david.murray, serhiy.storchaka, steve.dower
Priority: normal Keywords: needs review, patch

Created on 2014-08-27 10:50 by ncoghlan, last changed 2015-01-27 08:54 by serhiy.storchaka. This issue is now closed.

Files
File name Uploaded Description Edit
backslashreplace_decode.patch serhiy.storchaka, 2014-09-23 12:27 review
backslashreplace_decode_2.patch serhiy.storchaka, 2014-11-25 12:43 review
Messages (9)
msg225966 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2014-08-27 10:50
In the discussion on issue 18814, Antoine pointed out that in a Python 3 world, using backslashescape during decoding actually makes sense - it lets you accurately report arbitrary bytes in the sequence, without needing surrogateescape or surrogatepass to be used when encoding later.
msg227352 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-09-23 12:27
Here is a patch.
msg231655 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-25 12:43
Synchronized with the tip (resolved conflicts with issue22470 and issue19676).
msg234144 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-01-16 19:44
Could you make a review Nick to get this feature in the first alpha.
msg234607 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2015-01-24 12:57
+1 from me for merging, although I suspect you'll need to adjust the codecs.rst changes first.
msg234691 - (view) Author: Roundup Robot (python-dev) Date: 2015-01-25 20:57
New changeset dd8a03e98158 by Serhiy Storchaka in branch 'default':
Issue #22286: The "backslashreplace" error handlers now works with
https://hg.python.org/cpython/rev/dd8a03e98158
msg234694 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2015-01-25 21:24
Looks like the buildbots aren't happy with this change.
msg234706 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-01-25 23:27
Yes, I see. The patch exposed existing bug in decoding error handing. See issue23321 for this.
msg234784 - (view) Author: Roundup Robot (python-dev) Date: 2015-01-26 22:27
New changeset 1e8937861ee3 by Victor Stinner in branch 'default':
Issue #22286, #23321: Fix failing test on Windows code page 932
https://hg.python.org/cpython/rev/1e8937861ee3
History
Date User Action Args
2015-01-27 08:54:56serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: commit review -> resolved
2015-01-26 22:27:25python-devsetmessages: + msg234784
2015-01-25 23:27:12serhiy.storchakasetmessages: + msg234706
2015-01-25 23:18:27steve.dowersetnosy: + steve.dower
2015-01-25 21:24:52r.david.murraysetnosy: + r.david.murray
messages: + msg234694
2015-01-25 20:57:47python-devsetnosy: + python-dev
messages: + msg234691
2015-01-24 12:57:20ncoghlansetmessages: + msg234607
stage: patch review -> commit review
2015-01-16 19:44:00serhiy.storchakasetmessages: + msg234144
2015-01-12 23:03:41martin.pantersetnosy: + martin.panter
2014-11-25 12:43:07serhiy.storchakasetkeywords: + needs review
assignee: serhiy.storchaka
messages: + msg231655

files: + backslashreplace_decode_2.patch
2014-10-05 04:09:50ncoghlanlinkissue22555 dependencies
2014-09-30 06:35:51Arfreversetnosy: + Arfrever
2014-09-23 17:36:22serhiy.storchakasetdependencies: + Possible integer overflow in error handlers
2014-09-23 12:28:37serhiy.storchakalinkissue22469 superseder
2014-09-23 12:27:37serhiy.storchakasetfiles: + backslashreplace_decode.patch

components: + Extension Modules

keywords: + patch
nosy: + serhiy.storchaka
messages: + msg227352
stage: needs patch -> patch review
2014-08-27 11:00:40ncoghlanlinkissue18814 dependencies
2014-08-27 10:53:51hayposetnosy: + haypo
2014-08-27 10:50:20ncoghlancreate