pypi more-itertools 11.0.0
Version 11.0.0

latest release: 11.0.1
6 hours ago

Potentially breaking changes

  • Python 3.9 support was dropped, since it went EOL on 2025-10-31
  • callback_iter is deprecated. It will be removed in a future major release.
  • iequals no longer returns True when called with ([], [ANY]) (thanks to rhettinger and pochmann3)
  • The pred argument for locate and replace must now be able to
    handle a variable number of arguments. See their docstrings for details. (thanks to veeceey, james-wasson, and pochmann3)
  • unique_everseen now raises TypeError when input elements are not hashable.
    The silent fallback mechanism for unhashable inputs has been removed. (thanks to rhettinger and karlicoss)
  • windowed now raises ValueError when given a window size of 0 (thanks to rhettinger and brevzin)
  • Parameter names for flatten, iter_except, repeatfunc, prepend, transpose,
    and sum_of_squares have been changed. Code that uses these functions will need to be updated if it
    uses keywords for positional arguments. (thanks to rhettinger)

New functions

  • concurrent_tee: similar to tee, but with guaranteed threading
    semantics (thanks to rhettinger)
  • random_derangement: returns a random derangement of elements from an
    iterable (thanks to rhettinger)
  • running_mean: yields the mean of values in an iterable, or in a sliding
    window (thanks to rhettinger)
  • running_statistics: provides statistics for the values in an iterable, or
    in a sliding window (thanks to rhettinger)
  • serialize: wraps a non-concurrent iterator with a lock to enforce
    sequential access (thanks to rhettinger)
  • synchronized: wraps an iterator-returning callable to make its iterators
    thread-safe (thanks to rhettinger)
  • sized_iterator: wraps an iterable with a known length and implements __len__ (thanks to assaf127)

Changes to existing functions

  • The type hints for always_iterable were improved (thanks to rhettinger and maltevesper)
  • A potential bug in callback_iter was fixed
  • A bug in exactly_n's handling of negative arguments was fixed (thanks to rhettinger)
  • extract`` now accepts a monotonic` argument for improved performance (thanks to rhettinger)
  • A bug in numeric_range's handling of negative steps was fixed (thanks to bysiber)
  • grouper implementation was updated to match the itertools docs (thanks to rhettinger)
  • nth_product, product_index, gray_product,
    partial_product, nth_product, product_index, and
    random_product now accept a repeat keyword argument (thanks to rhettinger)
  • powerset_of_sets can now construct frozenset instances (thanks to rhettinger)
  • The type hints for stagger were improved (thanks to nathanjmcdougall)
  • Memory efficiency was improved for partition was improved (thanks to rhettinger and yueyinqiu)
  • Performance for the functions count_cycle, difference,
    random_product, was improved nth_combination, nth_combination_with_replacement,
    nth_permuwas improvedtation, nth_product, product_index,
    random_permutation, substrings, and value_chain was
    improved (thanks to rhettinger)
  • Performance for ichunked was improved (thanks to pochmann3 and rhettinger)

Other changes

  • The docstrings for several functions were improved (thanks to nathanjmcdougall, olliemath, r266-tech, and rhettinger)

Don't miss a new more-itertools release

NewReleases is sending notifications on new releases.