diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b792cc1fd53e5ccfb54b9d0d84ff248a3eb048d..78b4b206715e6a0812f41b2b1dbdb15c5d634399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed ### +- `DropOffBox` class and related parameters (`pickup` for file uploading). + ### Fixed ### ### Security ### diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index c4b4d15ee77ae5b5f6de1cea8e52000cfa659801..6683ed112d253031f7dd0914a00c877ca7724e68 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -358,17 +358,6 @@ class Entity: def file(self, new_file): self.__file = new_file - @property - def pickup(self): - if self.__pickup is not None or self._wrapped_entity is None: - return self.__pickup - - return self._wrapped_entity.pickup - - @pickup.setter - def pickup(self, new_pickup): - self.__pickup = new_pickup - def grant( self, realm: Optional[str] = None, @@ -2263,8 +2252,7 @@ class File(Record): """This class represents LinkAhead's file entities. For inserting a new file to the server, `path` gives the new location, and - (exactly?) one of `file` and `pickup` should (must?) be given to specify the - source of the file. + `file` specifies the source of the file. Symlinking from the "extroot" file system is not supported by this API yet, it can be done manually using the `InsertFilesInDir` flag. For sample code, @@ -2279,13 +2267,9 @@ 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: 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 x 2, use `pickup` instead. - """ def __init__( @@ -2295,9 +2279,7 @@ class File(Record): description: Optional[str] = None, # @ReservedAssignment path: Optional[str] = None, file: Union[str, TextIO, None] = None, - pickup: Optional[str] = None, # @ReservedAssignment thumbnail: Optional[str] = None, - from_location=None, ): Record.__init__(self, id=id, name=name, description=description) self.role = "File" @@ -2310,17 +2292,6 @@ class File(Record): self.file = file 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, as everything DropOffBox related.")) - - if self.pickup is None: - self.pickup = from_location - def to_xml( self, xml: Optional[etree._Element] = None, @@ -3975,8 +3946,6 @@ class Container(list): if hasattr(entity, '_upload') and entity._upload is not None: entity_xml.set("upload", entity._upload) - elif hasattr(entity, 'pickup') and entity.pickup is not None: - entity_xml.set("pickup", entity.pickup) insert_xml.append(entity_xml) @@ -4149,8 +4118,6 @@ class Container(list): if hasattr(entity, '_upload') and entity._upload is not None: entity_xml.set("upload", entity._upload) - elif hasattr(entity, 'pickup') and entity.pickup is not None: - entity_xml.set("pickup", entity.pickup) insert_xml.append(entity_xml) if len(self) > 0 and len(insert_xml) < 1: