ansigenome icon indicating copy to clipboard operation
ansigenome copied to clipboard

Python 3 incompatibility

Open HalisCz opened this issue 9 years ago • 8 comments

Please fix/handle Python 3 incompatibility. When I tried to install, I got this:

halis@eleanor ~ (master) $ pip install ansigenome
Collecting ansigenome
  Using cached ansigenome-0.5.6.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-xng2b7ao/ansigenome/setup.py", line 8
        print "Ansigenome needs setuptools in order to build. " + \
                                                              ^
    SyntaxError: Missing parentheses in call to 'print'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-xng2b7ao/ansigenome

Some version info:

halis@eleanor ~ (master) $ pip -V
pip 7.1.2 from /usr/lib64/python3.4/site-packages (python 3.4)

halis@eleanor ~ (master) $ python
Python 3.4.3 (default, Nov 11 2015, 11:23:26) 
[GCC 4.9.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

HalisCz avatar Dec 16 '15 22:12 HalisCz

There's going to be many instances of that. I don't use Python 3.x personally, but you're more than welcome to create a PR for full Python 3.x compatibility.

If you go this route, please adjust the travis.yml file so that it tests Ansigenome under both environments.

nickjj avatar Dec 18 '15 13:12 nickjj

Has anybody done any work to port ansigenome to Python3 ?

marco-m avatar Dec 11 '18 08:12 marco-m

@david-w-millar I saw your fork added support for Python3 (actually removed support for Python2 also, which is completely fine in my opinion). @nickjj would you consider a PR that replaces Python3 with Python2 ? If I have to stay pragmatic and pick one, Python2 should go IMHO.

marco-m avatar Dec 11 '18 08:12 marco-m

I think it would be possible to write it in a such a way that it works for both. I don't think dropping support for 2.x is the way to go.

nickjj avatar Dec 11 '18 11:12 nickjj

Sure it is possible to keep support for both Python2 and Python3. The question is if, given the availlable resources, it makes more sense to stay as-is (Python2 only) or replace Python2 with Python3. I suffered enough with Python 2/3 in my life to be pragmatic and contribute, if I can, to the sunset of Python2 :-).

marco-m avatar Dec 11 '18 13:12 marco-m

Just would like to note that DebOps coding standards specify that all Python code should be compatible with both version 2.x and version 3.x. Although this project is independent of DebOps, it would be great if the same approach were taken here. It is frustrating that Python isn't fully backwards compatible... but what's new?

jrgoldfinemiddleton avatar Feb 28 '19 06:02 jrgoldfinemiddleton

@david-w-millar I saw your fork added support for Python3 (actually removed support for Python2 also, which is completely fine in my opinion). @nickjj would you consider a PR that replaces Python3 with Python2 ? If I have to stay pragmatic and pick one, Python2 should go IMHO.

This fork? It seems the same to me.

markfaine avatar Jul 18 '19 16:07 markfaine

Has there been any change on this issue? Thanks

markfaine avatar Jul 18 '19 16:07 markfaine