Skip to content
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

Python 2 / 3 compatibility with a single codebase #109

Merged
merged 4 commits into from Apr 28, 2014
Merged

Conversation

@cdeil
Copy link
Member

@cdeil cdeil commented Apr 28, 2014

There's pointers how to do that here: astropy/astropy#2033

@cdeil cdeil added this to the 0.1 milestone Apr 28, 2014
@cdeil cdeil added the cleanup label Apr 28, 2014
@cdeil cdeil self-assigned this Apr 28, 2014
@cdeil
Copy link
Member Author

@cdeil cdeil commented Apr 28, 2014

On my Mac with Python 3.2 the tests fail like this:
https://gist.github.com/cdeil/11374384#file-gistfile1-txt-L315

The reason is that scikit image calls numpy.asstrided with non-integer shape = (2.0, 6.0, 4, 2) resulting in

DeprecationWarning: using a non-integer number instead of an integer will result in an error in the future

which is converted to an error by py.test.

@cdeil
Copy link
Member Author

@cdeil cdeil commented Apr 28, 2014

The scikit-image issue mentioned above will be fixed on their end ... this can be merged.

@cdeil
Copy link
Member Author

@cdeil cdeil commented Apr 28, 2014

I'm fixing a few more things pointed out by 2to3 when running

2to3 gammapy -x future
cdeil added a commit that referenced this pull request Apr 28, 2014
Make gammapy Python 2/3 compatible without 2to3
@cdeil cdeil merged commit 32739a3 into gammapy:master Apr 28, 2014
@cdeil cdeil deleted the cdeil:issue_109 branch Apr 28, 2014
@cdeil cdeil changed the title Make gammapy Python 2/3 compatible without 2to3 Python 2 / 3 compatibility with a single codebase Apr 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant