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
Fixed helpers.py for Python 3.7 (PEP 479) #462
Conversation
Ouch. 2 tiny lines drops the coverage to 89.987. Any quick suggestions? |
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.
Thanks @dhait, much appreciated. If we're adding support for PY37 then I think it's worth dealing with PEP 479 compatibility fully, see comments. Also PY37 should be added to appveyor.yml so we test under windows.
.travis.yml
Outdated
@@ -3,6 +3,7 @@ branches: | |||
- master | |||
language: python | |||
python: | |||
- "3.7-dev" |
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.
Which version of Python do you get with this? FWIW I think it should be possible to use latest release 3.7, I did recently for another project, see this .travis.yml.
petl/test/helpers.py
Outdated
a = cast(a) | ||
eq_(e, a) | ||
except: | ||
return |
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.
If this is needed because there is code inside petl that raises StopIteration from inside a generator, then I think it would be better to fix the code rather the test. To deal with PEP 479 change I believe we can just replace "raise StopIteration" with a bare "return" instead.
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.
Thanks @dhait, LGTM. I'll wait to check CI passes.
Thanks again @dhait. |
Modification to fix nosetest helpers.py failing due to changes in Python 3.7 (PEP 479)
nosetests -v and tox -e py27,py36,py37 all passed after modifications.
No new unit tests
No new functions