Message13040

Author stefan.richthofer
Recipients stefan.richthofer
Date 2020-04-26.00:18:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587860283.09.0.497060711101.issue2884@roundup.psfhosted.org>
In-reply-to
Content
I tried a lib that makes some use of the future module. It failed on these lines:
from future import standard_library
standard_library.install_aliases()

I quickly identified the cause is in this line in future.utils.surrogateescape.py: encoded = u('[abc\udcff]')
u is a function in surrogateescape.py

Anyway. The actual cause can be easily written as this line:

'[abc\udcff]'.decode('unicode_escape')

Execute this line directly in Jython 2.7.2 or CPython 2.7 to reproduce. (It works e.g. in CPython 2.7.12) This reproduces the issue independently from future. In Jython you will get the following error:

UnicodeDecodeError: 'unicodeescape' codec can't decode bytes in position 4-10: illegal Unicode character
History
Date User Action Args
2020-04-26 00:18:03stefan.richthofersetrecipients: + stefan.richthofer
2020-04-26 00:18:03stefan.richthofersetmessageid: <1587860283.09.0.497060711101.issue2884@roundup.psfhosted.org>
2020-04-26 00:18:02stefan.richthoferlinkissue2884 messages
2020-04-26 00:18:02stefan.richthofercreate