sensiblecodeio / data-services-helpers

Python module containing classes and functions that The Sensible Code Company's Data Services often used
https://sensiblecode.io/
BSD 2-Clause "Simplified" License
4 stars 4 forks source link

Not Python 3 compatible #23

Closed StevenMaude closed 9 years ago

StevenMaude commented 9 years ago

Running dshelpers.py through 2to3, it doesn't look hard to fix. The only problem is making scraperwiki-python Python 3 compatible first as this is a blocker. The other dependencies already support Py3.

fawkesley commented 9 years ago

Sorry. Just... sorry.

StevenMaude commented 9 years ago

@paulfurley ;) It's more a problem with scraperwiki-python than anything else.

drj11 commented 9 years ago

I think it takes considerable prescience to get a clean run through 2to3 on the first try.

fawkesley commented 9 years ago

BTW I find that things like urlparse, StringIO etc are most easily "ported" by using the six package, which I understand basically provides a consistent namespace for both versions and wraps the underlying functions / objects. YMMV.

StevenMaude commented 9 years ago

See #27; should be almost there now as all the tests pass in 2.7 and 3.4.

python-modernize did a decent job. The issues that python-modernize didn't handle were handling old str as bytes and a case where e.message was being used; the modern way is to do a str(e) to get the text of your exception.

StevenMaude commented 9 years ago

Fixed by #27.