Skip to content

Commit

Permalink
Add Python 3.11 support, remove 3.7 (#100)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Towers <mark.m.towers@gmail.com>
  • Loading branch information
elliottower and pseudo-rnd-thoughts authored Jul 17, 2023
1 parent 829d903 commit c2d3a72
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.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']
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v2
- 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 @@ -48,7 +48,7 @@ repos:
rev: v3.3.2
hooks:
- id: pyupgrade
args: ["--py37-plus"]
args: ["--py38-plus"]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.3.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ strict = [
]

typeCheckingMode = "basic"
pythonVersion = "3.7"
pythonVersion = "3.8"
pythonPlatform = "All"
enableTypeIgnoreComments = true
# This is required as the CI pre-commit does not download the module (i.e. numpy, pygame, box2d)
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,12 @@ def get_version():
long_description=long_description,
long_description_content_type="text/markdown",
keywords=["Reinforcement Learning", "game", "RL", "AI"],
python_requires=">=3.7",
python_requires=">=3.8",
packages=find_packages(),
install_requires=["numpy>=1.18.0", "gymnasium>=0.27.0"],
tests_require=extras["testing"],
extras_require=extras,
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
8 changes: 1 addition & 7 deletions shimmy/openai_gym_compatibility.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from __future__ import annotations

import sys
from typing import Any
from typing import Any, Protocol, runtime_checkable

import gymnasium
from gymnasium import error
Expand All @@ -25,12 +25,6 @@
convert_to_terminated_truncated_step_api,
)

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


try:
import gym
import gym.wrappers
Expand Down
1 change: 1 addition & 0 deletions shimmy/openspiel_compatibility.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyright: reportGeneralTypeIssues=false
"""Wrapper to convert an OpenSpiel environment into a pettingzoo compatible environment."""
from __future__ import annotations

Expand Down

0 comments on commit c2d3a72

Please sign in to comment.