diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 74abab25..ed04926b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -15,6 +15,5 @@ updates: - dependency-name: "psutil" - dependency-name: "pystache" - dependency-name: "typeguard" - - dependency-name: "typing-compat" - dependency-name: "packaging" diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 74dab345..70d66fa9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, 3.10] + python-version: [3.8, 3.9, 3.10, 3.11, 3.12] runs-on: ubuntu-latest steps: diff --git a/.mypy b/.mypy index 131f5287..b374bf53 100644 --- a/.mypy +++ b/.mypy @@ -16,6 +16,3 @@ ignore_missing_imports = True [mypy-pystache.*] ignore_missing_imports = True - -[mypy-typing_compat.*] -ignore_missing_imports = True \ No newline at end of file diff --git a/QuickStart.md b/QuickStart.md index 8a1fcaaa..7b610c90 100644 --- a/QuickStart.md +++ b/QuickStart.md @@ -7,13 +7,13 @@ This document will guide you through the install procedure and your first Hello - [Hello World example](#hello-world) ## Requirements -- python3.7+ +- python3.8+ ## Install PSI/J If you have conda installed you might want to start from a fresh environment. This part is not installing PSI/J but setting up a new environment with the specified python version: -1. `conda create -n psij python=3.7` +1. `conda create -n psij python=3.8` 2. `conda activate psij` @@ -35,7 +35,7 @@ Install PSI/J from the GitHub repository: ## Hello World **Requirements** -- python3.7 +- python3.8 - Job executor, e.g. Slurm in this example **Steps** diff --git a/docs/getting_started.rst b/docs/getting_started.rst index feaba64c..caec7816 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -10,7 +10,7 @@ or from source. Requirements ^^^^^^^^^^^^ -The only requirements are Python 3.7+ and pip, which almost always +The only requirements are Python 3.8+ and pip, which almost always comes with Python. Install from PIP diff --git a/requirements.txt b/requirements.txt index 7656d0f8..92185d2f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,4 @@ psutil >=5.9, <=6.1.1 pystache>=0.6.0 typeguard>=3.0.1 -typing-compat packaging >= 24.0, <= 24.2 diff --git a/setup.py b/setup.py index c9df126d..d9f3ee7f 100644 --- a/setup.py +++ b/setup.py @@ -42,5 +42,5 @@ }, install_requires=install_requires, - python_requires='>=3.7' + python_requires='>=3.8' ) diff --git a/src/psij/serialize.py b/src/psij/serialize.py index 2cab84da..80ec771b 100644 --- a/src/psij/serialize.py +++ b/src/psij/serialize.py @@ -6,7 +6,6 @@ from io import StringIO, TextIOBase from pathlib import Path from typing import Optional, Dict, Union, List, IO, AnyStr, TextIO -import typing_compat from psij import ResourceSpec from psij.job_attributes import JobAttributes @@ -135,12 +134,12 @@ def _from_psij_object(self, o: Union[JobSpec, JobAttributes, ResourceSpec]) \ def _canonicalize_type(self, t: object) -> object: # generics don't appear to be subclasses of Type, so we can't really use Type for t - origin = typing_compat.get_origin(t) + origin = typing.get_origin(t) if origin == Optional: # Python converts Optional[T] to Union[T, None], so this shouldn't happen - return typing_compat.get_args(t)[0] + return typing.get_args(t)[0] elif origin == Union: - args = typing_compat.get_args(t) + args = typing.get_args(t) if args[0] == NoneType: return args[1] elif args[1] == NoneType: @@ -171,10 +170,10 @@ def _from_object(self, o: object, t: object) -> object: else: if t == Union[str, Path] or t == Optional[Union[str, Path]]: return str(o) - if typing_compat.get_origin(t) == dict: + if typing.get_origin(t) == dict: assert isinstance(o, dict) return self._from_dict(o) - if typing_compat.get_origin(t) == list: + if typing.get_origin(t) == list: assert isinstance(o, list) return self._from_list(o) raise ValueError('Cannot convert type "%s".' % t) @@ -249,10 +248,10 @@ def _to_object(self, s: object, t: object) -> object: if t == Union[str, Path] or t == Optional[Union[str, Path]]: assert isinstance(s, str) return Path(s) - if typing_compat.get_origin(t) == dict: + if typing.get_origin(t) == dict: assert isinstance(s, dict) return self._to_dict(s) - if typing_compat.get_origin(t) == list: + if typing.get_origin(t) == list: assert isinstance(s, list) return self._to_list(s) raise ValueError('Cannot convert type "%s".' % t) diff --git a/web/install.html b/web/install.html index b9b5ee11..60344e73 100644 --- a/web/install.html +++ b/web/install.html @@ -13,7 +13,7 @@

Installing PSI/J The psij-python library has the following requirements: