Python 3.9 support (#2088)

* try changes in pr 1804

* fix classifiers

* typo
This commit is contained in:
Justin Terry
2020-12-17 14:55:52 -05:00
committed by GitHub
parent c4d0af393e
commit bdf95c1adc
3 changed files with 6 additions and 2 deletions

View File

@@ -8,11 +8,12 @@ env:
- PY_VER=3.6.12
- PY_VER=3.7.9
- PY_VER=3.8.6
- PY_VER=3.9.0
install: "" # so travis doesn't do pip install requirements.txt
script:
- docker build -f py.Dockerfile --build-arg MUJOCO_KEY=$MUJOCO_KEY --build-arg PYTHON_VER=$PY_VER -t gym-test .
- docker run gym-test
- docker run gym-test
deploy:
provider: pypi

View File

@@ -1,6 +1,7 @@
"""An observation wrapper that augments observations by pixel values."""
import collections
from collections.abc import MutableMapping
import copy
import numpy as np
@@ -8,6 +9,7 @@ import numpy as np
from gym import spaces
from gym import ObservationWrapper
STATE_KEY = 'state'
@@ -60,7 +62,7 @@ class PixelObservationWrapper(ObservationWrapper):
self._observation_is_dict = False
invalid_keys = set([STATE_KEY])
elif isinstance(wrapped_observation_space,
(spaces.Dict, collections.MutableMapping)):
(spaces.Dict, MutableMapping)):
self._observation_is_dict = True
invalid_keys = set(wrapped_observation_space.spaces.keys())
else:

View File

@@ -48,5 +48,6 @@ setup(name='gym',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)