|
From: Stefan R. <re...@bu...> - 2020-04-26 00:18:21
|
New submission from Stefan Richthofer <ste...@jy...>:
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
----------
components: Core
messages: 13040
nosy: stefan.richthofer
priority: normal
severity: normal
status: open
title: Issue with unicode_escape blocks use of future
type: behaviour
versions: Jython 2.7.2
_______________________________________
Jython tracker <re...@bu...>
<https://bugs.jython.org/issue2884>
_______________________________________
|