Skip to content

wip: python3 support #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

wip: python3 support #10

wants to merge 1 commit into from

Conversation

dtkav
Copy link
Contributor

@dtkav dtkav commented Feb 18, 2019

Hi friends. I've been enjoying using cosmolog in python 3.

Here are some changes I needed in order to support python 3.
I've been testing them in a cosmolog-dtkav package.

This might work nicely with #2 (adds tox support).

Regarding the changes:

  • exception.message was deprecated in python 2.6 (args[0] uses the first argument to the exception, usually the 'message')
  • python3 doesn't have long, so six.integer_types is (int,) in python3 and (int, long) in python2
  • basestring is replaced by six.string_types
  • six.iteritems(...) replaces iteritems()

@dtkav dtkav changed the title WIP: python3 support python3 support Mar 7, 2019
@dtkav
Copy link
Contributor Author

dtkav commented Mar 7, 2019

@isilien @bcavagnolo if you have some time to take a look, I'd really appreciate it!

@bcavagnolo
Copy link
Contributor

LGTM @dtkav. Let me try to merge #2 first....

@bcavagnolo
Copy link
Contributor

@dtkav can you rebase to master and add the python3 env you're testing with?

@dtkav dtkav changed the title python3 support wip: python3 support Mar 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants