From 8558f0cb94c11d5d1f901900d4a6ea8a8167bd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Randy=20D=C3=B6ring?= <30527984+radoering@users.noreply.github.com> Date: Sat, 4 Feb 2023 15:45:43 +0100 Subject: [PATCH] chore: remove deprecated repository modules --- src/poetry/repositories/__init__.py | 3 +-- src/poetry/repositories/cached.py | 18 ------------------ src/poetry/repositories/http.py | 17 ----------------- src/poetry/repositories/pool.py | 29 ----------------------------- tests/installation/test_executor.py | 2 +- 5 files changed, 2 insertions(+), 67 deletions(-) delete mode 100644 src/poetry/repositories/cached.py delete mode 100644 src/poetry/repositories/http.py delete mode 100644 src/poetry/repositories/pool.py diff --git a/src/poetry/repositories/__init__.py b/src/poetry/repositories/__init__.py index 78c59562ab8..d923a9691aa 100644 --- a/src/poetry/repositories/__init__.py +++ b/src/poetry/repositories/__init__.py @@ -1,8 +1,7 @@ from __future__ import annotations -from poetry.repositories.pool import Pool from poetry.repositories.repository import Repository from poetry.repositories.repository_pool import RepositoryPool -__all__ = ["Pool", "Repository", "RepositoryPool"] +__all__ = ["Repository", "RepositoryPool"] diff --git a/src/poetry/repositories/cached.py b/src/poetry/repositories/cached.py deleted file mode 100644 index 2686cf7db90..00000000000 --- a/src/poetry/repositories/cached.py +++ /dev/null @@ -1,18 +0,0 @@ -from __future__ import annotations - -import warnings - - -from poetry.repositories.cached_repository import ( # isort: skip # nopycln: import # noqa: E501, F401 - CachedRepository, -) - -warnings.warn( - ( - "Module poetry.repositories.cached is renamed and scheduled for removal in" - " poetry release 1.4.0. Please migrate to" - " poetry.repositories.cached_repository." - ), - DeprecationWarning, - stacklevel=2, -) diff --git a/src/poetry/repositories/http.py b/src/poetry/repositories/http.py deleted file mode 100644 index 94e89980b1f..00000000000 --- a/src/poetry/repositories/http.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import annotations - -import warnings - - -from poetry.repositories.http_repository import ( # isort: skip # nopycln: import # noqa: E501, F401 - HTTPRepository, -) - -warnings.warn( - ( - "Module poetry.repositories.http is renamed and scheduled for removal in poetry" - " release 1.4.0. Please migrate to poetry.repositories.http_repository." - ), - DeprecationWarning, - stacklevel=2, -) diff --git a/src/poetry/repositories/pool.py b/src/poetry/repositories/pool.py deleted file mode 100644 index 48ccac36e75..00000000000 --- a/src/poetry/repositories/pool.py +++ /dev/null @@ -1,29 +0,0 @@ -from __future__ import annotations - -import warnings - -from typing import TYPE_CHECKING - -from poetry.repositories.repository_pool import RepositoryPool - - -if TYPE_CHECKING: - from poetry.repositories.repository import Repository - - -class Pool(RepositoryPool): - def __init__( - self, - repositories: list[Repository] | None = None, - ignore_repository_names: bool = False, - ) -> None: - warnings.warn( - ( - "Object Pool from poetry.repositories.pool is renamed and scheduled for" - " removal in poetry release 1.4.0. Please migrate to RepositoryPool" - " from poetry.repositories.repository_pool." - ), - DeprecationWarning, - stacklevel=2, - ) - super().__init__(repositories, ignore_repository_names) diff --git a/tests/installation/test_executor.py b/tests/installation/test_executor.py index 9ede4a63c5f..b0e02443042 100644 --- a/tests/installation/test_executor.py +++ b/tests/installation/test_executor.py @@ -30,7 +30,7 @@ from poetry.installation.operations import Uninstall from poetry.installation.operations import Update from poetry.installation.wheel_installer import WheelInstaller -from poetry.repositories.pool import RepositoryPool +from poetry.repositories.repository_pool import RepositoryPool from poetry.utils.env import MockEnv from tests.repositories.test_pypi_repository import MockRepository