Skip to content

Commit

Permalink
docs: Update docs and release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
nvictus committed Jul 1, 2023
1 parent 1d91b44 commit d7fec5e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
13 changes: 7 additions & 6 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ Release Notes
1.3.0 (2023-07-01)
++++++++++++++++++

This release drops support for Python versions below 3.7
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 recent ``topvalue`` addition.
- Added ``default`` argument to ``top`` and support for ``default`` using ``pop`` with PQ semantics. This value is returned when the collection is empty.
- 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 <https://github.com/aqeelat>_`.
- Migrate to pyproject.toml
- Linting and static type checking in CI
- 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 <https://github.com/aqeelat>`_.
- Migrate to pyproject.toml.
- Linting and static type checking in CI.


1.2.1 (2023-06-26)
Expand Down
14 changes: 7 additions & 7 deletions docs/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ A `priority queue <http://en.wikipedia.org/wiki/Priority_queue>`__ allows you to

The priority queue is implemented as a binary heap of (key, priority value) pairs, which supports:

- O(1) search for the item with highest priority
* O(1) search for the item with highest priority

- O(log n) removal of the item with highest priority
* O(log n) removal of the item with highest priority

- O(log n) insertion of a new item
* O(log n) insertion of a new item

An internal index maps elements to their location in the heap and is kept up to date as the heap is manipulated. As a result, pqdict also supports:

- O(1) lookup of any item by key
* O(1) lookup of any item by key

- O(log n) removal of any item
* O(log n) removal of any item

- O(log n) updating of any item's priority level
* O(log n) updating of any item's priority level

Indexed priority queues are useful in applications where priorities of already enqueued items may frequently change (e.g., schedulers, optimization algorithms, simulations, etc.).

Expand Down Expand Up @@ -123,7 +123,7 @@ Views and regular iteration don't affect the heap, but the output is **unsorted*
KeyError
.. note::
.. warning::
**Value mutability**. If you use mutable objects as values in a ``pqdict``, changes to the state of those objects can break the priority queue. If this does happen, the data structure can be repaired by calling ``pq.heapify()``. (But you probably shouldn't be using mutable values in the first place.)

.. note::
Expand Down

0 comments on commit d7fec5e

Please sign in to comment.