Skip to content
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

Latest release breaking Python 2.7, 3.4 (SyntaxError) #174

Closed
effigies opened this issue Jun 25, 2019 · 11 comments · Fixed by #176
Closed

Latest release breaking Python 2.7, 3.4 (SyntaxError) #174

effigies opened this issue Jun 25, 2019 · 11 comments · Fixed by #176

Comments

@effigies
Copy link
Member

In nipype, tests are breaking in Python 2.7, 3.4, due to the @ operator:

./../../virtualenv/python2.7.15/lib/python2.7/site-packages/py/_path/local.py:668: in pyimport
    __import__(modname)
nipype/interfaces/nitime/__init__.py:5: in <module>
    from .analysis import (CoherenceAnalyzerInputSpec, CoherenceAnalyzerOutputSpec,
nipype/interfaces/nitime/analysis.py:28: in <module>
    package_check('nitime')
nipype/utils/misc.py:180: in package_check
    mod = __import__(pkg_name)
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/nitime/__init__.py:26: in <module>
    from . import algorithms
../../../virtualenv/python2.7.15/lib/python2.7/site-packages/nitime/algorithms/__init__.py:62: in <module>
    from nitime.algorithms.event_related import *
E     File "/home/travis/virtualenv/python2.7.15/lib/python2.7/site-packages/nitime/algorithms/event_related.py", line 60
E       h = np.array(linalg.pinv(X.T @ X) @ X.T @ y.T)
E                                    ^
E   SyntaxError: invalid syntax
@arokem
Copy link
Member

arokem commented Jun 25, 2019

Argh. Sorry about that. I'll put out a 0.8.1 fixing that.

What's your plan for kicking Python 2 and 3.4?

@effigies
Copy link
Member Author

IDK, @satra?

@effigies
Copy link
Member Author

But you can use python_requires in setup.py (docs). After a fixed release that will be picked up for 2.7 and 3.4, you can make a new release with python_requires=">=3.5" and leave these behind forever.

@arokem
Copy link
Member

arokem commented Jun 25, 2019

What would that entail for Nipype? Would the nipype testing simply skip importing nitime in that case?

@effigies
Copy link
Member Author

Nipype tests on 2.7 would only install up to the last release with a compatible python_requires. So our tests on 3.5 would use the latest nitime, and our tests on 2.7/3.4 would use nitime 0.8.1.

@arokem
Copy link
Member

arokem commented Jun 25, 2019

Gotcha. So 0.8.1 followed quickly by a 0.8.2 that reinstates the nice new syntax

@effigies
Copy link
Member Author

That works, though just strategically, I would jump to 0.9.0 for the new syntax, to signify a breaking change, and give you room to use 0.8.x to do any remaining fixes for old Python.

@satra
Copy link
Member

satra commented Jun 25, 2019

@arokem - i think our alignment for 3.0 was going to be with nibabel. we have not removed 2.7 compatibility layer yet from nipype 1.x. we don't have an explicit date for dropping mostly because we were focused on nipype 2.0. nipype 2.0 is going to be python 3.7+, but things have been a bit slow on that front.

@arokem
Copy link
Member

arokem commented Jun 25, 2019

This issue should now be fixed in the now-released 0.8.1

@arokem arokem closed this as completed Jun 25, 2019
@arokem arokem mentioned this issue Jun 25, 2019
@effigies
Copy link
Member Author

Thanks, @arokem.

@effigies
Copy link
Member Author

Just to confirm, this fixed the failing nipype tests. Thanks again.

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 a pull request may close this issue.

3 participants