-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--future-unicode breaks handling of unicode() calls. #133
Comments
Same thing happens to unichr and chr => it seems like modernize "thinks" that unicode_literals change the semantics of chr/str to unichr/unicode in python 2 which it obviously does not. |
Interestingly 2to3 also changes unicode to str. |
Seems to be related that fix_unicode_future.py derives from lib2to3.fixes.fix_unicode |
Yes, the Do you want to have a go at this? There's plenty of examples of fixes and tests to copy from. |
Do you think it would be better to go raising the priority of For future reference, changing the priority is done by adding a |
* python-modernize -n -w --no-diffs -f unicode_type . # avoid PyCQA/modernize#133 * python-modernize --future-unicode -n -w --no-diffs -f unicode_future . * python-modernize -n -w --no-diffs -f default -f libmodernize.fixes.fix_open .
* python-modernize -n -w --no-diffs -f unicode_type . # avoid PyCQA/modernize#133 * python-modernize --future-unicode -n -w --no-diffs -f unicode_future . * python-modernize -n -w --no-diffs -f default -f libmodernize.fixes.fix_open .
Sadly, this translation breaks for anything requiring an unicode object in Python 2.x
The text was updated successfully, but these errors were encountered: