Priority Queue Dictionary Versions Save

A Pythonic indexed priority queue

v1.4.0

3 months ago

What's Changed

  • The deprecated module-level minpq and maxpq 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 a KeyError. (Note that Empty is derived from KeyError for subclass compatibility with Mapping.popitem and Mapping.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

v1.3.0

11 months ago

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:

  • Added popvalue method to mirror recent topvalue addition.
  • Added 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:

  • 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

Deprecations:

  • minpq and maxpq module-level functions are deprecated in favor of pqdict classmethods and will be removed in v1.4

v1.2.1

11 months ago

Provide typing support (#19) applying stub generated by @noamraph

v1.2.0

1 year ago

API changes

  • Added topvalue method (#17). By @ShivKJ

Maintenance

  • Replaced Travis CI with Github Actions.

v1.1.1

3 years ago

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.

v1.1.0

3 years ago

API changes

  • nlargest and nsmallest now support an optional key parameter (#10). By @espdev

v1.0.1

3 years ago

Maintenance

  • Dropped 3.3 support.
  • Future-proofed for upcoming collections import breakage #6 (@rocky).
  • Upgraded test suite from nose to pytest #7 (@rocky).