A Pythonic indexed priority queue
minpq
and maxpq
have been removed in favor of same-named classmethods introduced in v1.3.0 (#24)Empty
exception for operations that attempt to remove items from an empty pqdict, instead of raising a KeyError
. (Note that Empty
is derived from KeyError
for subclass compatibility with Mapping.popitem
and Mapping.clear
.) (#24)Full Changelog: https://github.com/nvictus/pqdict/compare/v1.3.0...v1.4.0
This minor release drops support for Python versions <3.7
In turn, we now provide full static type annotations and have migrated to modern package build tools.
New features:
popvalue
method to mirror recent topvalue
addition.default
argument to top
and support for default
using pop
with PQ semantics. If given, this value is returned when the collection is empty.Maintenance:
Deprecations:
minpq
and maxpq
module-level functions are deprecated in favor of pqdict
classmethods and will be removed in v1.4Provide typing support (#19) applying stub generated by @noamraph
API changes
topvalue
method (#17). By @ShivKJMaintenance
Maintenance
copy
improved by avoiding re-heapifying (#12). By @palkeonode_factory
kwargs.API changes
nlargest
and nsmallest
now support an optional key
parameter (#10). By @espdev