Add support for python 3.6 (#2836)

* Add support for python 3.6

* Add support for python 3.6

* Added check for python 3.6 to not install mujoco as no version exists

* Fixed the install groups for python 3.6

* Re-added python 3.6 support for gym

* black

* Added support for dataclasses through dataclasses module in setup that backports the module

* Fixed install requirements

* Re-added dummy env spec with dataclasses

* Changed type for compatability for python 3.6

* Added a python 3.6 warning

* Fixed python 3.6 typing issue

* Removed __future__ import annotation for python 3.6 support

* Fixed python 3.6 typing
This commit is contained in:
Mark Towers
2022-05-25 15:28:19 +01:00
committed by GitHub
parent 273e3f22ce
commit 0263deb5ab
27 changed files with 148 additions and 154 deletions

View File

@@ -1,7 +1,5 @@
"""Implementation of a space that represents the cartesian product of other spaces."""
from __future__ import annotations
from typing import Iterable, Optional, Sequence
from typing import Iterable, List, Optional, Sequence, Union
import numpy as np
@@ -25,7 +23,7 @@ class Tuple(Space[tuple], Sequence):
def __init__(
self,
spaces: Iterable[Space],
seed: Optional[int | list[int] | seeding.RandomNumberGenerator] = None,
seed: Optional[Union[int, List[int], seeding.RandomNumberGenerator]] = None,
):
r"""Constructor of :class:`Tuple` space.
@@ -43,7 +41,7 @@ class Tuple(Space[tuple], Sequence):
), "Elements of the tuple must be instances of gym.Space"
super().__init__(None, None, seed) # type: ignore
def seed(self, seed: Optional[int | list[int]] = None) -> list:
def seed(self, seed: Optional[Union[int, List[int]]] = None) -> list:
"""Seed the PRNG of this space and all subspaces."""
seeds = []