Skip to content

[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

Merged
merged 4 commits into from
Oct 1, 2016

Conversation

oesteban
Copy link
Contributor

@oesteban oesteban commented Sep 21, 2016

- Close nipy#1655: fixes the References:: leftover in help() of interfaces
- Close nipy#1644: fixes the parameterized paths generated with python 2
- All uses of repr and re-definitions of __repr__ have been revised
  (again, this is related to nipy#1644, nipy#1621, etc).
@oesteban oesteban changed the title [FIXES] Several fixes related to unicode literals [WIP,FIXES] Several fixes related to unicode literals Sep 21, 2016
@codecov-io
Copy link

codecov-io commented Sep 21, 2016

Current coverage is 70.96% (diff: 69.81%)

Merging #1656 into master will decrease coverage by <.01%

@@             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   

Powered by Codecov. Last update c4c724b...648e80b

@oesteban oesteban changed the title [WIP,FIXES] Several fixes related to unicode literals [FIX] Several fixes related to unicode literals Sep 21, 2016
@@ -329,6 +330,8 @@ def _get_valid_pathstr(pathstr):
Removes: [][ (){}?:<>#!|"';]
Replaces: ',' -> '.'
"""
if not isinstance(pathstr, (str, bytes)):
pathstr = to_str(pathstr)
Copy link
Contributor Author

@oesteban oesteban Sep 23, 2016

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.

@oesteban
Copy link
Contributor Author

@satra @chrisfilo this is ready and very much needed, please take a look

@satra satra merged commit 5427538 into nipy:master Oct 1, 2016
@oesteban oesteban deleted the fix/ParameterizedPaths branch October 2, 2016 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Help string always contains References:: [BUG] Parameterization in python 2 contains 'u' prefixes in parameter names
3 participants