classification
Title: bytes decode raises OverflowError desipte errors='ignore'
Type: behavior Stage: resolved
Components: Interpreter Core, Unicode Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Naitbit, eric.smith, ezio.melotti, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2017-10-20 09:58 by Naitbit, last changed 2017-10-20 14:42 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 4058 merged serhiy.storchaka, 2017-10-20 11:10
PR 4059 merged python-dev, 2017-10-20 14:08
Messages (4)
msg304651 - (view) Author: Sebastian Kacprzak (Naitbit) Date: 2017-10-20 09:58
In Python 3.5 and earlier (tested 3.5.3 and 2.7.13)
b'\\\xfa'.decode('unicode-escape', errors='ignore')
did return '\\ú'

but in Python 3.6 it raises 
OverflowError: decoding with 'unicode-escape' codec failed (OverflowError: character argument not in range(0x110000))


Python 3.6.1 (default, Sep  7 2017, 16:36:03) 
[GCC 6.3.0 20170406] on linux
msg304656 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-20 14:08
New changeset 56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f by Serhiy Storchaka in branch 'master':
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (#4058)
https://github.com/python/cpython/commit/56cb465cc93dcb35aaf7266ca3dbe2dcff1fac5f
msg304658 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-20 14:41
New changeset 1e78ed6825701029aa45a68f9e62dd3bb8d4e928 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6':
bpo-31825: Fixed OverflowError in the 'unicode-escape' codec (GH-4058) (#4059)
https://github.com/python/cpython/commit/1e78ed6825701029aa45a68f9e62dd3bb8d4e928
msg304659 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-10-20 14:42
Thank you for your report Sebastian.
History
Date User Action Args
2017-10-20 14:42:35serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg304659

stage: patch review -> resolved
2017-10-20 14:41:31serhiy.storchakasetmessages: + msg304658
2017-10-20 14:08:29python-devsetpull_requests: + pull_request4028
2017-10-20 14:08:21serhiy.storchakasetmessages: + msg304656
2017-10-20 11:10:59serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request4027
2017-10-20 10:51:03serhiy.storchakasetversions: + Python 3.7
nosy: + serhiy.storchaka, ezio.melotti, eric.smith, vstinner

assignee: serhiy.storchaka
components: + Interpreter Core, Unicode
type: behavior
2017-10-20 09:58:20Naitbitcreate