Skip to content

Commit

Permalink
Merge pull request #4 from openai/master
Browse files Browse the repository at this point in the history
Python 3.9 support (openai#2088)
  • Loading branch information
sujitahirrao committed Dec 17, 2020
2 parents 5771b8c + bdf95c1 commit 9af59bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion gym/wrappers/pixel_observation.py
@@ -1,13 +1,15 @@
"""An observation wrapper that augments observations by pixel values."""

import collections
from collections.abc import MutableMapping
import copy

import numpy as np

from gym import spaces
from gym import ObservationWrapper


STATE_KEY = 'state'


Expand Down Expand Up @@ -60,7 +62,7 @@ def __init__(self,
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:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -48,5 +48,6 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
)

0 comments on commit 9af59bf

Please sign in to comment.