mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-07-31 22:04:31 +00:00
Python 3.9 support (#2088)
* try changes in pr 1804 * fix classifiers * typo
This commit is contained in:
@@ -8,11 +8,12 @@ env:
|
|||||||
- PY_VER=3.6.12
|
- PY_VER=3.6.12
|
||||||
- PY_VER=3.7.9
|
- PY_VER=3.7.9
|
||||||
- PY_VER=3.8.6
|
- PY_VER=3.8.6
|
||||||
|
- PY_VER=3.9.0
|
||||||
|
|
||||||
install: "" # so travis doesn't do pip install requirements.txt
|
install: "" # so travis doesn't do pip install requirements.txt
|
||||||
script:
|
script:
|
||||||
- docker build -f py.Dockerfile --build-arg MUJOCO_KEY=$MUJOCO_KEY --build-arg PYTHON_VER=$PY_VER -t gym-test .
|
- 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:
|
deploy:
|
||||||
provider: pypi
|
provider: pypi
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
"""An observation wrapper that augments observations by pixel values."""
|
"""An observation wrapper that augments observations by pixel values."""
|
||||||
|
|
||||||
import collections
|
import collections
|
||||||
|
from collections.abc import MutableMapping
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -8,6 +9,7 @@ import numpy as np
|
|||||||
from gym import spaces
|
from gym import spaces
|
||||||
from gym import ObservationWrapper
|
from gym import ObservationWrapper
|
||||||
|
|
||||||
|
|
||||||
STATE_KEY = 'state'
|
STATE_KEY = 'state'
|
||||||
|
|
||||||
|
|
||||||
@@ -60,7 +62,7 @@ class PixelObservationWrapper(ObservationWrapper):
|
|||||||
self._observation_is_dict = False
|
self._observation_is_dict = False
|
||||||
invalid_keys = set([STATE_KEY])
|
invalid_keys = set([STATE_KEY])
|
||||||
elif isinstance(wrapped_observation_space,
|
elif isinstance(wrapped_observation_space,
|
||||||
(spaces.Dict, collections.MutableMapping)):
|
(spaces.Dict, MutableMapping)):
|
||||||
self._observation_is_dict = True
|
self._observation_is_dict = True
|
||||||
invalid_keys = set(wrapped_observation_space.spaces.keys())
|
invalid_keys = set(wrapped_observation_space.spaces.keys())
|
||||||
else:
|
else:
|
||||||
|
1
setup.py
1
setup.py
@@ -48,5 +48,6 @@ setup(name='gym',
|
|||||||
'Programming Language :: Python :: 3.6',
|
'Programming Language :: Python :: 3.6',
|
||||||
'Programming Language :: Python :: 3.7',
|
'Programming Language :: Python :: 3.7',
|
||||||
'Programming Language :: Python :: 3.8',
|
'Programming Language :: Python :: 3.8',
|
||||||
|
'Programming Language :: Python :: 3.9',
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user