Skip to content

Commit

Permalink
Drop support for EOL Python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jan 11, 2025
1 parent b769439 commit a7e4701
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 26 deletions.
1 change: 0 additions & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
- "3.11"
- "3.10"
- "3.9"
- "3.8"
os:
- ubuntu-latest
- windows-latest
Expand Down
45 changes: 22 additions & 23 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.8"
requires-python = ">=3.9"
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.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand Down Expand Up @@ -102,7 +101,6 @@ matrix = [
"3.11",
"3.10",
"3.9",
"3.8",
"pypy3.10",
] },
]
Expand Down Expand Up @@ -203,41 +201,42 @@ scripts = { "run" = [
] }

[tool.ruff]
target-version = "py38"
target-version = "py39"
line-length = 120
format.preview = true
lint.preview = true
select = [
lint.select = [
"ALL",
]
isort = { known-first-party = [
"platformdirs",
"tests",
], required-imports = [
"from __future__ import annotations",
] }
ignore = [
lint.ignore = [
"ANN101", # Missing type annotation for `self` in method
"D301", # Use `r"""` if any backslashes in a docstring
"D205", # 1 blank line required between summary line and description
"D401", # The first line of docstring should be in imperative mood
"CPY", # no copyright notices
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
"D205", # 1 blank line required between summary line and description
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
"S104", # Possible binding to all interfaces
"CPY", # no copyright notices
"D301", # Use `r"""` if any backslashes in a docstring
"D401", # The first line of docstring should be in imperative mood
"DOC", # no support for restructuredtext
"S104", # Possible binding to all interfaces
]
per-file-ignores."tests/**/*.py" = [
"S101", # asserts allowed in tests
lint.per-file-ignores."tests/**/*.py" = [
"D", # don't care about documentation in tests
"FBT", # don't care about booleans as positional arguments in tests
"INP001", # no implicit namespace
"D", # don't care about documentation in tests
"S603", # `subprocess` call: check for execution of untrusted input
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"PLC2701", # Private name import
"PLR0917", # Too many positional arguments
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
"S101", # asserts allowed in tests
"S603", # `subprocess` call: check for execution of untrusted input
]

lint.isort = { known-first-party = [
"platformdirs",
"tests",
], required-imports = [
"from __future__ import annotations",
] }
lint.preview = true

[tool.codespell]
builtin = "clear,usage,en-GB_to_en-US"
count = true
Expand Down
3 changes: 2 additions & 1 deletion src/platformdirs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from typing import Iterator, Literal
from collections.abc import Iterator
from typing import Literal


class PlatformDirsABC(ABC): # noqa: PLR0904
Expand Down
5 changes: 4 additions & 1 deletion src/platformdirs/unix.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@
import sys
from configparser import ConfigParser
from pathlib import Path
from typing import Iterator, NoReturn
from typing import TYPE_CHECKING, NoReturn

from .api import PlatformDirsABC

if TYPE_CHECKING:
from collections.abc import Iterator

if sys.platform == "win32":

def getuid() -> NoReturn:
Expand Down

0 comments on commit a7e4701

Please sign in to comment.