Skip to content

Commit

Permalink
Merge pull request #472 from more-itertools/version-8.6.0
Browse files Browse the repository at this point in the history
Version 8.6.0
  • Loading branch information
bbayles authored Oct 30, 2020
2 parents 16c626b + a8d3959 commit 4d2e1db
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 12 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Python iterables.
| | `substrings <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.substrings>`_, |
| | `substrings_indexes <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.substrings_indexes>`_, |
| | `stagger <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.stagger>`_, |
| | `windowed_complete <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.windowed_complete>`_, |
| | `pairwise <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.pairwise>`_ |
+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Augmenting | `count_cycle <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.count_cycle>`_, |
Expand Down Expand Up @@ -97,6 +98,8 @@ Python iterables.
| | `random_permutation <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.random_permutation>`_, |
| | `random_combination <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.random_combination>`_, |
| | `random_combination_with_replacement <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.random_combination_with_replacement>`_, |
| | `nth_product <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.nth_product>`_ |
| | `nth_permutation <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.nth_permutation>`_ |
| | `nth_combination <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.nth_combination>`_ |
+------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Wrapping | `always_iterable <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.always_iterable>`_, |
Expand Down
3 changes: 2 additions & 1 deletion docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,9 @@ These tools yield combinatorial arrangements of items from iterables.
.. autofunction:: random_permutation
.. autofunction:: random_combination
.. autofunction:: random_combination_with_replacement
.. autofunction:: nth_combination
.. autofunction:: nth_product
.. autofunction:: nth_permutation
.. autofunction:: nth_combination


Wrapping
Expand Down
16 changes: 15 additions & 1 deletion docs/versions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,23 @@ Version History
.. automodule:: more_itertools
:noindex:

8.5.0
8.6.0
-----

* New itertools
* :func:`all_unique` (thanks to brianmaissy)
* :func:`nth_product` and :func:`nth_permutation` (thanks to N8Brooks)

* Changes to existing itertools
* :func:`chunked` and :func:`sliced` now accept a ``strict`` parameter (thanks to shlomif and jtwool)

* Other changes
* Python 3.5 has reached its end of life and is no longer supported.
* Python 3.9 is officially supported.
* Various documentation fixes (thanks to timgates42)

8.5.0
-----

* New itertools
* :func:`windowed_complete` (thanks to MarcinKonowalczyk)
Expand Down
2 changes: 1 addition & 1 deletion more_itertools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .more import * # noqa
from .recipes import * # noqa

__version__ = '8.5.0'
__version__ = '8.6.0'
16 changes: 9 additions & 7 deletions more_itertools/more.py
Original file line number Diff line number Diff line change
Expand Up @@ -3431,10 +3431,11 @@ def windowed_complete(iterable, n):
(0, 1, 2) (3, 4, 5) (6,)
(0, 1, 2, 3) (4, 5, 6) ()
Notes:
* *n* must be at least 0 and most equal to the length of *iterable*.
* This function will exhaust *iterable* and store all its items.
Note that *n* must be at least 0 and most equal to the length of
*iterable*.
This function will exhaust the iterable and may require significant
storage.
"""
if n < 0:
raise ValueError('n must be >= 0')
Expand All @@ -3457,11 +3458,11 @@ def all_unique(iterable, key=None):
Returns ``True`` if all the elements of *iterable* are unique (no two
elements are equal).
If a *key* function is specified, it will be used to preprocess the
elements of the iterable before comparing.
>>> all_unique('ABCB')
False
If a *key* function is specified, it will be used to make comparisons.
>>> all_unique('ABCb')
True
>>> all_unique('ABCb', str.lower)
Expand Down Expand Up @@ -3489,7 +3490,8 @@ def all_unique(iterable, key=None):

def nth_product(index, *args):
"""Equivalent to ``list(product(*args))[index]``.
The products of **args* can be ordered lexicographically.
The products of *args* can be ordered lexicographically.
:func:`nth_product` computes the product at sort position *index* without
computing the previous products.
"""
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 8.5.0
current_version = 8.6.0
commit = True
tag = False
files = more_itertools/__init__.py
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py{36,37,38}
envlist = py{36,37,38,39}

[testenv]
commands = {envpython} -m unittest -v {posargs}

0 comments on commit 4d2e1db

Please sign in to comment.