From ec8ee453218653d325a92af1cd9f2bfc2778a55e Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Sat, 3 Jun 2023 19:20:29 +0200 Subject: [PATCH] Remove deprecated code --- .../core/packages/constraints/__init__.py | 34 ------------------- src/poetry/core/semver/__init__.py | 10 ------ src/poetry/core/semver/empty_constraint.py | 6 ---- src/poetry/core/semver/exceptions.py | 6 ---- src/poetry/core/semver/helpers.py | 7 ---- src/poetry/core/semver/patterns.py | 18 ---------- src/poetry/core/semver/util.py | 6 ---- src/poetry/core/semver/version.py | 6 ---- src/poetry/core/semver/version_constraint.py | 6 ---- src/poetry/core/semver/version_range.py | 6 ---- .../core/semver/version_range_constraint.py | 6 ---- src/poetry/core/semver/version_union.py | 6 ---- 12 files changed, 117 deletions(-) delete mode 100644 src/poetry/core/packages/constraints/__init__.py delete mode 100644 src/poetry/core/semver/__init__.py delete mode 100644 src/poetry/core/semver/empty_constraint.py delete mode 100644 src/poetry/core/semver/exceptions.py delete mode 100644 src/poetry/core/semver/helpers.py delete mode 100644 src/poetry/core/semver/patterns.py delete mode 100644 src/poetry/core/semver/util.py delete mode 100644 src/poetry/core/semver/version.py delete mode 100644 src/poetry/core/semver/version_constraint.py delete mode 100644 src/poetry/core/semver/version_range.py delete mode 100644 src/poetry/core/semver/version_range_constraint.py delete mode 100644 src/poetry/core/semver/version_union.py diff --git a/src/poetry/core/packages/constraints/__init__.py b/src/poetry/core/packages/constraints/__init__.py deleted file mode 100644 index b6036da84..000000000 --- a/src/poetry/core/packages/constraints/__init__.py +++ /dev/null @@ -1,34 +0,0 @@ -from __future__ import annotations - -import warnings - -from poetry.core.constraints.generic import AnyConstraint -from poetry.core.constraints.generic import BaseConstraint -from poetry.core.constraints.generic import Constraint -from poetry.core.constraints.generic import EmptyConstraint -from poetry.core.constraints.generic import MultiConstraint -from poetry.core.constraints.generic import UnionConstraint -from poetry.core.constraints.generic import parse_constraint -from poetry.core.constraints.generic.parser import parse_single_constraint - - -warnings.warn( - ( - "poetry.core.packages.constraints is deprecated." - " Use poetry.core.constraints.generic instead." - ), - DeprecationWarning, - stacklevel=2, -) - - -__all__ = ( - "AnyConstraint", - "BaseConstraint", - "Constraint", - "EmptyConstraint", - "MultiConstraint", - "UnionConstraint", - "parse_constraint", - "parse_single_constraint", -) diff --git a/src/poetry/core/semver/__init__.py b/src/poetry/core/semver/__init__.py deleted file mode 100644 index be3955935..000000000 --- a/src/poetry/core/semver/__init__.py +++ /dev/null @@ -1,10 +0,0 @@ -from __future__ import annotations - -import warnings - - -warnings.warn( - "poetry.core.semver is deprecated. Use poetry.core.constraints.version instead.", - DeprecationWarning, - stacklevel=2, -) diff --git a/src/poetry/core/semver/empty_constraint.py b/src/poetry/core/semver/empty_constraint.py deleted file mode 100644 index 79371340b..000000000 --- a/src/poetry/core/semver/empty_constraint.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import EmptyConstraint - - -__all__ = ("EmptyConstraint",) diff --git a/src/poetry/core/semver/exceptions.py b/src/poetry/core/semver/exceptions.py deleted file mode 100644 index 7bb604253..000000000 --- a/src/poetry/core/semver/exceptions.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version.exceptions import ParseConstraintError - - -__all__ = ("ParseConstraintError",) diff --git a/src/poetry/core/semver/helpers.py b/src/poetry/core/semver/helpers.py deleted file mode 100644 index 912d1cd7d..000000000 --- a/src/poetry/core/semver/helpers.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version.parser import parse_constraint -from poetry.core.constraints.version.parser import parse_single_constraint - - -__all__ = ("parse_constraint", "parse_single_constraint") diff --git a/src/poetry/core/semver/patterns.py b/src/poetry/core/semver/patterns.py deleted file mode 100644 index 88cc2e5f7..000000000 --- a/src/poetry/core/semver/patterns.py +++ /dev/null @@ -1,18 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version.patterns import BASIC_CONSTRAINT -from poetry.core.constraints.version.patterns import CARET_CONSTRAINT -from poetry.core.constraints.version.patterns import COMPLETE_VERSION -from poetry.core.constraints.version.patterns import TILDE_CONSTRAINT -from poetry.core.constraints.version.patterns import TILDE_PEP440_CONSTRAINT -from poetry.core.constraints.version.patterns import X_CONSTRAINT - - -__all__ = ( - "COMPLETE_VERSION", - "CARET_CONSTRAINT", - "TILDE_CONSTRAINT", - "TILDE_PEP440_CONSTRAINT", - "X_CONSTRAINT", - "BASIC_CONSTRAINT", -) diff --git a/src/poetry/core/semver/util.py b/src/poetry/core/semver/util.py deleted file mode 100644 index 05d0b5898..000000000 --- a/src/poetry/core/semver/util.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import constraint_regions - - -__all__ = ("constraint_regions",) diff --git a/src/poetry/core/semver/version.py b/src/poetry/core/semver/version.py deleted file mode 100644 index 039c4d1b8..000000000 --- a/src/poetry/core/semver/version.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import Version - - -__all__ = ("Version",) diff --git a/src/poetry/core/semver/version_constraint.py b/src/poetry/core/semver/version_constraint.py deleted file mode 100644 index f6ffdbcee..000000000 --- a/src/poetry/core/semver/version_constraint.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import VersionConstraint - - -__all__ = ("VersionConstraint",) diff --git a/src/poetry/core/semver/version_range.py b/src/poetry/core/semver/version_range.py deleted file mode 100644 index 6b16b4aa1..000000000 --- a/src/poetry/core/semver/version_range.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import VersionRange - - -__all__ = ("VersionRange",) diff --git a/src/poetry/core/semver/version_range_constraint.py b/src/poetry/core/semver/version_range_constraint.py deleted file mode 100644 index df6f7e52f..000000000 --- a/src/poetry/core/semver/version_range_constraint.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import VersionRangeConstraint - - -__all__ = ("VersionRangeConstraint",) diff --git a/src/poetry/core/semver/version_union.py b/src/poetry/core/semver/version_union.py deleted file mode 100644 index ff8f46187..000000000 --- a/src/poetry/core/semver/version_union.py +++ /dev/null @@ -1,6 +0,0 @@ -from __future__ import annotations - -from poetry.core.constraints.version import VersionUnion - - -__all__ = ("VersionUnion",)