Skip to content

Commit

Permalink
Python 3.9 support (#2088)
Browse files Browse the repository at this point in the history
* try changes in pr 1804

* fix classifiers

* typo
  • Loading branch information
jkterry1 authored Dec 17, 2020
1 parent c4d0af3 commit bdf95c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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 bdf95c1

Please sign in to comment.