Skip to content

Commit

Permalink
Drop support for EOL Python 3.7 (#246)
Browse files Browse the repository at this point in the history
* Drop support for EOL Python 3.7

* Use Black mirror for faster pre-commit
  • Loading branch information
hugovk authored Dec 4, 2023
1 parent d081b27 commit f772aab
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 24 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]
Expand Down
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ maintainers = [
{ name = "Ofek Lev", email = "[email protected]" },
{ name = "Ronny Pfannschmidt", email = "[email protected]" },
]
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"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",
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions src/platformdirs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down
7 changes: 1 addition & 6 deletions src/platformdirs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ env_list =
py310
py39
py38
py37
pypy3
type
coverage
Expand Down Expand Up @@ -82,7 +81,6 @@ depends =
py310
py39
py38
py37
pypy3

[testenv:readme]
Expand Down

0 comments on commit f772aab

Please sign in to comment.