Skip to content

Commit

Permalink
Merge pull request #789 from more-itertools/version-10.2.0
Browse files Browse the repository at this point in the history
Version 10.2.0
  • Loading branch information
bbayles committed Jan 8, 2024
2 parents 3e94640 + 6700628 commit 1e0e662
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 10 deletions.
6 changes: 5 additions & 1 deletion README.rst
Expand Up @@ -97,6 +97,8 @@ Python iterables.
| | `rstrip <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.rstrip>`_, |
| | `filter_except <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.filter_except>`_, |
| | `map_except <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.map_except>`_, |
| | `filter_map <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.filter_map>`_, |
| | `iter_suppress <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.iter_suppress>`_, |
| | `nth_or_last <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.nth_or_last>`_, |
| | `unique_in_window <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.unique_in_window>`_, |
| | `before_and_after <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.before_and_after>`_, |
Expand Down Expand Up @@ -160,7 +162,9 @@ Python iterables.
| | `sieve <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.sieve>`_, |
| | `factor <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.factor>`_, |
| | `matmul <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.matmul>`_, |
| | `sum_of_squares <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.sum_of_squares>`_ |
| | `sum_of_squares <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.sum_of_squares>`_, |
| | `totient <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.totient>`_, |
| | `reshape <https://more-itertools.readthedocs.io/en/stable/api.html#more_itertools.reshape>`_ |
+------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+


Expand Down
2 changes: 2 additions & 0 deletions docs/api.rst
Expand Up @@ -307,3 +307,5 @@ Others
.. autofunction:: factor
.. autofunction:: matmul
.. autofunction:: sum_of_squares
.. autofunction:: totient
.. autofunction:: reshape
7 changes: 2 additions & 5 deletions docs/conf.py
Expand Up @@ -126,7 +126,7 @@
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation".
Expand All @@ -149,10 +149,7 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

html_context = {
# https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
'css_files': ['_static/theme_overrides.css'],
}
html_css_files = ["_static/theme_overrides.css"]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
23 changes: 23 additions & 0 deletions docs/versions.rst
Expand Up @@ -5,6 +5,29 @@ Version History
.. automodule:: more_itertools
:noindex:

10.2.0
------

* New functions
* :func:`iter_suppress` (thanks to jaraco, pochmann, and rhettinger)
* :func:`filter_map` (thanks to struktured)
* :func:`classify_unique` (thanks to haukex)
* :func:`totient` (from the itertools docs)
* :func:`reshape` (from the itertools docs)

* Changes to existing functions
* :func:`factor`, :func:`iter_index`, :func:`sieve`, and :func:`unique_justseen` were updated to match the itertools docs
* :func:`first` was was optimized (thanks to pochmann)
* :func:`takewhile_inclusive` was was refactored (thanks to eltoder)
* :func:`combination_with_replacement_index` was was optimized (thanks to elliotwutingfeng and rhettinger)
* :func:`nth_permutation`, :func:`nth_combination_with_replacement`, :func:`combination_index`, and :func:`combination_with_replacement_index` were optimized (thanks to rhettinger)
* :func:`batched` now accepts a `strict` argument (adapted from itertools docs)
* :func:`time_limited` was improved for Windows (thanks to haukex)

* Other changes
* Several typing updates were made (thanks to obaltian and ilai-deutel)
* Some documentation issues were fixed (thanks to F-park, DimitriPapadopoulos, peterbygrave, shuuji3, eltoder, and homeworkprod)

10.1.0
------

Expand Down
2 changes: 1 addition & 1 deletion more_itertools/__init__.py
Expand Up @@ -3,4 +3,4 @@
from .more import * # noqa
from .recipes import * # noqa

__version__ = '10.1.0'
__version__ = '10.2.0'
4 changes: 2 additions & 2 deletions more_itertools/more.py
Expand Up @@ -4643,8 +4643,8 @@ def iter_suppress(iterable, *exceptions):


def filter_map(func, iterable):
"""Apply *func* to every element of *iterable*, yielding only those
which are not ``None``.
"""Apply *func* to every element of *iterable*, yielding only those which
are not ``None``.
>>> elems = ['1', 'a', '2', 'b', '3']
>>> list(filter_map(lambda s: int(s) if s.isnumeric() else None, elems))
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 10.1.0
current_version = 10.2.0
commit = True
tag = False
files = more_itertools/__init__.py
Expand Down

0 comments on commit 1e0e662

Please sign in to comment.