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

Make super() calls Python 2 compatible. #1312

Merged
merged 1 commit into from Feb 7, 2019

Conversation

robertnishihara
Copy link
Contributor

This should fix #1311. The issue was introduced in #1196. cc @pzhokhov @zuoxingdong

However, without testing Python 2 in Travis, it could break again in the future.

@pzhokhov
Copy link
Collaborator

pzhokhov commented Feb 7, 2019

@robertnishihara I tried setting up python 2.7 CI tests of gym at some point, and they were broken in many ways (other than this particular one). If there is an actual need to use gym with python 2.7, I'd be happy to look more into those.

@zuoxingdong
Copy link
Contributor

@pzhokhov sounds great ! IMHO, because of the official status of Python 2 (maintenance until 2020), it might be nice to keep Python 2 specific fixes to e.g. another branch. What do you think ?

@pzhokhov
Copy link
Collaborator

pzhokhov commented Feb 7, 2019

Oh man I was really hoping you'd say "No, who needs python 2 these days anyways" :) Okay, I'll look into that, in the mean time, let's merge this.

@pzhokhov pzhokhov merged commit f1f8848 into openai:master Feb 7, 2019
@zuoxingdong
Copy link
Contributor

@pzhokhov Haha, it's exactly the words in my mind ! tooo polite man :)

@robertnishihara
Copy link
Contributor Author

@pzhokhov If gym stops supporting Python 2, then the wheels should be tagged as just supporting Python 3, so that pip2 install gym pulls the latest version of gym that does support Python 2. E.g., see https://pypi.org/project/ipython/#files for an example.

FWIW, I haven't had any issues with gym in Python 2 up until this one.

I submitted #1313 just to see what goes wrong..

@pzhokhov
Copy link
Collaborator

pzhokhov commented Feb 7, 2019

so as it turns out the gym plays nicely with python 2.7; but the extensions (box2d-py, atari-py, mujoco-py) do not. Almost done with a PR with a bare version of gym being tested with python 2.

@pzhokhov
Copy link
Collaborator

pzhokhov commented Feb 7, 2019

yup, all good, tests pass and all :) #1314

@pzhokhov
Copy link
Collaborator

pzhokhov commented Feb 7, 2019

also, @robertnishihara, on the subject of wheels - can you mark source distributions (as opposed to binary wheels) as python3-only compatible? We do not release binaries for gym on pypi, only the source code

@robertnishihara
Copy link
Contributor Author

@pzhokhov I'm not sure, but it might be enough to add something like this line https://github.com/numpy/numpy/blob/de1ca61e038548c73ede1e8bd11a9c7dfa02794d/setup.py#L372 to the setup.py.

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.

TypeError creating gym.spaces.Box in Python 2 (gym==0.11.0).
3 participants