Skip to content

Commit

Permalink
drop python 3.7 support (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kallinteris-Andreas authored Jul 3, 2023
1 parent 6126e5f commit 004543a
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 24 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ jobs:
strategy:
matrix:
include:
- os: ubuntu-latest
python: 37
platform: manylinux_x86_64
- os: ubuntu-latest
python: 38
platform: manylinux_x86_64
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v3
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ repos:
rev: v3.3.2
hooks:
- id: pyupgrade
args: ["--py37-plus"]
args: ["--py38-plus"]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To install the base Gymnasium library, use `pip install gymnasium`

This does not include dependencies for all families of environments (there's a massive number, and some can be problematic to install on certain systems). You can install these dependencies for one family like `pip install "gymnasium[atari]"` or use `pip install "gymnasium[all]"` to install all dependencies.

We support and test for Python 3.7, 3.8, 3.9, 3.10, 3.11 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.
We support and test for Python 3.8, 3.9, 3.10, 3.11 on Linux and macOS. We will accept PRs related to Windows, but do not officially support it.

## API

Expand Down
5 changes: 1 addition & 4 deletions gymnasium/envs/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
else:
import importlib.metadata as metadata

if sys.version_info < (3, 8):
from typing_extensions import Protocol
else:
from typing import Protocol
from typing import Protocol


ENV_ID_RE = re.compile(
Expand Down
3 changes: 1 addition & 2 deletions gymnasium/experimental/wrappers/lambda_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"""
from __future__ import annotations

from typing import Any, Callable, Sequence
from typing_extensions import Final
from typing import Any, Callable, Final, Sequence

import numpy as np

Expand Down
3 changes: 1 addition & 2 deletions gymnasium/experimental/wrappers/stateful_observation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

from collections import deque
from copy import deepcopy
from typing import Any, SupportsFloat
from typing_extensions import Final
from typing import Any, Final, SupportsFloat

import numpy as np

Expand Down
9 changes: 1 addition & 8 deletions gymnasium/wrappers/compatibility.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""A compatibility wrapper converting an old-style environment into a valid environment."""
import sys
from typing import Any, Dict, Optional, Tuple
from typing import Any, Dict, Optional, Protocol, Tuple, runtime_checkable

import gymnasium as gym
from gymnasium import logger
Expand All @@ -10,12 +9,6 @@
)


if sys.version_info >= (3, 8):
from typing import Protocol, runtime_checkable
else:
from typing_extensions import Protocol, runtime_checkable


@runtime_checkable
class LegacyEnv(Protocol):
"""A protocol for environments using the old step API."""
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ build-backend = "setuptools.build_meta"
name = "gymnasium"
description = "A standard API for reinforcement learning and a diverse set of reference environments (formerly Gym)."
readme = "README.md"
requires-python = ">= 3.7"
requires-python = ">= 3.8"
authors = [{ name = "Farama Foundation", email = "[email protected]" }]
license = { text = "MIT License" }
keywords = ["Reinforcement Learning", "game", "RL", "AI", "gymnasium"]
classifiers = [
"Development Status :: 4 - Beta", # change to `5 - Production/Stable` when ready
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down

0 comments on commit 004543a

Please sign in to comment.