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

Not python 3 compatible. #2

Open
joe-eklund opened this issue Sep 17, 2017 · 2 comments
Open

Not python 3 compatible. #2

joe-eklund opened this issue Sep 17, 2017 · 2 comments

Comments

@joe-eklund
Copy link
Contributor

joe-eklund commented Sep 17, 2017

I've run into a Python 2 dependency while trying pip3 install -r requirements.txt inside a Python 3 virtual environment.

(hots-parser3) joe@mirkwood:~/projects/github/hots-parser$ pip3 install -r requirements.txt 
Collecting jsonpickle (from -r requirements.txt (line 1))
  Using cached jsonpickle-0.9.5.tar.gz
Collecting psycopg2ct (from -r requirements.txt (line 2))
  Using cached psycopg2ct-2.4.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-_58ga757/psycopg2ct/setup.py", line 206
        print '=' * 80
                ^
    SyntaxError: Missing parentheses in call to 'print'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-_58ga757/psycopg2ct/

Upon further investigation, I see that according to https://pypi.python.org/pypi/psycopg2ct, this package is only tested on Python 2.6+.

I would recommend either removing this package and switching to something Python 3 compatible, or at least putting it in the readme you must use Python 2.

I was able to pip install -r requirements.txt in a Python 2 virtual environment no problem though. For now that is the work around.

Edit: This was tested on Ubuntu 17.04, Python 3.5.3, Python 2.7.13, and GCC 6.3.0 20170118.

@joe-eklund
Copy link
Contributor Author

I've started reading through some of the code and see other Python 3 inconsistencies, such as https://github.com/crorella/hots-parser/blob/master/main.py#L76

So really this ticket should be expanded to just be: Be Python 3 compatible.

@joe-eklund joe-eklund changed the title psycopg2ct not python 3 compatible. Not python 3 compatible. Sep 17, 2017
@crorella
Copy link
Collaborator

crorella commented Sep 17, 2017

Yes you are right, most of the prints are not Python 3 compatible. I would love to do it but for now there are other high-pri tasks I'm working on. If you would like to make it python 3 friendly please go ahead and I will help with the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants