baccuslab / pyret

Python tools for analysis of neurophysiology data
https://pyret.readthedocs.io/en/master/
MIT License
35 stars 8 forks source link

Support for Python 2.7? #83

Closed kdesimone closed 7 years ago

kdesimone commented 7 years ago

I guess its OK to be compliant with 3 only, but you should probably make mention of this somewhere in the documentation or the repository so that users won't be baffeled when trying to install on Python 2.7.

$ python setup.py install Traceback (most recent call last): File "setup.py", line 2, in import pyret File "/Users/kevin/pyret/pyret/init.py", line 29, in from pyret import * File "/Users/kevin/pyret/pyret/nonlinearities.py", line 9, in from itertools import zip_longest ImportError: cannot import name zip_longest

bnaecker commented 7 years ago

Several of key components of the 'filtertools' module rely heavily on Python 3's better support for lazy evaluation and iteration. There are several other smaller differences that we'd have to account for, but this large one I think means we don't plan to support 2.7 at all.

But you are correct that the documentation should much more clearly indicate that the package is 3 only. We will make updates to the docstrings and quickstart on ReadTheDocs to make this very clear.

kdesimone commented 7 years ago

OK fair enough, although the benefits of widening your net to attract more users might outweigh the performance gains derived from lazy iteration and evaluation.

bnaecker commented 7 years ago

Yes, we've thought about the issue of the size of the user base. We'all look more carefully into supporting 2.7. Both Niru (the other developer) and I are traveling out of the country now, and will look into it in a few days when we return. Also, please excuse any late or short replies for the same reason.

kdesimone commented 7 years ago

As for the JOSS submission, I don't see any problem with building applications with 3+ in mind, but 2.7 compatibility is something to think about.

bnaecker commented 7 years ago

Preliminary Python 2.7 support has been added in a branch I just pushed. I've assigned Niru to review the code, and we'll merge it into master when we're convinced of its correctness.

nirum commented 7 years ago

Hi Kevin!

Just merged in python 2.7 support.

thanks, Niru