Repoze-folder

Latest version: v1.0

Safety actively analyzes 629503 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.4

------------------

- 100% test coverage.

- Add an ``add`` method that does what ``__setitem__`` does. It also
provides a flag named ``send_events``, which by default is True. If
it is False when ``add` is called, folder events
(``IObjectWillBeAddedEvent`` and ``IObjectAddedEvent``) will not be
sent.

- Add a ``remove`` method that does what ``__delitem__`` does. It
also provides a flag named ``send_events``, which by default is
True. If it is False when ``add` is called, folder events
(``IObjectWillBeRemovedEvent`` and ``IObjectRemovedEvent``) will not
be sent.

0.3.5

------------------

- Add a ``BTrees.Length`` object to folders that don't already have
one during ``__setitem__`` and ``__delitem__`` (this is an
"evolution" step; having a Length object is useful for performance
reasons).

0.3.4

------------------

- Fix backwards compatibility foul (near
``self._num_objects.change(1)``: ``AttributeError: 'NoneType' object
has no attribute 'change'``).

0.3.3

------------------

- Add tests for ``unicodify`` and make docs about to-Unicode
convenience conversion from byte strings (and error messages)
slightly clearer.

- Now no matter what is passed to the folder as constructor, we
try to turn it into an OOBTree (before it was set as ``data`` on the
instance without any conversion).

- A ``__len__`` method was added to ``repoze.folder.Folder``
instances. It returns the number of subobjects in the folder.

- A ``_num_objects`` attribute is set onto newly created
``repoze.folder.Folder`` instances. This is a
``BTrees.Length.Length`` object. We manage this length object in
order to supply a return value for the ``__len__`` method instead of
using the folder's underlying OOBTree.__len__ method (querying a
btree for length can be arbitrarily expensive). A ``_num_objects``
class attribute was added equalling None to provide a backward
compatibility cue for already-persisted objects which do not have a
meaningful Length attribute.

- The implementation no longer concerns itself with advertising a
modified event (``IObjectModifiedEvent``).

0.3.2

------------------

- Yeah. 0.3.1 was another brownbag, as we need to try to decode ASCII
to unicode before we use the utf-8 decoding.

0.3.1

------------------

- Mistakenly removed ``__parent__`` and ``__name__`` attributes from
folder implementation, making 0.3 a brownbag.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.