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

cvsanaly should move to Python 3 #49

Open
cflewis opened this issue Feb 21, 2011 · 5 comments
Open

cvsanaly should move to Python 3 #49

cflewis opened this issue Feb 21, 2011 · 5 comments
Labels

Comments

@cflewis
Copy link

cflewis commented Feb 21, 2011

Python 3 is where it's at... Python 2 is old and deprecated.

Running 2to3 indicates there's not all that much to do. Mostly changes from except Exception, e to except Exception as e and print being wrapped in parentheses.

2.6 should fully support Python 3 syntax. I've set up a Jenkins build which runs 2to3 across cvsanaly to see if it's compatible http://eisbox.soe.ucsc.edu/jenkins/job/cvsanaly_python3/. Once it builds clean, it will be.

@linzhp
Copy link
Member

linzhp commented Feb 21, 2011

I like the idea of Python 3! Actually, it made me feel bad at the time I was learning Python that although the latest stable version was Python 3, I still needed to learn Python 2.6 because of the legacy code I needed to code with.

@cflewis
Copy link
Author

cflewis commented Feb 21, 2011

Yeah, I agree.

I think the way to go is to begin writing code in Python 3 syntax, but not yet rely on Python 3-only stuff. This should maintain compatibility with Python 2.6. We can use Jenkins to make sure that we work across both 3 and 2.6/2.7.

@cflewis
Copy link
Author

cflewis commented Feb 21, 2011

FWIW, I feel like I'm pretty close to solving this one. I've cleaned up some syntax (that was valid but ugly anyway) and changed from StringIO to BytesIO, which seems to help with Unicode compatibility.

@cflewis
Copy link
Author

cflewis commented Feb 21, 2011

Giving up on this for the evening. Almost there.

Need to:

  1. Figure out how to install setuptools for Python 3 on eisbox
  2. Get repositoryhandler converted to Python 3 (seems like it's already OK).

However, there is also:
3. Change from MySQLdb to something else, like OurSQL.

This one might be tricky.

@cflewis
Copy link
Author

cflewis commented Feb 21, 2011

I got setuptools on eisbox, and repositoryhandler has been fixed to be Python 3 compatible.

The Config is the last obvious problem with cvsanaly and Python3 . It just doesn't work in Python 3. If I do some hacks to try and get round the problem, it looks like it just stalls and doesn't do anything, perhaps indicating something else is broken too.

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

No branches or pull requests

2 participants