diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7bb7c70..660273b 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -18,13 +18,12 @@ jobs: fail-fast: false matrix: py: - - "3.12.0-beta.1" + - "pypy3.9" # ahead to start it earlier because takes longer + - "3.12" - "3.11" - "3.10" - - "pypy3.9" # ahead to start it earlier because takes longer - "3.9" - "3.8" - - "3.7" os: - ubuntu-22.04 - windows-2022 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 541ca5d..b62e333 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - - repo: https://github.com/psf/black + - repo: https://github.com/psf/black-pre-commit-mirror rev: 23.11.0 hooks: - id: black @@ -19,7 +19,7 @@ repos: - id: tox-ini-fmt args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "1.5.1" + rev: "1.5.3" hooks: - id: pyproject-fmt additional_dependencies: ["tox>=4.6.4"] diff --git a/pyproject.toml b/pyproject.toml index f6df973..9e0c101 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ maintainers = [ { name = "Ofek Lev", email = "oss@ofek.dev" }, { name = "Ronny Pfannschmidt", email = "opensource@ronnypfannschmidt.de" }, ] -requires-python = ">=3.7" +requires-python = ">=3.8" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -32,7 +32,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -45,9 +44,6 @@ classifiers = [ dynamic = [ "version", ] -dependencies = [ - 'typing-extensions>=4.7.1; python_version < "3.8"', -] optional-dependencies.docs = [ "furo>=2023.7.26", "proselint>=0.13", @@ -77,7 +73,7 @@ line-length = 120 [tool.ruff] select = ["ALL"] line-length = 120 -target-version = "py37" +target-version = "py38" isort = {known-first-party = ["platformdirs", "tests"], required-imports = ["from __future__ import annotations"]} ignore = [ "ANN101", # Missing type annotation for `self` in method diff --git a/src/platformdirs/__init__.py b/src/platformdirs/__init__.py index 3d5a5bd..93d67a9 100644 --- a/src/platformdirs/__init__.py +++ b/src/platformdirs/__init__.py @@ -14,11 +14,7 @@ if TYPE_CHECKING: from pathlib import Path - - if sys.version_info >= (3, 8): # pragma: no cover (py38+) - from typing import Literal - else: # pragma: no cover (py38+) - from typing_extensions import Literal + from typing import Literal def _set_platform_dir_class() -> type[PlatformDirsABC]: diff --git a/src/platformdirs/api.py b/src/platformdirs/api.py index aa9ce7b..f5389e7 100644 --- a/src/platformdirs/api.py +++ b/src/platformdirs/api.py @@ -7,12 +7,7 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: - import sys - - if sys.version_info >= (3, 8): # pragma: no cover (py38+) - from typing import Literal - else: # pragma: no cover (py38+) - from typing_extensions import Literal + from typing import Literal class PlatformDirsABC(ABC): diff --git a/tox.ini b/tox.ini index 1af7b63..1844288 100644 --- a/tox.ini +++ b/tox.ini @@ -8,7 +8,6 @@ env_list = py310 py39 py38 - py37 pypy3 type coverage @@ -82,7 +81,6 @@ depends = py310 py39 py38 - py37 pypy3 [testenv:readme]