Skip to content

Commit 8c660e6

Browse files
authored
Drop support for EOL Python 3.8 (#330)
1 parent b769439 commit 8c660e6

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

.github/workflows/check.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
- "3.11"
2727
- "3.10"
2828
- "3.9"
29-
- "3.8"
3029
os:
3130
- ubuntu-latest
3231
- windows-latest

pyproject.toml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,14 @@ maintainers = [
2424
{ name = "Ofek Lev", email = "[email protected]" },
2525
{ name = "Ronny Pfannschmidt", email = "[email protected]" },
2626
]
27-
requires-python = ">=3.8"
27+
requires-python = ">=3.9"
2828
classifiers = [
2929
"Development Status :: 5 - Production/Stable",
3030
"Intended Audience :: Developers",
3131
"License :: OSI Approved :: MIT License",
3232
"Operating System :: OS Independent",
3333
"Programming Language :: Python",
3434
"Programming Language :: Python :: 3 :: Only",
35-
"Programming Language :: Python :: 3.8",
3635
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",
3837
"Programming Language :: Python :: 3.11",
@@ -102,7 +101,6 @@ matrix = [
102101
"3.11",
103102
"3.10",
104103
"3.9",
105-
"3.8",
106104
"pypy3.10",
107105
] },
108106
]
@@ -203,41 +201,42 @@ scripts = { "run" = [
203201
] }
204202

205203
[tool.ruff]
206-
target-version = "py38"
204+
target-version = "py39"
207205
line-length = 120
208206
format.preview = true
209-
lint.preview = true
210-
select = [
207+
lint.select = [
211208
"ALL",
212209
]
213-
isort = { known-first-party = [
214-
"platformdirs",
215-
"tests",
216-
], required-imports = [
217-
"from __future__ import annotations",
218-
] }
219-
ignore = [
210+
lint.ignore = [
220211
"ANN101", # Missing type annotation for `self` in method
221-
"D301", # Use `r"""` if any backslashes in a docstring
222-
"D205", # 1 blank line required between summary line and description
223-
"D401", # The first line of docstring should be in imperative mood
212+
"CPY", # no copyright notices
224213
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
214+
"D205", # 1 blank line required between summary line and description
225215
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
226-
"S104", # Possible binding to all interfaces
227-
"CPY", # no copyright notices
216+
"D301", # Use `r"""` if any backslashes in a docstring
217+
"D401", # The first line of docstring should be in imperative mood
228218
"DOC", # no support for restructuredtext
219+
"S104", # Possible binding to all interfaces
229220
]
230-
per-file-ignores."tests/**/*.py" = [
231-
"S101", # asserts allowed in tests
221+
lint.per-file-ignores."tests/**/*.py" = [
222+
"D", # don't care about documentation in tests
232223
"FBT", # don't care about booleans as positional arguments in tests
233224
"INP001", # no implicit namespace
234-
"D", # don't care about documentation in tests
235-
"S603", # `subprocess` call: check for execution of untrusted input
236-
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
237225
"PLC2701", # Private name import
238226
"PLR0917", # Too many positional arguments
227+
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
228+
"S101", # asserts allowed in tests
229+
"S603", # `subprocess` call: check for execution of untrusted input
239230
]
240231

232+
lint.isort = { known-first-party = [
233+
"platformdirs",
234+
"tests",
235+
], required-imports = [
236+
"from __future__ import annotations",
237+
] }
238+
lint.preview = true
239+
241240
[tool.codespell]
242241
builtin = "clear,usage,en-GB_to_en-US"
243242
count = true

src/platformdirs/api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
from typing import TYPE_CHECKING
99

1010
if TYPE_CHECKING:
11-
from typing import Iterator, Literal
11+
from collections.abc import Iterator
12+
from typing import Literal
1213

1314

1415
class PlatformDirsABC(ABC): # noqa: PLR0904

src/platformdirs/unix.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@
66
import sys
77
from configparser import ConfigParser
88
from pathlib import Path
9-
from typing import Iterator, NoReturn
9+
from typing import TYPE_CHECKING, NoReturn
1010

1111
from .api import PlatformDirsABC
1212

13+
if TYPE_CHECKING:
14+
from collections.abc import Iterator
15+
1316
if sys.platform == "win32":
1417

1518
def getuid() -> NoReturn:

0 commit comments

Comments
 (0)