jhcepas/ete — pull request #88 by khughitt (2014-09-01 13:12:03+00:00)
Title: Python3 support

Fixes issue #63, adding initial support for Python 3.

Took a bit longer than expected, but I think things are in pretty good shape now.

Some things to note:

- All 30/30 of the base tests formerly in `test_all.py` pass with Python 2 and 3.
- Versions tested are: 2.7.8 and 3.4.1.
- The test structure has been modified some to make it easier to test with both versions of Python. Instead of running `test_all.py`, you can now do `python setup.py test` and `python2 setup.py test`. (See https://pythonhosted.org/setuptools/setuptools.html#test-build-package-and-run-a-unittest-suite for more information).
- I tried also testing on Python 2.5 and 2.6, but those versions did not appear to work in the original codebase and seemed to be no longer supported? It may be worth explicitly requiring Python 2.7+.
- It looks like the `MySQLdb` adapter is no longer being updated, so it may be worth looking into alternatives for the future if this is an important component. More info:
- https://pypi.python.org/pypi/MySQL-python/1.2.4
- http://stackoverflow.com/questions/384471/mysql-db-lib-for-python-3-x
- https://wiki.python.org/moin/MySQL
- I started looking into the tests that were not run as part of `test_all.py`, namely the XML parsers and phylomeDB3 connectors, but they seem to be different enough from the rest of the tests that I thought it would be good to push these through first and make sure everything is working before considering the optional functionality. Also, this might be a good chance for someone else to tackle some aspects of the porting :)

Finally, although all of the tests are passing and everything appears to be working fine, I did not do any systematic testing of the functionality that is not covered by the unit tests. It would probably be a good idea to spend some time testing other functionality out that you think may have been missed, and adding unit tests if any issues pop up.