Skip to content

BF: fix recursion error on Python 3.3 #472

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

Conversation

matthew-brett
Copy link
Member

Python 3.3 seems to get upset with filling format string values from
byte strings. See:
http://nipy.bic.berkeley.edu/builders/nibabel-py3.3/builds/240/steps/shell_5/logs/stdio

Fixed by this change - see try_branch.py run at:

http://nipy.bic.berkeley.edu/builders/nibabel-py3.3/builds/248/steps/shell_5/logs/stdio

Python 3.3 seems to get upset with filling format string values from
byte strings.  See:
http://nipy.bic.berkeley.edu/builders/nibabel-py3.3/builds/240/steps/shell_5/logs/stdio
@coveralls
Copy link

coveralls commented Aug 6, 2016

Coverage Status

Coverage increased (+0.0002%) to 96.217% when pulling f992edf on matthew-brett:py33-byte-string-recursion into a4724b7 on nipy:master.

@codecov-io
Copy link

Current coverage is 94.23% (diff: 100%)

Merging #472 into master will increase coverage by <.01%

@@             master       #472   diff @@
==========================================
  Files           160        160          
  Lines         21197      21198     +1   
  Methods           0          0          
  Messages          0          0          
  Branches       2266       2267     +1   
==========================================
+ Hits          19975      19976     +1   
  Misses          802        802          
  Partials        420        420          

Powered by Codecov. Last update a4724b7...f992edf

@MarcCote
Copy link
Contributor

MarcCote commented Aug 8, 2016

LGTM (I'm curious what is the recursion limit for Python on that machine?)

@matthew-brett
Copy link
Member Author

Not sure on the recursion limit, but I think this will leads to infinite recursion, because the format string is failing and then it tries to make an error trace that calls the str method again.

@MarcCote
Copy link
Contributor

MarcCote commented Aug 8, 2016

Gotcha.

@matthew-brett matthew-brett merged commit 758e07f into nipy:master Aug 8, 2016
@matthew-brett matthew-brett deleted the py33-byte-string-recursion branch August 8, 2016 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants