Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled monthly dependency update for December #149

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Dec 1, 2024

Update argh from 0.26.2 to 0.31.3.

Changelog

0.31.3

---------------------------

Bugs fixed:

- wrong type annotation of `errors` in `wrap_errors` (PR 229 by laazy)
- tests were failing under Python 3.13 (issue 228 by mgorny)
- regression: can't set argument name with `dest` via decorator
(issue 224 by mathieulongtin)

0.31.2

---------------------------

Bugs fixed:

- broken support for `Optional[List]` (but not `Optional[list]`), a narrower
case of the problem fixed earlier (issue 216).

0.31.1

---------------------------

Bugs fixed:

- broken support for type alias `List` (issue 216).

Enhancements:

- cleaned up the README, rearranged other documentation.

0.31.0

---------------------------

Breaking changes:

- The typing hints introspection feature is automatically enabled for any
command (function) which does **not** have any arguments specified via `arg`
decorator.

This means that, for example, the following function used to fail and now
it will pass::

   def main(count: int):
       assert isinstance(count, int)

This may lead to unexpected behaviour in some rare cases.

- A small change in the legacy argument mapping policy `BY_NAME_IF_HAS_DEFAULT`
concerning the order of variadic positional vs. keyword-only arguments.

The following function now results in ``main alpha [args ...] beta`` instead of
``main alpha beta [args ...]``::

   def main(alpha, *args, beta): ...

This does **not** concern the default name mapping policy.  Even for the
legacy one it's an edge case which is extremely unlikely to appear in any
real-life application.

- Removed the previously deprecated decorator `expects_obj`.

Enhancements:

- Added experimental support for basic typing hints (issue 203)

The following hints are currently supported:

- ``str``, ``int``, ``float``, ``bool`` (goes to ``type``);
- ``list`` (affects ``nargs``), ``list[T]`` (first subtype goes into ``type``);
- ``Literal[T1, T2, ...]`` (interpreted as ``choices``);
- ``Optional[T]`` AKA ``T | None`` (currently interpreted as
 ``required=False`` for optional and ``nargs="?"`` for positional
 arguments; likely to change in the future as use cases accumulate).

The exact interpretation of the type hints is subject to change in the
upcoming versions of Argh.

- Added `always_flush` argument to `dispatch()` (issue 145)

- High-level functions `argh.dispatch_command()` and `argh.dispatch_commands()`
now accept a new parameter `old_name_mapping_policy`.  The behaviour hasn't
changed because the parameter is `True` by default.  It will change to
`False` in Argh v.0.33 or v.1.0.

Deprecated:

- the `namespace` argument in `argh.dispatch()` and `argh.parse_and_resolve()`.
Rationale: continued API cleanup.  It's already possible to mutate the
namespace object between parsing and calling the endpoint; it's unlikely that
anyone would need to specify a custom namespace class or pre-populate it
before parsing.  Please file an issue if you have a valid use case.

Other changes:

- Refactoring.

0.30.5

---------------------------

Bugs fixed:

- A combination of `nargs` with a list as default value would lead to the
values coming from CLI being wrapped in another list (issue 212).

Enhancements:

- Argspec guessing: if `nargs` is not specified but the default value
is a list, ``nargs="*"`` is assumed and passed to argparse.

0.30.4

---------------------------

There were complaints about the lack of a deprecation cycle for the legacy name
mapping policy.  This version addresses the issue:

- The handling introduced in v.0.30.2 (raising an exception for clarity)
is retained for cases when no name mapping policy is specified but function
signature contains defaults in non-kwonly args **and kwonly args are also
defined**::

   def main(alpha, beta=1, *, gamma=2):   error — explicit policy required

In a similar case but when **kwonly args are not defined** Argh now assumes
the legacy name mapping policy (`BY_NAME_IF_HAS_DEFAULT`) and merely issues
a deprecation warning with the same message as the exception mentioned above::

   def main(alpha, beta=2):     `[-b BETA] alpha` + DeprecationWarning

This ensures that most of the old scripts still work the same way despite the
new policy being used by default and enforced in cases when it's impossible
to resolve the mapping conflict.

Please note that this "soft" handling is to be removed in version v0.33
(or v1.0 if the former is not deemed necessary).  The new name mapping policy
will be used by default without warnings, like in v0.30.

0.30.3

---------------------------

Bugs fixed:

- Regression: a positional argument with an underscore used in `arg` decorator
would cause Argh fail on the assembling stage. (208)

0.30.2

---------------------------

Bugs fixed:

- As reported in 204 and 206, the new default name mapping policy in fact
silently changed the CLI API of some scripts: arguments which were previously
translated as CLI options became optional positionals. Although the
instructions were supplied in the release notes, the upgrade may not
necessarily be intentional, so a waste of users' time is quite likely.

To alleviate this, the default value for `name_mapping_policy` in standard
functions has been changed to `None`; if it's not specified, Argh falls back
to the new default policy, but raises `ArgumentNameMappingError` with
detailed instructions if it sees a non-kwonly argument with a default value.

Please specify the policy explicitly in order to avoid this error if you need
to infer optional positionals (``nargs="?"``) from function signature.

0.30.1

---------------------------

Bugs fixed:

- Regression: certain special values in argument default value would cause an
exception (204)

Enhancements:

- Improved the tutorial.
- Added a more informative error message when the reason is likely to be
related to the migration from Argh v0.29 to a version with a new argument
name mapping policy.

Other changes:

- Added `py.typed` marker file for :pep:`561`.

0.30.0

---------------------------

Backwards incompatible changes:

- A new policy for mapping function arguments to CLI arguments is used by
default (see :class:`argh.assembling.NameMappingPolicy`).

The following function does **not** map to ``func foo [--bar]`` anymore::

   def func(foo, bar=None):
       ...

Since this release it maps to ``func foo [bar]`` instead.
Please update the function this way to keep `bar` an "option"::

   def func(foo, *, bar=None):
       ...

If you cannot modify the function signature to use kwonly args for options,
please consider explicitly specifying the legacy name mapping policy::

   set_default_command(
       func, name_mapping_policy=NameMappingPolicy.BY_NAME_IF_HAS_DEFAULT
   )

- The name mapping policy `BY_NAME_IF_HAS_DEFAULT` slightly deviates from the
old behaviour. Kwonly arguments without default values used to be marked as
required options (``--foo FOO``), now they are treated as positionals
(``foo``). Please consider the new default policy (`BY_NAME_IF_KWONLY`) for
a better treatment of kwonly.

- Removed previously deprecated features (184 → 188):

- argument help string in annotations — reserved for type hints;
- `argh.SUPPORTS_ALIASES`;
- `argh.safe_input()`;
- previously renamed arguments for `add_commands()`: `namespace`,
 `namespace_kwargs`, `title`, `description`, `help`;
- `pre_call` argument in `dispatch()`.  The basic usage remains simple but
 more granular functions are now available for more control.

 Instead of this::

   argh.dispatch(..., pre_call=pre_call_hook)

 please use this::

   func, ns = argh.parse_and_resolve(...)
   pre_call_hook(ns)
   argh.run_endpoint_function(func, ns, ...)

Deprecated:

- The `expects_obj` decorator.  Rationale: it used to support the old,
"un-pythonic" style of usage, which essentially lies outside the scope of
Argh.  If you are not using the mapping of function arguments onto CLI, then
you aren't reducing the amount of code compared to vanilla Argparse.

- The `add_help_command` argument in `dispatch()`.
Rationale: it doesn't add much to user experience; it's not much harder to
type ``--help`` than it is to type ``help``; moreover, the option can be
added anywhere, unlike its positional counterpart.

Enhancements:

- Added support for Python 3.12.
- Added type annotations to existing Argh code (185 → 189).
- The `dispatch()` function has been refactored, so in case you need finer
control over the process, two new, more granular functions can be used:

- `endpoint_function, namespace = argh.parse_and_resolve(...)`
- `argh.run_endpoint_function(endpoint_function, namespace, ...)`

Please note that the names may change in the upcoming versions.

- Configurable name mapping policy has been introduced for function argument
to CLI argument translation (191 → 199):

- `BY_NAME_IF_KWONLY` (default and recommended).
- `BY_NAME_IF_HAS_DEFAULT` (close to pre-v.0.30 behaviour);

Please check API docs on :class:`argh.assembling.NameMappingPolicy` for
details.

0.29.4

---------------------------

Bugs fixed:

- Test coverage reported as <100% when argcomplete is installed (187)

0.29.3

------------------------------

Technical releases for packaging purposes.  No changes in functionality.

0.29.0

---------------------------

Backwards incompatible changes:

- Wrapped exceptions now cause ``dispatching.dispatch()`` to raise
``SystemExit(1)`` instead of returning without error. For most users, this
means failed commands will now exit with a failure status instead of a
success. (161)

Deprecated:

- Renamed arguments in `add_commands()` (165):

- `namespace` → `group_name`
- `namespace_kwargs` → `group_kwargs`

The old names are deprecated and will be removed in v.0.30.

Enhancements:

- Can control exit status (see Backwards Incompatible Changes above) when
raising ``CommandError`` using the ``code`` keyword arg.

Bugs fixed:

-  Positional arguments should not lead to removal of short form of keyword
arguments. (115)

Other changes:

- Avoid depending on iocapture by using pytest's built-in feature (177)

0.28.1

---------------------------

- Fixed bugs in tests (171, 172)

0.28.0

---------------------------

A major cleanup.

Backward incompatible changes:

- Dropped support for Python 2.7 and 3.7.

Deprecated features, to be removed in v.0.30:

- `argh.assembling.SUPPORTS_ALIASES`.

- Always `True` for recent versions of Python.

- `argh.io.safe_input()` AKA `argh.interaction.safe_input()`.

- Not relevant anymore.  Please use the built-in `input()` instead.

- argument `pre_call` in `dispatch()`.

Even though this hack seems to have been used in some projects, it was never
part of the official API and never recommended.

Describing your use case in the `discussion about shared arguments`_ can
help improve the library to accomodate it in a proper way.

.. _discussion about shared arguments: https://github.com/neithere/argh/issues/63

- Argument help as annotations.

- Annotations will only be used for types after v.0.30.
- Please replace any instance of::

   def func(foo: "Foobar"):

 with the following::

   arg('-f', '--foo', help="Foobar")
   def func(foo):

 It will be decided later how to keep this functionality "DRY" (don't repeat
 yourself) without conflicts with modern conventions and tools.

- Added deprecation warnings for some arguments deprecated back in v.0.26.

0.27.2

---------------------------

Minor packaging fix:

* chore: include file required by tox.ini in the sdist (155)

0.27.1

---------------------------

Minor building and packaging fixes:

* docs: add Read the Docs config (160)
* chore: include tox.ini in the sdist (155)

0.27.0

---------------------------

This is the last version to support Python 2.7.

Backward incompatible changes:

- Dropped support for Python 2.6.

Enhancements:

- Added support for Python 3.7 through 3.11.
- Support introspection of function signature behind the `wraps` decorator
(issue 111).

Fixed bugs:

- When command function signature contained ``**kwargs`` *and* positionals
without defaults and with underscores in their names, a weird behaviour could
be observed (issue 104).
- Fixed introspection through decorators (issue 111).
- Switched to Python's built-in `unittest.mock` (PR 154).
- Fixed bug with `skip_unknown_args=True` (PR 134).
- Fixed tests for Python 3.9.7+ (issue 148).

Other changes:

- Included the license files in manifest (PR 112).
- Extended the list of similar projects (PR 87).
- Fixed typos and links in documentation (PR 110, 116, 156).
- Switched CI to Github Actions (PR 153).

0.26.2

---------------------------

- Removed official support for Python 3.4, added for 3.5.
- Various tox-related improvements for development.
- Improved documentation.

0.26.1

---------------------------

Fixed bugs:

- The undocumented (and untested) argument `dispatch(..., pre_call=x)`
was broken; fixing because at least one important app depends on it
(issue 63).

0.26

-------------------------

This release is intended to be the last one before 1.0.  Therefore a major
cleanup was done.  This **breaks backward compatibility**.  If your code is
really outdated, please read this list carefully and grep your code.

- Removed decorator `alias` (deprecated since v.0.19).

- Removed decorator `plain_signature` (deprecated since v.0.20).

- Dropped support for old-style functions that implicitly expected namespace
objects (deprecated since v.0.21).  The `expects_obj` decorator is now
mandatory for such functions.

- Removed decorator `command` (deprecated since v.0.21).

- The `wrap_errors` decorator now strictly requires that the error classes
are given as a list (old behaviour was deprecated since v.0.22).

- The `allow_warnings` argument is removed from
`argh.completion.autocomplete()`.  Debug-level logging is used instead.
(The warnings were deprecated since v.0.25).

Deprecated:

- Deprecated arguments `title`, `help` and `description` in `add_commands()`
helper function.  See documentation and issue 60.

Other changes:

- Improved representation of default values in the help.

- Dispatcher can be configured to skip unknown arguments (issue 57).

- Added `add_subcommands()` helper function (a convenience wrapper
for `add_commands()`).

- `EntryPoint` now stores kwargs for the parser.

- Added support for default command *with* nested commands (issue 78).

This only works with Python 3.4+ due to incorrect behaviour or earlier
versions of Argparse (including the stand-alone one as of 1.2.1).

Due to argparse peculiarities the function assignment technique relies
on a special `ArghNamespace` object.  It is used by default in `ArghParser`
and the shortcuts, but if you call the vanilla `ArgumentParser.parse_args()`
method, you now *have* to supply the proper namespace object.

Fixed bugs:

- Help formatter was broken for arguments with empty strings as default values
(issue 76).

0.25

-------------------------

- Added EntryPoint class as another way to assemble functions (issue 59).

- Added support for Python 3.4; dropped support for Python 3.3
(this doesn't mean that Argh is necessarily broken under 3.3,
it's just that I'm not testing against it anymore).

- Shell completion warnings are now deprecated in favour of `logging`.

- The command help now displays default values of all arguments (issue 64).

- Function docstrings are now displayed verbatim in the help (issue 64).

- Argh's dispatching now should work properly in Cython.

0.24

-------------------------

A few years of development without a changelog 🫠

Fortunately, a curious reader can always refer to commit messages and
changesets.

0.1

------------------------

The first version!  A single file with 182 lines of code including
documentation :)  It featured subparsers and had the `arg` decorator which was
basically a deferred `ArgumentParser.add_argument()` call.

Functions and classes:

* class `ArghParser`
* functions `add_commands()` and `dispatch()`
* decorators `arg` and `plain_signature`
Links

Update atomicwrites from 1.3.0 to 1.4.1.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update attrs from 19.1.0 to 24.2.0.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update certifi from 2019.3.9 to 2024.8.30.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update chardet from 3.0.4 to 5.2.0.

Changelog

5.2.0

Adds support for running chardet CLI via `python -m chardet` (0e9b7bc20366163efcc221281201baff4100fe19, dan-blanchard)

5.1.0

Features
- Add `should_rename_legacy` argument to most functions, which will rename older encodings to their more modern equivalents (e.g., `GB2312` becomes `GB18030`) (264, dan-blanchard)
- Add capital letter sharp S and ISO-8859-15 support (222, SimonWaldherr)
- Add a prober for MacRoman encoding (5 updated as c292b52a97e57c95429ef559af36845019b88b33, Rob Speer and dan-blanchard )
- Add `--minimal` flag to `chardetect` command (214, dan-blanchard)
- Add type annotations to the project and run mypy on CI (261, jdufresne)
- Add support for Python 3.11 (274, hugovk)

Fixes
- Clarify LGPL version in License trove classifier (255, musicinmybrain)
- Remove support for EOL Python 3.6 (260, jdufresne)
- Remove unnecessary guards for non-falsey values (259, jdufresne)

Misc changes
- Switch to Python 3.10 release in GitHub actions (257, jdufresne)
- Remove setup.py in favor of build package (262, jdufresne)
- Run tests on macos, Windows, and 3.11-dev (267, dan-blanchard)

5.0.0

⚠️ This release is the first release of chardet that no longer supports Python < 3.6 ⚠️

In addition to that change, it features the following user-facing changes:

- Added a prober for Johab Korean (207, grizlupo)
- Added a prober for UTF-16/32 BE/LE (109, 206, jpz) 
- Added test data for Croatian, Czech, Hungarian, Polish, Slovak, Slovene, Greek, and Turkish, which should help prevent future errors with those languages
- Improved XML tag filtering, which should improve accuracy for XML files (208)
- Tweaked `SingleByteCharSetProber` confidence to match latest uchardet (209)
- Made `detect_all` return child prober confidences (210)
- Updated examples in docs (223, domdfcoding)
- Documentation fixes (212, 224, 225, 226, 220, 221, 244 from too many to mention)
- Minor performance improvements (252, deedy5)
- Add support for Python 3.10 when testing (232, jdufresne)
- Lots of little development cycle improvements, mostly thanks to jdufresne

4.0.0

Benchmarking chardet 4.0.0 on CPython 3.7.5 (default, Sep  8 2020, 12:19:42)
[Clang 11.0.3 (clang-1103.0.32.62)]
--------------------------------------------------------------------------------
.......................................................................................................................................................................................................................................................................................................................................................................
Calls per second for each encoding:

3.0.4

This minor bugfix release just fixes some packaging and documentation issues:

-  Fix issue with `setup.py` where `pytest_runner` was always being installed. (PR 119, thanks zmedico)
-  Make sure `test.py` is included in the manifest (PR 118, thanks zmedico)
-  Fix a bunch of old URLs in the README and other docs. (PRs 123 and 129, thanks qfan and jdufresne)
-  Update documentation to no longer imply we test/support Python 3 versions before 3.3 (PR 130, thanks jdufresne)

3.0.3

This release fixes a crash when debugging logging was enabled.  (Issue 115, PRs 117 and 125)

3.0.2

Fixes an issue where `detect` would sometimes return `None` instead of a `dict` with the keys `encoding`, `language`, and `confidence` (Issue 113, PR 114).

3.0.1

This bugfix release fixes a crash in the EUC-TW prober when it encountered certain strings (Issue 67).

3.0.0

This release is long overdue, but still mostly serves as a placeholder for the impending 4.0.0 release, which will have retrained models for better accuracy.  For now, this release will get the following improvements up on PyPI:

-  Added support for Turkish ISO-8859-9 detection (PR 41, thanks queeup)
-  Commented out large unused sections of Big5 and EUC-KR tables to save memory (8bc4b89)
-  Removed Python 3.2 from testing, but add 3.4 - 3.6
-  Ensure that stdin is open with mode `'rb'` for `chardetect` CLI. (PR 38, thanks lpsinger)
-  Fixed `chardetect` crash with non-ascii file names (PR 39, thanks nkanaev)
-  Made naming conventions more Pythonic throughout (no more `mTypicalPositiveRatio`, and instead `typical_positive_ratio`)
-  Modernized test scripts and infrastructure so we've got Travis testing and all that stuff
-  Rename `filter_without_english_words` to `filter_international_words` and make it match current Mozilla implementation (PR 44, thanks rsnair2)
-  Updated `filter_english_letters` to match C implementation (c6654595)
-  Temporarily disabled Hungarian ISO-8859-2 and Windows-1250 detection because it is very inaccurate (da6c0a079)
-  Allow CLI sub-package to be importable (PR 55)
-  Add a `hypotheis`-based test (PR 66, thanks DRMacIver)
-  Strip endianness from UTF with BOM predictions so that the encoding can be passed directly to `bytes.decode()` (PR 73, thanks snoack)
-  Fixed broken links in docs (PR 90, thanks roskakori)
-  Added early exit to `chardetect` when encoding is detected instead of looping through entire file (PR 103, thanks jpz)
-  Use `bytearray` objects internally instead of `wrap_ord` calls, which provides a nice performance boost across the board (PR 106)
-  Add `language` property to probers and `UniversalDetector` results (PR 180)
-  Mark the 5 known test failures as such so we can have more useful Travis build results in the meantime (d588407)

2.3.0

In this release, we:
- Added support for CP932 detection (thanks to hashy).
- Fixed an issue where UTF-8 with a BOM would not be detected as UTF-8-SIG (8).
- Modified `chardetect` to use `argparse` for argument parsing.
- Moved docs to a `gh-pages` branch.  You can now access them at http://chardet.github.io.

2.2.1

Fix missing paren in chardetect.py

2.2.0

First version after merger with charade. Loads of little changes.
Links

Update colored from 1.3.93 to 2.2.4.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update coverage from 4.5.4 to 7.6.8.

The bot wasn't able to find a changelog for this release. Got an idea?

Links

Update idna from 2.10 to 3.10.

Changelog

3.10

+++++++++++++++++

- Reverted to Unicode 15.1.0 data. Unicode 16 has some significant changes
to UTS46 processing that will require more work to properly implement.

3.9

++++++++++++++++

- Update to Unicode 16.0.0
- Deprecate setup.cfg in favour of pyproject.toml
- Use ruff for code formatting

Thanks to Waket Zheng for contributions to this release.

3.8

++++++++++++++++

- Fix regression where IDNAError exception was not being produced for
certain inputs.
- Add support for Python 3.13, drop support for Python 3.5 as it is no
longer testable.
- Documentation improvements
- Updates to package testing using Github actions

Thanks to Hugo van Kemenade for contributions to this release.

3.7

++++++++++++++++

- Fix issue where specially crafted inputs to encode() could
take exceptionally long amount of time to process. [CVE-2024-3651]

Thanks to Guido Vranken for reporting the issue.

3.6

++++++++++++++++

- Fix regression to include tests in source distribution.

3.5

++++++++++++++++

- Update to Unicode 15.1.0
- String codec name is now "idna2008" as overriding the system codec
"idna" was not working.
- Fix typing error for codec encoding
- "setup.cfg" has been added for this release due to some downstream
lack of adherence to PEP 517. Should be removed in a future release
so please prepare accordingly.
- Removed reliance on a symlink for the "idna-data" tool to comport
with PEP 517 and the Python Packaging User Guide for sdist archives.
- Added security reporting protocol for project

Thanks Jon Ribbens, Diogo Teles Sant'Anna, Wu Tingfeng for contributions
to this release.

3.4

++++++++++++++++

- Update to Unicode 15.0.0
- Migrate to pyproject.toml for build information (PEP 621)
- Correct another instance where generic exception was raised instead of
IDNAError for malformed input
- Source distribution uses zeroized file ownership for improved
reproducibility

Thanks to Seth Michael Larson for contributions to this release.

3.3

++++++++++++++++

- Update to Unicode 14.0.0
- Update to in-line type annotations
- Throw IDNAError exception correctly for some malformed input
- Advertise support for Python 3.10
- Improve testing regime on Github
- Fix Russian typo in documentation

Thanks to Jon Defresne, Hugo van Kemenade, Seth Michael Larson,
Patrick Ventuzelo and Boris Verhovsky for contributions to this
release.

3.2

++++++++++++++++

- Add type hints (Thanks, Seth Michael Larson!)
- Remove support for Python 3.4

3.1

++++++++++++++++

- Ensure license is included in package (Thanks, Julien Schueller)
- No longer mark wheel has universal (Thanks, Matthieu Darbois)
- Test on PowerPC using Travis CI

3.0

++++++++++++++++

- Python 2 is no longer supported (the 2.x branch supports Python 2,
use "idna<3" in your requirements file if you need Python 2 support)
- Support for V2 UTS 46 test vectors.

2.10

+++++++++++++++++

- Update to Unicode 13.0.0.
- Throws a more specific exception if "xn--" is provided as a label.
- This is expected to be the last version that supports Python 2.

2.9

++++++++++++++++

- Update to Unicode 12.1.0.
- Prohibit A-labels ending with a hyphen (Thanks, Julien Bernard!)
- Future-proofing: Test on Python 3.7 and 3.8, don't immediately
fail should Python 4 come along.
- Made BSD 3-clause license clearer

2.8

++++++++++++++++

- Update to Unicode 11.0.0.
- Provide more specific exceptions for some malformed labels.

2.7

++++++++++++++++

- Update to Unicode 10.0.0.
- No longer accepts dot-prefixed domains (e.g. ".example") as valid.
This is to be more conformant with the UTS 46 spec. Users should
strip dot prefixes from domains before processing.

2.6

++++++++++++++++

- Allows generation of IDNA and UTS 46 table data for different
versions of Unicode, by deriving properties directly from
Unicode data.
- Ability to generate RFC 5892/IANA-style table data
- Diagnostic output of IDNA-related Unicode properties and
derived calculations for a given codepoint
- Support for idna.__version__ to report version
- Support for idna.idnadata.__version__ and
idna.uts46data.__version__ to report Unicode version of
underlying IDNA and UTS 46 data respectively.

2.5

++++++++++++++++

- Fix bug with Katakana middle dot context-rule (Thanks, Greg
Shikhman.)

2.4

++++++++++++++++

- Restore IDNAError to be a subclass of UnicodeError, as some users of
this library are only looking for the latter to catch invalid strings.

2.3

++++++++++++++++

- Fix bugs relating to deriving IDNAError from UnicodeError.
- More memory footprint improvements (Thanks, Alex Gaynor)

2.2

++++++++++++++++

- Made some changes to the UTS 46 data that should allow Jython to get around
64kb Java class limits. (Thanks, John A. Booth and Marcin Płonka.)
- In Python 2.6, skip two tests that rely on data not present in that
Python version's unicodedata module.
- Use relative imports to help downstream users.

2.1

++++++++++++++++

- Memory consumption optimizations. The library should consume significantly
less memory through smarter data structures being used to represent
relevant Unicode properties. Many thanks to Shivaram Lingamneni for this
patch.
- Patches to make library work better with Python 2.6. The core library
currently works however the unit testing does not. (Thanks, Robert
Buchholz)
- Better affix all Unicode codepoint properties to a specific version.

2.0

++++++++++++++++

- Added support for Unicode IDNA Compatibility Processing (aka Unicode
Technical Standard 46). Big thanks to Jon Ribbens who contributed this
functionality.

1.1

++++++++++++++++

- Use IDNA properties from Unicode 6.3.0. Internet Architecture Board (IAB)
issued statement recommending against the use of Unicode 7.0.0 until
issues relating to U+08A1 codepoint are resolved. See http://goo.gl/Ed1n0K
- Identify some cases when label would be too longer to be a legal DNS name
and raise an exception. (Thanks, Ed Lewis)

1.0

++++++++++++++++

- Update IDNA properties for Unicode 7.0.0.

0.9

++++++++++++++++

- Fix issue with non-UTF-8 environments reading the README file
now that it contains non-ASCII. (Thanks, Tom Prince)
- Codec functions are useful, so they are separated into their own
module, rather than just existing for compatibility reasons.
- Add LICENSE file.

0.8

++++++++++++++++

- Added MANIFEST.in for correct source distribution compilation.

0.7

++++++++++++++++

- Filled out missing tests for various functions.
- Fix bug in CONTEXTO validation for Greek lower numeral sign (U+0375)
- Fix bug in CONTEXTO validation for Japanese middle dot (U+30FB)
- Improved documentation
- Move designation to Stable

0.6

++++++++++++++++

- Minor improvements to Python 3 support, tests (Thanks, Derek Wilson)

0.5

++++++++++++++++

- Update IDNA properties for Unicode 6.3.0.

0.4

++++++++++++++++

- Fix trove classifier for Python 3. (Thanks, Hynek Schlawack)

0.3

++++++++++++++++

- Ported to Python 3.

0.2

++++++++++++++++

- Improve packaging.
- More conformant, passes all relevant tests in the Unicode TR46 test suite.

0.1

++++++++++++++++

- First proof-of-concept version.
Links

Update more-itertools from 7.0.0 to 10.5.0.

Changelog

10.5.0

------

* Bug fixes
 * A missing symbol in ``more.pyi`` was fixed (thanks to eberts-google and nathanielmanistaatgoogle)

* Other changes
 * :func:`all_equal` was optimized (thanks to pochmann3 and rhettinger)

10.4.0

------

* Changes to existing functions
 * :func:`circular_shifts` now accepts a ``steps`` parameter (thanks to rhettinger)
 * :func:`distinct_permutations` now accepts iterables with non-comparable items (thanks to hgustafsson, JamesParrott, and pochmann3)
 * :class:`run_length`, :func:`totient`, :func:`sliding_window`, and :func:`triplewise` were optimized (thanks to rhettinger)
 * :class:`ilen` was optimized (thanks to pochmann3 and rhettinger)
 * :func:`sample` was improved, and now accepts ``counts`` and ``strict`` parameters (thanks to rhettinger)
 * :func:`set_partitions` now accepts ``min_size`` and ``max_size`` parameters (thanks to Pandede)
 * :func:`seekable`'s ``relative_seek`` method remembers previous calls (thanks to dkrikun)
 * :func:`sort_together` now accepts a ``strict`` parameter (thanks to rhettinger and Pandede)

* Other changes
 * The docs for :func:`is_sorted` and :func:`strictly_n` were improved (thanks to pochmann3 and fakuivan)
 * The typing information for :func:`windowed_complete`, :func:`zip_broadcast`, and and :func:`zip_equal` were improved (thanks to m472, eyalho, akisatoon1, jbosboom, and Pandede)

10.3.0

------

* New functions
 * :func:`powerset_of_sets`, :func:`dft`, and :func:`idft` (thanks to rhettinger)
 * :func:`join_mappings` (thanks to NeilGirdhar and rhettinger)
 * :func:`doublestarmap` (thanks to Skeen, monk-time, DamianB-BitFlipper, and ergoithz)
 * :func:`unique` (thanks to rhettinger)

* Changes to existing functions
 * :func:`collapse`, :func:`chunked_even`, :func:`ichunked`, :func:`padded`, and :func:`windowed` were optimized and improved (thanks to james-wasson)
 * :func:`totient` was optimized (thanks to rhettinger)
 * :func:`roundrobin` was updated and improved (thanks to rhettinger)
 * :func:`all_equal` now accepts a *key* parameter.
 * The docs for :func:`value_chain` were improved (thanks to bjrtx)
 * The type annotations for :class:`countable` were improved (thanks to aidanholm)

* Other changes
 * Unit tests were improved (thanks to haukex)
 * Some documentation issues were fixed (thanks to bjrtx and DimitriPapadopoulos)

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

------

* New functions
 * :func:`takewhile_inclusive` (thanks to OlegAlexander)
 * :func:`outer_product` (thanks to OlegAlexander)

* Changes to existing functions
 * :func:`zip_broadcast` was improved (thanks to kalekundert and pochmann)
 * :func:`consume` had its type annotation fixed (thanks to obaltian)

* Other changes
 * Some documentation and testing issues were fixed (thanks to OlegAlexander)

10.0.0

------

* Potentially breaking changes
 * Python 3.7 support was dropped, since it went EOL on 2023-06-27
 * :func:`batched` no longer issues a ``DeprecationWarning``; it is now an alias for ``itertools.batched`` for Python 3.12+
 * :func:`batched` and :func:`matmul` now yield tuples instead of lists

* New functions
 * :func:`combination_with_replacement_index` (thanks to Schoyen)
 * :func:`nth_combination_with_replacement` (thanks to Schoyen)
 * :func:`polynomial_eval` (from the Python itertools docs)
 * :func:`polynomial_derivative` (from the Python itertools docs)
 * :func:`sum_of_squares` (from the Python itertools docs)

* Changes to existing functions
 * :func:`seekable` now has ``relative_seek`` method (thanks to karlb)
 * :func:`chunked_even` was optimized (thanks to elliotwutingfeng)
 * :func:`numeric_range` was optimized (thanks to eltoder)
 * :func:`duplicates_justseen`, :func:`pairwise`, :func:`partial_product`, and :func:`partition` were updated and optimized (thanks to pochmann)
 * :func:`unique_in_window` had its implementation updated (thanks to elliotwutingfeng)
 * :func:`iterate` now breaks when its ``func`` argument raises ``StopIteration`` (thanks to jrebiffe)

* Other changes
 * Some documentation and testing issues were fixed (thanks to lonnen and XuehaiPan)

9.1.0

-----

* New functions
 * :func:`iter_index` (from the Python itertools docs)
 * :func:`transpose` (from the Python itertools docs)
 * :func:`matmul` (from the Python itertools docs)
 * :func:`factor` (from the Python itertools docs)
 * :func:`gray_product` (thanks to haukex)
 * :func:`partial_product` (thanks to lonnen)

* Changes to existing functions
 * :func:`sieve` was updated to match the Python itertools docs
 * :func:`maxsplit` was updated to fix a bug (thanks to abingham)
 * :func:`sliced` had its `type hint <https://github.com/more-itertools/more-itertools/pull/667>`__ updated (thanks to ad-chaos)
 

* Other changes
 * The ``batched`` function is marked as deprecated and will be removed in a future major release. For Python 3.12 and above, use ``itertools.batched`` instead. (thanks to neutrinoceros)
 * The type hints now used postponed evaluation of annotations from PEP 563 (thanks to Isira-Seneviratne)
 * Some documentation issues were fixed (thanks to Voskov and jdkandersson)

9.0.0

-----

* Potentially breaking changes
 * :func:`grouper` no longer accepts an integer as its first argument. Previously this raised a ``DeprecationWarning``.
 * :func:`collate` has been removed. Use the built-in :func:`heapq.merge` instead.
 * :func:`windowed` now yields nothing when its iterable is empty.
 * This library now advertises support for Python 3.7+.

* New functions
 * :func:`constrained_batches`
 * :func:`batched` (from the Python itertools docs)
 * :func:`polynomial_from_roots` (from the Python itertools docs)
 * :func:`sieve` (from the Python itertools docs)

* Other changes
 * Some documentation issues were fixed (thanks to nanouasyn)

8.14.0

------

* New functions
 * :func:`longest_common_prefix` (thanks to nanouasyn)
 * :func:`iequals` (thanks to nanouasyn)

* Changes to existing functions
 * `concurrent.futures.ThreadPoolExecutor` is now imported lazily in :func:`callback_iter`.
 * :func:`tail` is now optimized for iterables with a fixed length.

* Other changes
 * Some documentation issues were fixed (thanks to pochmann and timgates42)
 * This library is now marked for Python 3.10 compatibility in PyPI (thanks to chayim)

8.13.0

------

* New functions
 * The :func:`subslices` recipe from the `itertools` docs was added (thanks to rhettinger)

* Changes to existing functions
 * The :func:`ichunked` function is now more efficient (thanks to hjtran0 and seanmacavaney)
 * The :func:`difference` function is now more efficient (thanks to Masynchin)
 * The :func:`grouper` recipe now has more features, mirroring the one in the `itertools` docs (thanks to rhettinger)

* Other changes
 * Some documentation issues were fixed (thanks to medvied and Freed-Wu)
 * The `more_itertools` package is now built with `flit` (thanks to mgorny)

8.12.0

------

* Bug fixes
 * Some documentation issues were fixed (thanks to Masynchin, spookylukey, astrojuanlu, and stephengmatthews)
 * Python 3.5 support was temporarily restored (thanks to mattbonnell)

8.11.0

------

* New functions
 * The :func:`before_and_after`, :func:`sliding_window`, and :func:`triplewise` recipes from the Python 3.10 docs were added
 * :func:`duplicates_everseen` and :func:`duplicates_justseen` (thanks to OrBin and DavidPratt512)
 * :func:`minmax` (thanks to Ricocotam, MSeifert04, and ruancomelli)
 * :func:`strictly_n` (thanks to hwalinga and NotWearingPants)
 * :func:`unique_in_window`

* Changes to existing functions
 * :func:`groupby_transform` had its type stub improved (thanks to mjk4 and ruancomelli)
 * :func:`is_sorted` now accepts a ``strict`` parameter (thanks to Dutcho and ruancomelli)
 * :func:`zip_broadcast` was updated to fix a bug (thanks to kalekundert)

8.10.0

------

* Changes to existing functions
 * The type stub for :func:`iter_except` was improved (thanks to  MarcinKonowalczyk)

* Other changes:
 *  Type stubs now ship with the source release (thanks to saaketp)
 *  The Sphinx docs were improved (thanks to MarcinKonowalczyk)

8.9.0

-----

* New functions
 * :func:`interleave_evenly` (thanks to mbugert)
 * :func:`repeat_each` (thanks to FinalSh4re)
 * :func:`chunked_even` (thanks to valtron)
 * :func:`map_if` (thanks to sassbalint)
 * :func:`zip_broadcast` (thanks to kalekundert)

* Changes to existing functions
 * The type stub for :func:`chunked` was improved (thanks to  PhilMacKay)
 * The type stubs for :func:`zip_equal` and `zip_offset` were improved (thanks to maffoo)
 * Building Sphinx docs locally was improved (thanks to MarcinKonowalczyk)

8.8.0

-----

* New functions
 * :func:`countable` (thanks to krzysieq)

* Changes to existing functions
 * :func:`split_before` was updated to handle empty collections (thanks to TiunovNN)
 * :func:`unique_everseen` got a performance boost (thanks to Numerlor)
 * The type hint for :func:`value_chain` was corrected (thanks to vr2262)

8.7.0

-----

* New functions
 * :func:`convolve` (from the Python itertools docs)
 * :func:`product_index`, :func:`combination_index`, and :func:`permutation_index` (thanks to N8Brooks)
 * :func:`value_chain` (thanks to jenstroeger)

* Changes to existing functions
 * :func:`distinct_combinations` now uses a non-recursive algorithm (thanks to  knutdrand)
 * :func:`pad_none` is now the preferred name for :func:`padnone`, though the latter remains available.
 * :func:`pairwise` will now use the Python standard library implementation on Python 3.10+
 * :func:`sort_together` now accepts a ``key`` argument (thanks to brianmaissy)
 * :func:`seekable` now has a ``peek`` method, and can indicate whether the iterator it's wrapping is exhausted (thanks to gsakkis)
 * :func:`time_limited` can now indicate whether its iterator has expired (thanks to roysmith)
 * The implementation of :func:`unique_everseen` was improved (thanks to plammens)

* Other changes:
 * Various documentation updates (thanks to cthoyt, Evantm, and cyphase)

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)

* Changes to existing itertools:
 * The :func:`is_sorted` implementation was improved (thanks to cool-RR)
 * The :func:`groupby_transform` now accepts a ``reducefunc`` parameter.
 * The :func:`last` implementation was improved (thanks to brianmaissy)

* Other changes
 * Various documentation fixes (thanks to craigrosie, samuelstjean, PiCT0)
 * The tests for :func:`distinct_combinations` were improved (thanks to Minabsapi)
 * Automated tests now run on GitHub Actions. All commits now check:
     * That unit tests pass
     * That the examples in docstrings work
     * That test coverage remains high (using `coverage`)
     * For linting errors (using `flake8`)
     * For consistent style (using `black`)
     * That the type stubs work (using `mypy`)
     * That the docs build correctly (using `sphinx`)
     * That packages build correctly (using `twine`)

8.4.0

-----

* New itertools
 * :func:`mark_ends` (thanks to kalekundert)
 * :func:`is_sorted`

* Changes to existing itertools:
 * :func:`islice_extended` can now be used with real slices (thanks to cool-RR)
 * The implementations for :func:`filter_except` and :func:`map_except` were improved (thanks to SergBobrovsky)

* Other changes
 * Automated tests now enforce code style (using `black <https://github.com/psf/black>`__)
 * The various signatures of :func:`islice_extended` and :func:`numeric_range` now appear in the docs (thanks to dsfulf)
 * The test configuration for mypy was updated (thanks to blueyed)

8.3.0

-----

* New itertools
 * :func:`zip_equal` (thanks to frankier and alexmojaki)

* Changes to existing itertools:
 * :func:`split_at`, :func:`split_before`, :func:`split_after`, and :func:`split_when` all got a ``maxsplit`` parameter (thanks to jferard and ilai-deutel)
 * :func:`split_at` now accepts a ``keep_separator`` parameter (thanks to jferard)
 * :func:`distinct_permutations` can now generate ``r``-length permutations (thanks to SergBobrovsky and ilai-deutel)
 * The :func:`windowed` implementation was improved  (thanks to SergBobrovsky)
 * The :func:`spy` implementation was improved (thanks to has2k1)

* Other changes
 * Type stubs are now tested with ``stubtest`` (thanks to ilai-deutel)
 * Tests now run with ``python -m unittest`` instead of ``python setup.py test`` (thanks to jdufresne)

8.2.0

-----

* Bug fixes
 * The .pyi files for typing were updated. (thanks to blueyed and ilai-deutel)

* Changes to existing itertools:
 * :func:`numeric_range` now behaves more like the built-in :func:`range`. (thanks to jferard)
 * :func:`bucket` now allows for enumerating keys. (thanks to alexchandel)
 * :func:`sliced` now should now work for numpy arrays. (thanks to sswingle)
 * :func:`seekable` now has a ``maxlen`` parameter.

8.1.0

-----

* Bug fixes
 * :func:`partition` works with ``pred=None`` again. (thanks to MSeifert04)

* New itertools
 * :func:`sample` (thanks to tommyod)
 * :func:`nth_or_last` (thanks to d-ryzhikov)

* Changes to existing itertools:
 * The implementation for :func:`divide` was improved. (thanks to jferard)

8.0.2

-----

* Bug fixes
 * The type stub files are now part of the wheel distribution (thanks to keisheiled)

8.0.1

-----

* Bug fixes
 * The type stub files now work for functions imported from the
   root package (thanks to keisheiled)

8.0.0

-----

* New itertools and other additions
 * This library now ships type hints for use with mypy.
   (thanks to ilai-deutel for the implementation, and to gabbard and fmagin for assistance)
 * :func:`split_when` (thanks to jferard)
 * :func:`repeat_last` (thanks to d-ryzhikov)

* Changes to existing itertools:
 * The implementation for :func:`set_partitions` was improved. (thanks to jferard)
 * :func:`partition` was optimized for expensive predicates. (thanks to stevecj)
 * :func:`unique_everseen` and :func:`groupby_transform` were re-factored. (thanks to SergBobrovsky)
 * The implementation for :func:`difference` was improved. (thanks to Jabbey92)

* Other changes
 * Python 3.4 has reached its end of life and is no longer supported.
 * Python 3.8 is officially supported. (thanks to jdufresne)
 * The ``collate`` function has been deprecated.
   It raises a ``DeprecationWarning`` if used, and will be removed in a future release.
 * :func:`one` and :func:`only` now provide more informative error messages. (thanks to gabbard)
 * Unit tests were moved outside of the main package (thanks to jdufresne)
 * Various documentation fixes (thanks to kriomant, gabbard, jdufresne)

7.2.0

-----

* New itertools
 * :func:`distinct_combinations`
 * :func:`set_partitions` (thanks to kbarrett)
 * :func:`filter_except`
 * :func:`map_except`

7.1.0

-----

* New itertools
 * :func:`ichunked` (thanks davebelais and youtux)
 * :func:`only` (thanks jaraco)

* Changes to existing itertools:
 * :func:`numeric_range` now supports ranges specified by
   ``datetime.datetime`` and ``datetime.timedelta`` objects (thanks to MSeifert04 for tests).
 * :func:`difference` now supports an *initial* keyword argument.


* Other changes
 * Various documentation fixes (thanks raimon49, pylang)

7.0.0

-----

* New itertools:
 * :func:`time_limited`
 * :func:`partitions` (thanks to rominf and Saluev)
 * :func:`substrings_indexes` (thanks to rominf)

* Changes to existing itertools:
 * :func:`collapse` now treats ``bytes`` objects the same as ``str`` objects. (thanks to Sweenpet)

The major version update is due to the change in the default behavior of
:func:`collapse`. It now treats ``bytes`` objects the same as ``str`` objects.
This aligns its behavior with :func:`always_iterable`.

.. code-block:: python

 >>> from more_itertools import collapse
 >>> iterable = [[1, 2], b'345', [6]]
 >>> print(list(collapse(iterable)))
 [1, 2, b'345', 6]

6.0.0

-----

* Major changes:
 * Python 2.7 is no longer supported. The 5.0.0 release will be the last
   version targeting Python 2.7.
 * All future releases will target the active versions of Python 3.
   As of 2019, those are Python 3.4 and above.
 * The ``six`` library is no longer a dependency.
 * The :func:`accumulate` function is no longer part of this library. You
   may import a better version from the standard ``itertools`` module.

* Changes to existing itertools:
 * The order of the parameters in :func:`grouper` have changed to match
   the latest recipe in the itertools documentation. Use of the old order
   will be supported in this release, but emit a  ``DeprecationWarning``.
   The legacy behavior will be dropped in a future release. (thanks to jaraco)
 * :func:`distinct_permutations` was improved (thanks to jferard - see also `permutations with unique values <https://stackoverflow.com/questions/6284396/permutations-with-unique-values>`_ at StackOverflow.)
 * An unused parameter was removed from :func:`substrings`. (thanks to pylang)

* Other changes:
 * The docs for :func:`unique_everseen` were improved. (thanks to jferard and MSeifert04)
 * Several Python 2-isms were removed. (thanks to jaraco, MSeifert04, and hugovk)

5.0.0

-----

* New itertools:
 * :func:`split_into` (thanks to rovyko)
 * :func:`unzip` (thanks to bmintz)
 * :func:`substrings` (thanks to pylang)

* Changes to existing itertools:
 * :func:`ilen` was optimized a bit (thanks to MSeifert04, achampion, and  bmintz)
 * :func:`first_true` now returns ``None`` by default. This is the reason for the major version bump - see below. (thanks to sk and OJFord)

* Other changes:
* Some code for old Python versions was removed (thanks to hugovk)
* Some documentation mistakes were corrected  (thanks to belm0 and hugovk)
* Tests now run properly on 32-bit versions of Python (thanks to Millak)
* Newer versions of CPython and PyPy are now tested against

The major version update is due to the change in the default return value of
:func:`first_true`. It's now ``None``.

.. code-block:: python

 >>> from more_itertools import first_true
 >>> iterable = [0, '', False, [], ()]   All these are False
 >>> answer = first_true(iterable)
 >>> print(answer)
 None

4.3.0

-----

* New itertools:
 * :func:`last` (thanks to tmshn)
 * :func:`replace` (thanks to pylang)
 * :func:`rlocate` (thanks to jferard and pylang)

* Improvements to existing itertools:
 * :func:`locate` can now search for multiple items

* Other changes:
* The docs now include a nice table of tools (thanks MSeifert04)

4.2.0

-----

* New itertools:
 * :func:`map_reduce` (thanks to pylang)
 * :func:`prepend` (from the `Python 3.7 docs <https://docs.python.org/3.7/library/itertools.html#itertools-recipes>`_)

* Improvements to existing itertools:
 * :func:`bucket` now complies with PEP 479 (thanks to irmen)

* Other changes:
* Python 3.7 is now supported (thanks to irmen)
* Python 3.3 is no longer supported
* The test suite no longer requires third-party modules to run
* The API docs now include links to source code

4.1.0

-----

* New itertools:
 * :func:`split_at` (thanks to michael-celani)
 * :func:`circular_shifts` (thanks to hiqua)
 * :func:`make_decorator` - see the blog post `Yo, I heard you like decorators <https://sites.google.com/site/bbayles/index/decorator_factory>`_
   for a tour (thanks to pylang)
 * :func:`always_reversible` (thanks to michael-celani)
 * :func:`nth_combination` (from the `Python 3.7 docs <https://docs.python.org/3.7/library/itertools.html#itertools-recipes>`_)

* Improvements to existing itertools:
 * :func:`seekable` now has an ``elements`` method to return cached items.
 * The performance tradeoffs between :func:`roundrobin` and
   :func:`interleave_longest` are now documented (thanks michael-celani,
   pylang, and MSeifert04)

4.0.1

-----

* No code changes - this release fixes how the docs display on PyPI.

4.0.0

-----

* New itertools:
 * :func:`consecutive_groups` (Based on the example in the `Python 2.4 docs <https://docs.python.org/release/2.4.4/lib/itertools-example.html>`_)
 * :func:`seekable` (If you're looking for how to "reset" an iterator,
   you're in luck!)
 * :func:`exactly_n` (thanks to michael-celani)
 * :func:`run_length.encode` and :func:`run_length.decode`
 * :func:`difference`

* Improvements to existing itertools:
 * The number of items between filler elements in :func:`intersperse` can
   now be specified (thanks to pylang)
 * :func:`distinct_permutations` and :func:`peekable` got some minor
   adjustments (thanks to MSeifert04)
 * :func:`always_iterable` now returns an iterator object. It also now
   allows different types to be considered iterable (thanks to jaraco)
 * :func:`bucket` can now limit the keys it stores in memory
 * :func:`one` now allows for custom exceptions (thanks to kalekundert)

* Other changes:
 * A few typos were fixed (thanks to EdwardBetts)
 * All tests can now be run with ``python setup.py test``

The major version update is due to the change in the return value of :func:`always_iterable`.
It now always returns iterator objects:

.. code-block:: python

 >>> from more_itertools import always_iterable
  Non-iterable objects are wrapped with iter(tuple(obj))
 >>> always_iterable(12345)
 <tuple_iterator object at 0x7fb24c9488d0>
 >>> list(always_iterable(12345))
 [12345]
  Iterable objects are wrapped with iter()
 >>> always_iterable([1, 2, 3, 4, 5])
 <list_iterator object at 0x7fb24c948c50>

3.2.0

-----

* New itertools:
 * :func:`lstrip`, :func:`rstrip`, and :func:`strip`
   (thanks to MSeifert04 and pylang)
 * :func:`islice_extended`
* Improvements to existing itertools:
 * Some bugs with slicing :func:`peekable`-wrapped iterables were fixed

3.1.0

-----

* New itertools:
 * :func:`numeric_range` (Thanks to BebeSparkelSparkel and MSeifert04)
 * :func:`count_cycle` (Thanks to BebeSparkelSparkel)
 * :func:`locate` (Thanks to pylang and MSeifert04)
* Improvements to existing itertools:
 * A few itertools are now slightly faster due to some function
   optimizations. (Thanks to MSeifert04)
* The docs have been substantially revised with installation notes,
categories for library functions, links, and more. (Thanks to pylang)

3.0.0

-----

* Removed itertools:
 * ``context`` has been removed due to a design flaw - see below for
   replacement options. (thanks to NeilGirdhar)
* Improvements to existing itertools:
 * ``side_effect`` now supports ``before`` and ``after`` keyword
   arguments. (Thanks to yardsale8)
* PyPy and PyPy3 are now supported.

The major version change is due to the removal of the ``context`` function.
Replace it with standard ``with`` statement context management:

.. code-block:: python

  Don't use context() anymore
 file_obj = StringIO()
 consume(print(x, file=f) for f in context(file_obj) for x in u'123')

  Use a with statement instead
 file_obj = StringIO()
 with file_obj as f:
     consume(print(x, file=f) for x in u'123')

2.6.0

-----

* New itertools:
 * ``adjacent`` and ``groupby_transform`` (Thanks to diazona)
 * ``always_iterable`` (Thanks to jaraco)
 * (Removed in 3.0.0) ``context`` (Thanks to yardsale8)
 * ``divide`` (Thanks to mozbhearsum)
* Improvements to existing itertools:
 * ``ilen`` is now slightly faster. (Thanks to wbolster)
 * ``peekable`` can now prepend items to an iterable. (Thanks to diazona)

2.5.0

-----

* New itertools:
 * ``distribute`` (Thanks to mozbhearsum and coady)
 * ``sort_together`` (Thanks to clintval)
 * ``stagger`` and ``zip_offset`` (Thanks to joshbode)
 * ``padded``
* Improvements to existing itertools:
 * ``peekable`` now handles negative indexes and slices with negative
   components properly.
 * ``intersperse`` is now slightly faster. (Thanks to pylang)
 * ``windowed`` now accepts a ``step`` keyword argument.
   (Thanks to pylang)
* Python 3.6 is now supported.

2.4.1

-----

* Move docs 100% to readthedocs.io.

2.4

-----

* New itertools:
 * ``accumulate``, ``all_equal``, ``first_true``, ``partition``, and
   ``tail`` from the itertools documentation.
 * ``bucket`` (Thanks to Rosuav and cvrebert)
 * ``collapse`` (Thanks to abarnet)
 * ``interleave`` and ``interleave_longest`` (Thanks to abarnet)
 * ``side_effect`` (Thanks to nvie)
 * ``sliced`` (Thanks to j4mie and coady)
 * ``split_before`` and ``split_after`` (Thanks to astronouth7303)
 * ``spy`` (Thanks to themiurgo and mathieulongtin)
* Improvements to existing itertools:
 * ``chunked`` is now simpler and more friendly to garbage collection.
   (Contributed by coady, with thanks to piskvorky)
 * ``collate`` now delegates to ``heapq.merge`` when possible.
   (Thanks to kmike and julianpistorius)
 * ``peekable``-wrapped iterables are now indexable and sliceable.
   Iterating through ``peekable``-wrapped iterables is also faster.
 * ``one`` and ``unique_to_each`` have been simplified.
   (Thanks to coady)

2.3

-----

* Added ``one`` from ``jaraco.util.itertools``. (Thanks, jaraco!)
* Added ``distinct_permutations`` and ``unique_to_each``. (Contributed by
bbayles)
* Added ``windowed``. (Contributed by bbayles, with thanks to buchanae,
jaraco, and abarnert)
* Simplified the implementation of ``chunked``. (Thanks, nvie!)
* Python 3.5 is now supported. Python 2.6 is no longer supported.
* Python 3 is now supported directly; there is no 2to3 step.

2.2

-----

* Added ``iterate`` and ``with_iter``. (Thanks, abarnert!)

2.1

-----

* Added (tested!) implementations of the recipes from the itertools
documentation. (Thanks, Chris Lonnen!)
* Added ``ilen``. (Thanks for the inspiration, Matt Basta!)

2.0

-----

* ``chunked`` now returns lists rather than tuples. After all, they're
homogeneous. This slightly backward-incompatible change is the reason for
the major version bump.
* Added ``consumer``.
* Improved test machinery.

1.1

-----

* Added ``first`` function.
* Added Python 3 support.
* Added a default arg to ``peekable.peek()``.
* Noted how to easily test whether a peekable iterator is exhausted.
* Rewrote documentation.

1.0

-----

* Initial release, with ``collate``, ``peekable``, and ``chunked``. Could
really use better docs.
Links

Update pip from 19.0.3 to 24.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant