-
Notifications
You must be signed in to change notification settings - Fork 532
[FIX] Several fixes related to unicode literals #1656
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
Conversation
Current coverage is 70.96% (diff: 69.81%)@@ master #1656 diff @@
==========================================
Files 1025 1025
Lines 51416 51436 +20
Methods 0 0
Messages 0 0
Branches 7286 7294 +8
==========================================
+ Hits 36488 36502 +14
- Misses 13845 13849 +4
- Partials 1083 1085 +2
|
@@ -329,6 +330,8 @@ def _get_valid_pathstr(pathstr): | |||
Removes: [][ (){}?:<>#!|"';] | |||
Replaces: ',' -> '.' | |||
""" | |||
if not isinstance(pathstr, (str, bytes)): | |||
pathstr = to_str(pathstr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@satra, pathstr was converted to string using the __str__
member. However, for lists, tuples, dict, etc, they fall back to repr
. After adding unicode_literals everywere, repr('some string')
is u'some string'
with the u (only python 2). This u will be there after the pathstr is fixed for not valid characters.
@satra @chrisfilo this is ready and very much needed, please take a look |
repr()
and re-definitions of__repr__
have been revised(again, this is related to [BUG] Parameterization in python 2 contains 'u' prefixes in parameter names #1644, python 2.7 string issue in plugins #1621, etc).