-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Add support for python 3.6 #2836
Conversation
I mean even if we can support 3.6 now with this simple change, should we? We need to be sure that any dependencies support it too (and if a new release e.g. of pygame with amazing features comes out, but doesn't support 3.6, we need to stick with an old one) Also, this forbids us from using any 3.7 features. At a glance, this will already break some of the type annotation stuff (PEP 563 which we use in some files), we block ourselves from using dataclasses (or forces us to use weird workarounds; worth noting we already use dataclasses in registration), we can't "safely" use the property that dictionaries are ordered (it's only official since 3.7) |
@@ -14,6 +14,7 @@ ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/root/.mujoco/mujoco210/bin | |||
COPY . /usr/local/gym/ | |||
WORKDIR /usr/local/gym/ | |||
|
|||
RUN pip install .[noatari] && pip install -r test_requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to specify that it has to be 3.6.15? I'm not sure what the reason for this is exactly, but I'm guessing this should apply to all 3.6.x versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine because the python foundation is not releasing any more python versions and this dockerfile is only called by the CI which uses the latest version of each python, i.e. only python 3.6.15 will be used
# Conflicts: # gym/core.py # gym/spaces/box.py # gym/spaces/space.py
@pseudo-rnd-thoughts |
Hi @pzhokhov, thanks for asking. |
@pzhokhov we also warn users to not use 3.6 on import if they're using it, and like Mark said only a very small amount of the library will actually run with Python 3.6 |
Hey, @pseudo-rnd-thoughts there is one issue though with python 3.6 support. I am working on the poetry integration as discussed and note that Same thing with mujoco https://pypi.org/project/mujoco/#files This also means if the current user installs gym with python 3.6, it will work but will break if they try to install ale-py. |
Previously python 3.6 was removed as a supported gym python version, this was primarily as the python foundation no longer supports python 3.6 with security or bug fixes.
This PR readds python 3.6 as a supported version through downgrading
importlib_metadata
that is used in theregistration.py
for importing third-party environments.Looking at the release notes, there appears no good reason for why it was pinned to
<=4.10
in eb6d826.Therefore, we have reduced the strictness to the minimum version that python 3.6 can download,
importlib_metadata>=4.8