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

DiskBackedContent: use a different approach for deprecation

It turns out that calling @deprecated on Content alter the class, and
any instantion of "Content" will be wrongly marked as deprecated… So use
a different approach too preserve compatibility (and we won't keep it
long).
parent e3abfe5a
No related branches found
No related tags found
No related merge requests found
......@@ -71,9 +71,9 @@ class FromDiskType(model._StringCompatibleEnum):
# them a hand to let them handle compatibility in a smoother way.
#
# Remove this compatibility trick once this user have been migrated
DiskBackedContent = deprecated(
version="v6.13.0", reason="Use model.Content.object_type instead"
)(model.Content)
@deprecated(version="v6.13.0", reason="Use model.Content.object_type instead")
def DiskBackedContent(*args, **kwargs):
return model.Content(*args, **kwargs)
@attr.s(frozen=True, slots=True)
......
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