quandl / quandl-python

MIT License
1.39k stars 339 forks source link

Python 3 Compatibility #1

Closed OliverSherouse closed 11 years ago

OliverSherouse commented 11 years ago

Adding in Python3 compatibility. Pretty simple really; just made the "prints" functions and did "from x import y" imports to compensate for the urllib changes. Also made the import in __init__ absolute.

tammer commented 11 years ago

Oliver:

Will these changes be completely backwards compatible?

OliverSherouse commented 11 years ago

Should be backwards compatible to python 2.6. How far back are you intending to go? If you want to support earlier versions, we can take a different approach and build 2to3 support into setup.py.

tammer commented 11 years ago

2.6 should be fine i think. we'll get this pulled on Tuesday. thanks.

ChrisStevens commented 11 years ago

Oliver, it doesn't look like uploads are working in 2.7. Some of the imports got lost possibly?

OliverSherouse commented 11 years ago

Hm. That's surprising. Would you mind letting me know what the exact error you're getting is (or what you're using as a test suite)?

ChrisStevens commented 11 years ago

I think it was mostly my fault actually, with the imports that got lost in one of my updates(json, datetime, and re). Those were the only errors I was able to find. Having the import for push in the init file, like there is for get, might be useful too. Saves having to make the bizarre calls due to names of the package and file being the same.

OliverSherouse commented 11 years ago

On that note, once this PR gets settled, I was planning to do another that suggested some reorganization to something that Python coders would find a little more familiar. But first thing's first; are we good to go on this guy?