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

Fix Python3 compatibility for lib/galaxy/web/ #5200

Merged
merged 1 commit into from Dec 13, 2017

Conversation

Projects
None yet
2 participants
@nsoranzo
Member

nsoranzo commented Dec 12, 2017

xref. #1715

import urllib2
urllib2._opener = None
from six.moves.urllib.request import install_opener
install_opener(None)

This comment has been minimized.

@nsoranzo

nsoranzo Dec 12, 2017

Member

@natefoo This should be equivalent, does it look good to you?

This comment has been minimized.

@dannon

dannon Dec 13, 2017

Member

I tested a few things locally and it does look like it's equivalent and should make sure that the _opener is None (which it seems to default to, but I'm assuming this is intended to override something uwsgi is setting), to me:

In [1]: import urllib2

In [2]: urllib2._opener

In [3]: from six.moves.urllib.request import install_opener

In [4]: install_opener("foo")

In [5]: urllib2._opener
Out[5]: 'foo'

In [6]: install_opener(None)

In [7]: urllib2._opener

This comment has been minimized.

@dannon

dannon Dec 13, 2017

Member

@nsoranzo Did you want to wait for more feedback, or is this ready to merge in your opinion? It looks good to me.

This comment has been minimized.

@nsoranzo

nsoranzo Dec 13, 2017

Member

I think it's ready to merge, I also checked the Python2 and Python3 implementations and these are equivalent.

This comment has been minimized.

@dannon

@dannon dannon merged commit 9adfa31 into galaxyproject:dev Dec 13, 2017

6 checks passed

api test Build finished. 334 tests run, 4 skipped, 0 failed.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
framework test Build finished. 165 tests run, 0 skipped, 0 failed.
Details
integration test Build finished. 60 tests run, 0 skipped, 0 failed.
Details
selenium test Build finished. 117 tests run, 2 skipped, 0 failed.
Details
toolshed test Build finished. 577 tests run, 0 skipped, 0 failed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment