forked from pool/python-packaging
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
Index: packaging-21.2/packaging/specifiers.py
|
|
===================================================================
|
|
--- packaging-21.2.orig/packaging/specifiers.py
|
|
+++ packaging-21.2/packaging/specifiers.py
|
|
@@ -270,12 +270,6 @@ class LegacySpecifier(_IndividualSpecifi
|
|
def __init__(self, spec: str = "", prereleases: Optional[bool] = None) -> None:
|
|
super().__init__(spec, prereleases)
|
|
|
|
- warnings.warn(
|
|
- "Creating a LegacyVersion has been deprecated and will be "
|
|
- "removed in the next major release",
|
|
- DeprecationWarning,
|
|
- )
|
|
-
|
|
def _coerce_version(self, version: UnparsedVersion) -> LegacyVersion:
|
|
if not isinstance(version, LegacyVersion):
|
|
version = LegacyVersion(str(version))
|
|
Index: packaging-21.2/packaging/version.py
|
|
===================================================================
|
|
--- packaging-21.2.orig/packaging/version.py
|
|
+++ packaging-21.2/packaging/version.py
|
|
@@ -108,12 +108,6 @@ class LegacyVersion(_BaseVersion):
|
|
self._version = str(version)
|
|
self._key = _legacy_cmpkey(self._version)
|
|
|
|
- warnings.warn(
|
|
- "Creating a LegacyVersion has been deprecated and will be "
|
|
- "removed in the next major release",
|
|
- DeprecationWarning,
|
|
- )
|
|
-
|
|
def __str__(self) -> str:
|
|
return self._version
|
|
|