From 3ca784c6d289a6d72624ac6ee15d782c9d0aaa0f Mon Sep 17 00:00:00 2001 From: Daniel Hornung <d.hornung@indiscale.com> Date: Wed, 18 Sep 2024 14:42:27 +0200 Subject: [PATCH] MAINT: Added deprecation warning to DropOffBox related options. --- src/linkahead/common/models.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index a8144286..0cc0f11e 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -2279,12 +2279,12 @@ class File(Record): server's "caosroot" file system. @param file: A local path or python file object. The file designated by this argument will be uploaded to the server via HTTP. - @param pickup: A file/folder in the DropOffBox (the server will move that + @param pickup: Deprecated: A file/folder in the DropOffBox (the server will move that file into its "caosroot" file system). @param thumbnail: (Local) filename to a thumbnail for this file. @param properties: A list of properties for this file record. @todo is this implemented? - @param from_location: Deprecated, use `pickup` instead. + @param from_location: Deprecated x 2, use `pickup` instead. """ @@ -2311,10 +2311,12 @@ class File(Record): self.thumbnail = thumbnail self.pickup = pickup + if self.pickup is not None: + warn(DeprecationWarning("The DropOffBox is deprecated, do not use `pickup`.")) if from_location is not None: warn(DeprecationWarning( - "Param `from_location` is deprecated, use `pickup instead`.")) + "Param `from_location` is deprecated, as everything DropOffBox related.")) if self.pickup is None: self.pickup = from_location -- GitLab