josuebrunel / myql

mYQL is a Python wrapper of the Yahoo! Query Language a.k.a YQL (Finances, ...)
https://myql.readthedocs.org/en/latest/
MIT License
31 stars 8 forks source link

Add support for Python3 #71

Closed josuebrunel closed 9 years ago

josuebrunel commented 9 years ago

_mYQL_ must support _Python3_

josuebrunel commented 9 years ago

Documentation is here

Explicit relative import

from tests import TestClass # Bad
...
from .tests import TestClass # Good

But seriously, absolute import is the thing.

from __future__ import absolute_import

Exception handling

except Exception, e: # Bad
...
except (Exception,) as e: # Good

Unittest

self.assertEquals # Bad
...
self.assertEqual # Good
josuebrunel commented 9 years ago

change-in-import-handling-modules-from-python2-to-python3 :+1: