Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for EOL Python 3.7 #246

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "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",
"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