Release Notes
1.4.0 (2024-02-14)
- API changes:
The deprecated module-level
minpq
andmaxpq
have been removed in favor of same-named classmethods introduced in v1.3.0 (#24)Introduce a distinct
Empty
exception for operations that attempt to remove items from an empty pqdict, instead of raising aKeyError
. (Note thatEmpty
is derived fromKeyError
for subclass compatibility withMapping.popitem
andMapping.clear
.) (#24)Make internal heap nodes immutable and fast copy as originally proposed by @palkeo in #14
- Maintenance:
Factored out indexed heap operations to reduce redundancy
Better docstrings and type annotations
Full Changelog: https://github.com/nvictus/pqdict/compare/v1.3.0…v1.4.0
1.3.0 (2023-07-01)
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.
- API changes:
Added
popvalue
method to mirror recenttopvalue
addition.Added
default
argument totop
and support fordefault
usingpop
with PQ semantics. If given, this value is returned when the collection is empty.minpq
andmaxpq
module-level functions are deprecated in favor of pqdict classmethods and will be removed in v1.4.
- Maintenance:
Dropped support for Python 2.7, 3.4, 3.5, and 3.6 (#22).
Inlined type annotations and removed stub file. Thanks for advice from @aqeelat.
Migrate to pyproject.toml.
Linting and static type checking in CI.
1.2.1 (2023-06-26)
- Typing:
Provided typing support (#19) applying stub generated by @noamraph
- Maintenance:
Replaced CI badge.
Dropped Python 2.7 from CI, no longer supported there. Next minor release of pqdict will no longer support Python 2.
1.2.0 (2022-10-14)
- API changes:
Added
topvalue
method (#17). By @ShivKJ
- Maintenance:
Replaced Travis CI with Github Actions.
1.1.1 (2020-09-21)
- Maintenance:
Performance of
copy
improved by avoiding re-heapifying (#12). By @palkeo.Removed redundant heapify call in constructor.
Removed unused
node_factory
kwargs.Formatting with black.
1.1.0 (2020-08-21)
- API changes:
nlargest
andnsmallest
now support an optionalkey
parameter (#10). By Eugene Prilepin.
1.0.1 (2020-07-12)
- Maintenance:
Dropped 3.3 support.
Future-proofed for upcoming collections import breakage (#6). By R. Bernstein.
Upgraded test suite from nose to pytest (#7). By R. Bernstein.
1.0.0 (2015-09-02)
Stable release.
Supporting 2.7+, 3.3+ and pypy. Dropped 3.2 support.
0.6 (2015-08-31)
- Conceptual changes:
Clearer terminology in API and documentation (e.g., value vs. priority key).
Functional philosophy: pqdict accepts optional priority key function and precedence function.
- API changes:
PQDict name is deprecated.
Several backwards-incompatible changes to fit the new conceptual model.
Heapsort iterators (iterkeys, itervalues, iteritems) were renamed (popkeys, popvalues, popitems). In Python 2, the old names persist as regular iterators.
Dropped module functions except for nlargest and nsmallest.
- Docs:
Revised and updated
Switch to RTD theme
0.5 (2014-02-09)
- API changes:
PQDict.pq_type property: ‘min’, ‘max’ or ‘custom’
fromkeys keyword ‘sort_by’ is replaced with ‘rank_by’
- Bug fixes:
turns out PQDict.create and sort_by_value were broken! (oops!)
consume: the collector was comparing the wrong pkeys
- Improved test coverage:
improved coverage of unit tests
using travis-ci
0.4 (2013-12-08)
- API changes:
renamed peek() to top()
semantics of top, pop, vs. topitem, popitem, *item, now hopefully more consistent
prioritykeys() and iterprioritykeys() are aliases for values() and itervalues()
new methods: pushpopitem, swap_priority, replace_key
- New functions:
nsmallest, nlargest
consume
Added Sphinx documentation
0.3 (2013-07-23)
- Bug fixes:
off-by one error caused the queue to not reheapify properly in a special case
0.2 (2013-07-18)
- Bug fixes:
Fixed error in __all__ list
0.1 (2013-07-17)
First release.