cruzdb
cruzdb copied to clipboard
Figure out what needs to be done for Python 3 compatiblity
Given that SQLSoup and SQLalchemy are all Python 3 compatible, the next step is to find the potential points of issues directly in cruzdb.
In particular:
- [ ] Figure out how the bundled SQLSoup is different than the stock one
- [ ] Track issues that
2to3
can't fix (strings vs bytes etc) - [ ] Move to a library like
six
to keep everything compatible with a single codebase (optional?)
+1, i'm converting the easy stuff like print statements today.
Then you can answer one of my questions ;) : why the bundled SQLSoup? And what differences does it have from stock SQLSoup?
I can't remember. I will try to remove it. I will plan to use six for most stuff.
Any update on python-3.3 compatibility? Thanks!
@dylkot can you try the py3 branch?
Sorry for the slow response I gave it a try and made few superficial changes (print statements, some import statements, and a try/except statement) and so now:
from cruzdb import Genome"
works fine. The problem comes with:
g = Genome("hg19")
I get the error:
ImportError: No module named 'MySQLdb'
From what I can tell MySQL-python doesn't support python3 right now (see http://stackoverflow.com/questions/20049590/pip-3-3-install-mysql-python) so would need to figure out a solution for that. Might be a bit more than I have bandwidth for at the moment though.
so would need to figure out a solution for that. Might be a bit more than I have bandwidth for at the moment though.
Install "oursql" and use a full SQLalchemy-style URL for connecting including the driver (see the SQLalchemy docs).
I am running into this for python 3.4.3 File "/home/aulloa/.virtualenvs/p3/lib/python3.4/site-packages/cruzdb/sqlsoup.py", line 458 except KeyError, ke: ^ SyntaxError: invalid syntax