- Fully typed
RangeMap
and avoid complete iterations to find matches (#16)
- Delinting and package refresh.
- Moved collections into a package and declared as typed.
- Removed DictFilter.
- Require Python 3.8 or later.
Added Mask
, the inverse of a Projection
.
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
.
DictFilter
no longer accepts include_keys
and requires
include_pattern
as a keyword argument.
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+')
In Projection
, harmonize the implementation and optimize using
set
instead of tuple
.
DictFilter.__len__
no longer relies on the iterable. Improves
efficiency and fixes RecursionError
on PyPy (#12).
Made DictStack
mutable.
Added RangeMap.left
.
Revised DictFilter
:
- Fixed issue where
DictFilter.__contains__
would raise aKeyError
.- Relies heavily now on
collections.abc.Mapping
base class.
Packaging refresh.
Enrolled with Tidelift.
Fixed DictStack.__len__
and addressed recursion error on
PyPy in __getitem__
.
DictStack
now supports the following Mapping behaviors:
.items()
- casting to a dict
__contains__
(i.e. "x in stack")
Require Python 3.7 or later.
Add WeightedLookup
.
Add FreezableDefaultDict
.
Rely on PEP 420 for namespace package.
Refreshed packaging. Dropped dependency on six.
Require Python 3.6 or later.
Added pop_all
function.
Switch to pkgutil namespace technique
for the jaraco
namespace.
Fix DeprecationWarnings when referencing abstract base classes from collections module.
Refresh package metadata.
Fixed KeyError in BijectiveMap when a new value matched an existing key (but not the reverse). Now a ValueError is raised as intended.
Refresh packaging.
Added a Projection
class providing a much simpler
interface than DictFilter.
#3: Fixed less-than-equal and greater-than-equal comparisons
in Least
and Greatest
.
Added Least
and Greatest
classes, instances of
which always compare lesser or greater than all other
objects.
Fixed failure of KeyTransformingDict to transform keys
on calls to .get
.
Moved hosting to Github.
Restore Python 2.7 compatibility.
Add InstrumentedDict.
Conditionally require setup requirements.
Initial functionality taken from jaraco.util 10.8.