History#

v5.0.1#

12 Apr 2024

Bugfixes#

  • Delinting and package refresh.

v5.0.0#

09 Dec 2023

Features#

  • Moved collections into a package and declared as typed.

Deprecations and Removals#

  • Removed DictFilter.

v4.3.0#

25 Jun 2023

Features#

  • Require Python 3.8 or later.

v4.2.0#

01 Jun 2023

Added Mask, the inverse of a Projection.

v4.1.0#

06 Apr 2023

Projection now accepts an iterable or callable or pattern for matching keys.

Projection now retains order of keys from the underlying mapping.

DictFilter is now deprecated in favor of Projection.

v4.0.0#

28 Mar 2023

DictFilter no longer accepts include_keys and requires include_pattern as a keyword argument.

v3.11.0#

28 Mar 2023

In DictFilter, deprecated include_keys parameter and usage without include_pattern. Future versions will honor include_pattern as a required keyword argument. All other uses are deprecated. For uses that currently rely on include_keys, use Projection instead/in addition. For example, instead of:

filtered = DictFilter(orig, include_keys=['a'], include_pattern='b+')

Use:

filtered = DictFilter(Projection(['a'], orig), include_pattern='b+')

v3.10.0#

28 Mar 2023

In Projection, harmonize the implementation and optimize using set instead of tuple.

v3.9.0#

22 Mar 2023

DictFilter.__len__ no longer relies on the iterable. Improves efficiency and fixes RecursionError on PyPy (#12).

v3.8.0#

06 Nov 2022

Made DictStack mutable.

v3.7.0#

29 Oct 2022

Added RangeMap.left.

v3.6.0#

23 Oct 2022

Revised DictFilter:

  • Fixed issue where DictFilter.__contains__ would raise a KeyError.

  • Relies heavily now on collections.abc.Mapping base class.

v3.5.2#

14 Jul 2022

Packaging refresh.

Enrolled with Tidelift.

v3.5.1#

05 Jan 2022

Fixed DictStack.__len__ and addressed recursion error on PyPy in __getitem__.

v3.5.0#

03 Jan 2022

DictStack now supports the following Mapping behaviors:

  • .items()

  • casting to a dict

  • __contains__ (i.e. “x in stack”)

Require Python 3.7 or later.

v3.4.0#

11 Aug 2021

Add WeightedLookup.

v3.3.0#

28 Mar 2021

Add FreezableDefaultDict.

v3.2.0#

10 Feb 2021

Rely on PEP 420 for namespace package.

v3.1.0#

27 Dec 2020

Refreshed packaging. Dropped dependency on six.

v3.0.0#

19 Dec 2019

Require Python 3.6 or later.

2.1#

13 Oct 2019

Added pop_all function.

2.0#

01 Jan 2019

Switch to pkgutil namespace technique for the jaraco namespace.

1.6.0#

18 Oct 2018

Fix DeprecationWarnings when referencing abstract base classes from collections module.

1.5.3#

07 Mar 2018

Refresh package metadata.

1.5.2#

25 Oct 2017

Fixed KeyError in BijectiveMap when a new value matched an existing key (but not the reverse). Now a ValueError is raised as intended.

1.5.1#

09 Feb 2017

Refresh packaging.

1.5#

09 Sep 2016

Added a Projection class providing a much simpler interface than DictFilter.

1.4.1#

05 Aug 2016

#3: Fixed less-than-equal and greater-than-equal comparisons in Least and Greatest.

1.4#

06 Jul 2016

Added Least and Greatest classes, instances of which always compare lesser or greater than all other objects.

1.3.2#

18 Feb 2016

Fixed failure of KeyTransformingDict to transform keys on calls to .get.

1.3#

20 Nov 2015

Moved hosting to Github.

1.2.2#

19 Nov 2015

Restore Python 2.7 compatibility.

1.2#

18 Nov 2015

Add InstrumentedDict.

1.1#

26 Feb 2015

Conditionally require setup requirements.

1.0#

15 Feb 2015

Initial functionality taken from jaraco.util 10.8.