Skip to content

Commit ca34402

Browse files
committed
feat: drop support for Python 3.8
1 parent 863acd1 commit ca34402

File tree

29 files changed

+62
-88
lines changed

29 files changed

+62
-88
lines changed

.cirrus.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ tests_task:
88

99
env:
1010
matrix:
11-
- PYTHON: python3.8
12-
PYTHON_VERSION: 3.8
13-
PYTHON_PACKAGE: python38
14-
SQLITE_PACKAGE: py38-sqlite3
1511
- PYTHON: python3.9
1612
PYTHON_VERSION: 3.9
1713
PYTHON_PACKAGE: python39

.github/workflows/tests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ jobs:
124124
- name: macOS aarch64
125125
image: macos-14
126126
python-version:
127-
- "3.8"
128127
- "3.9"
129128
- "3.10"
130129
- "3.11"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Changelog = "https://python-poetry.org/history/"
2929

3030
# Requirements
3131
[tool.poetry.dependencies]
32-
python = "^3.8"
32+
python = "^3.9"
3333

3434
poetry-core = { git = "https://github.com/python-poetry/poetry-core.git", branch = "main" }
3535
build = "^1.2.1"
@@ -104,7 +104,7 @@ extend-exclude = [
104104
]
105105
fix = true
106106
line-length = 88
107-
target-version = "py38"
107+
target-version = "py39"
108108

109109
[tool.ruff.lint]
110110
extend-select = [

src/poetry/console/commands/env/remove.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from cleo.helpers import option
88

99
from poetry.console.commands.command import Command
10-
from poetry.utils._compat import is_relative_to
1110

1211

1312
if TYPE_CHECKING:
@@ -55,8 +54,8 @@ def handle(self) -> int:
5554
self.line(f"Deleted virtualenv: <comment>{venv.path}</comment>")
5655
if remove_all_envs or is_in_project:
5756
for venv in manager.list():
58-
if not is_in_project or is_relative_to(
59-
venv.path, self.poetry.pyproject_path.parent
57+
if not is_in_project or venv.path.is_relative_to(
58+
self.poetry.pyproject_path.parent
6059
):
6160
manager.remove_venv(venv.path)
6261
self.line(f"Deleted virtualenv: <comment>{venv.path}</comment>")

src/poetry/console/commands/init.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
from __future__ import annotations
22

3+
from collections.abc import Mapping
34
from contextlib import suppress
45
from pathlib import Path
56
from typing import TYPE_CHECKING
67
from typing import Any
78
from typing import ClassVar
8-
from typing import Dict
9-
from typing import Mapping
109
from typing import Union
1110

1211
from cleo.helpers import option
@@ -27,7 +26,7 @@
2726

2827
from poetry.repositories import RepositoryPool
2928

30-
Requirements = Dict[str, Union[str, Mapping[str, Any]]]
29+
Requirements = dict[str, Union[str, Mapping[str, Any]]]
3130

3231

3332
class InitCommand(Command):

src/poetry/inspection/info.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
from pathlib import Path
1010
from typing import TYPE_CHECKING
1111
from typing import Any
12-
from typing import Mapping
13-
from typing import Sequence
1412

1513
import pkginfo
1614

@@ -31,6 +29,8 @@
3129

3230
if TYPE_CHECKING:
3331
from collections.abc import Iterator
32+
from collections.abc import Mapping
33+
from collections.abc import Sequence
3434

3535
from packaging.metadata import RawMetadata
3636
from packaging.utils import NormalizedName
@@ -523,7 +523,7 @@ def from_path(cls, path: Path) -> PackageInfo:
523523
return cls.from_sdist(path=path)
524524

525525

526-
@functools.lru_cache(maxsize=None)
526+
@functools.cache
527527
def get_pep517_metadata(path: Path) -> PackageInfo:
528528
"""
529529
Helper method to use PEP-517 library to build and read package metadata.

src/poetry/mixology/version_solver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from typing import TYPE_CHECKING
88
from typing import Optional
9-
from typing import Tuple
109

1110
from poetry.core.packages.dependency import Dependency
1211

@@ -32,7 +31,7 @@
3231
_conflict = object()
3332

3433

35-
DependencyCacheKey = Tuple[
34+
DependencyCacheKey = tuple[
3635
str, Optional[str], Optional[str], Optional[str], Optional[str]
3736
]
3837

src/poetry/packages/direct_origin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from poetry.utils.cache import ArtifactCache
2323

2424

25-
@functools.lru_cache(maxsize=None)
25+
@functools.cache
2626
def _get_package_from_git(
2727
url: str,
2828
branch: str | None = None,

src/poetry/packages/package_collection.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from __future__ import annotations
22

33
from typing import TYPE_CHECKING
4-
from typing import List
54

65
from poetry.packages.dependency_package import DependencyPackage
76

@@ -13,7 +12,7 @@
1312
from poetry.core.packages.package import Package
1413

1514

16-
class PackageCollection(List[DependencyPackage]):
15+
class PackageCollection(list[DependencyPackage]):
1716
def __init__(
1817
self,
1918
dependency: Dependency,

src/poetry/plugins/plugin_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from functools import cached_property
1010
from pathlib import Path
1111
from typing import TYPE_CHECKING
12-
from typing import Sequence
1312

1413
import tomlkit
1514

@@ -30,6 +29,7 @@
3029

3130

3231
if TYPE_CHECKING:
32+
from collections.abc import Sequence
3333
from typing import Any
3434

3535
from cleo.io.io import IO

0 commit comments

Comments
 (0)