Skip to content
Snippets Groups Projects
Commit 34113bc0 authored by Pierre-Yves David's avatar Pierre-Yves David Committed by vlorentz
Browse files

enum-deprecation: stop wrongly using deprecated

As for the previous commit, using deprecated actually change the source
Class leading all usage to raise deprecation warning. So we have to
remove the deprecated and keep the compatibility silently for a small
while.
parent c8ef4083
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,6 @@ from attr._make import _AndValidator
from attr.validators import and_
from attrs_strict import AttributeTypeError
import dateutil.parser
from deprecated import deprecated
import iso8601
from typing_extensions import Final
......@@ -987,9 +986,10 @@ class SnapshotTargetType(Enum):
return f"SnapshotTargetType.{self.name}"
TargetType = deprecated(version="v6.13.0", reason="Use model.SnapshotTargetType")(
SnapshotTargetType
)
# Remove this compatibility trick once all user have been migrated.
#
# We cannot use @deprecated as this would modify SnapshotTargetType directly
TargetType = SnapshotTargetType
class ReleaseTargetType(Enum):
......@@ -1005,9 +1005,10 @@ class ReleaseTargetType(Enum):
return f"ReleaseTargetType.{self.name}"
ObjectType = deprecated(version="v6.13.0", reason="Use model.ReleaseTargetType")(
ReleaseTargetType
)
# Remove this compatibility trick once all user have been migrated.
#
# We cannot use @deprecated as this would modify SnapshotTargetType directly
ObjectType = ReleaseTargetType
@attr.s(frozen=True, slots=True, field_transformer=optimize_all_validators)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment