Skip to content

Commit

Permalink
refactor: deprecate poetry.core.packages.constraints and poetry.core.…
Browse files Browse the repository at this point in the history
…semver
  • Loading branch information
radoering committed Sep 24, 2022
1 parent 9a67537 commit 01de337
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/poetry/core/packages/constraints/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from __future__ import annotations

import warnings


warnings.warn(
"poetry.core.packages.constraints is deprecated."
" Use poetry.core.constraints.generic instead.",
DeprecationWarning,
stacklevel=2,
)

from poetry.core.constraints.generic import * # noqa: E402, F401, F403
10 changes: 10 additions & 0 deletions src/poetry/core/semver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from __future__ import annotations

import warnings


warnings.warn(
"poetry.core.semver is deprecated. Use poetry.core.constraints.version instead.",
DeprecationWarning,
stacklevel=2,
)
6 changes: 6 additions & 0 deletions src/poetry/core/semver/empty_constraint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import EmptyConstraint


__all__ = ["EmptyConstraint"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version.exceptions import ParseConstraintError


__all__ = ["ParseConstraintError"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import parse_constraint


__all__ = ["parse_constraint"]
18 changes: 18 additions & 0 deletions src/poetry/core/semver/patterns.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
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",
]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import constraint_regions


__all__ = ["constraint_regions"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import Version


__all__ = ["Version"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/version_constraint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import VersionConstraint


__all__ = ["VersionConstraint"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/version_range.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import VersionRange


__all__ = ["VersionRange"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/version_range_constraint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import VersionRangeConstraint


__all__ = ["VersionRangeConstraint"]
6 changes: 6 additions & 0 deletions src/poetry/core/semver/version_union.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from __future__ import annotations

from poetry.core.constraints.version import VersionUnion


__all__ = ["VersionUnion"]

0 comments on commit 01de337

Please sign in to comment.