Skip to content

Conversation

@pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Dec 8, 2025

Update attrs from 25.3.0 to 25.4.0.

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

Links

Update cattrs from 25.1.1 to 25.3.0.

Changelog

25.3.0

- **Potentially breaking**: [Abstract sets](https://docs.python.org/3/library/collections.abc.html#collections.abc.Set) are now structured into frozensets.
This allows hashability, better immutability and is more consistent with the [`collections.abc.Set`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Set) type.
See [Migrations](https://catt.rs/en/latest/migrations.html#abstract-sets-structuring-into-frozensets) for steps to restore legacy behavior.
([686](https://github.com/python-attrs/cattrs/pull/686))
- Python 3.14 is now supported and part of the test matrix.
([653](https://github.com/python-attrs/cattrs/pull/653))
- Fix unstructuring NewTypes with the {class}`BaseConverter`.
([684](https://github.com/python-attrs/cattrs/pull/684))
- Make some Hypothesis tests more robust.
([684](https://github.com/python-attrs/cattrs/pull/684))
- {func}`cattrs.strategies.include_subclasses` now works with generic parent classes and the tagged union strategy.
([683](https://github.com/python-attrs/cattrs/pull/683))

25.2.0

- **Potentially breaking**: Sequences are now structured into tuples.
This allows hashability, better immutability and is more consistent with the [`collections.abc.Sequence`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence) type.
See [Migrations](https://catt.rs/en/latest/migrations.html#sequences-structuring-into-tuples) for steps to restore legacy behavior.
([663](https://github.com/python-attrs/cattrs/pull/663))
- Add a `use_alias` parameter to {class}`cattrs.Converter`.
{func}`cattrs.gen.make_dict_unstructure_fn_from_attrs`, {func}`cattrs.gen.make_dict_unstructure_fn`,
{func}`cattrs.gen.make_dict_structure_fn_from_attrs`, {func}`cattrs.gen.make_dict_structure_fn`
and {func}`cattrs.gen.typeddicts.make_dict_structure_fn` will use the value for the `use_alias` parameter from the given converter by default now.
If you're using these functions directly, the old behavior can be restored by passing in the desired value directly.
([596](https://github.com/python-attrs/cattrs/issues/596) [#660](https://github.com/python-attrs/cattrs/pull/660))
- The [union passthrough strategy](https://catt.rs/en/stable/strategies.html#union-passthrough) now by default accepts ints for unions that contain floats but not ints,
when configured to be able to handle both ints and floats.
This more closely matches the [current typing behavior](https://typing.python.org/en/latest/spec/special-types.html#special-cases-for-float-and-complex).
([656](https://github.com/python-attrs/cattrs/issues/656) [#668](https://github.com/python-attrs/cattrs/pull/668))
- Fix unstructuring of generic classes with stringified annotations.
([661](https://github.com/python-attrs/cattrs/issues/661) [#662](https://github.com/python-attrs/cattrs/issues/662)
- For {class}`cattrs.errors.StructureHandlerNotFoundError` and {class}`cattrs.errors.ForbiddenExtraKeysError`
correctly set {attr}`BaseException.args` in `super()` and hence make them pickable.
([666](https://github.com/python-attrs/cattrs/pull/666))
- The default disambiguation hook factory is now only enabled for converters with `unstructure_strat=AS_DICT` (the default).
Since the strategy doesn't support tuples, it is skipped for `unstructure_strat=AS_TUPLE` converters.
([673](https://github.com/python-attrs/cattrs/pull/673))
- Switch to [`uv`](https://docs.astral.sh/uv/) and [`just`](https://just.systems/man/en/) in lieu of PDM, tox and Make.
See [the Contributing section](https://catt.rs/en/v25.2.0/contributing.html#get-started) for new workflow instructions.
([671](https://github.com/python-attrs/cattrs/pull/671))
Links

Update exceptiongroup from 1.3.0 to 1.3.1.

Changelog

1.3.1

- Fixed ``AttributeError: 'TracebackException' object has no attribute 'exceptions'``
when formatting unpickled TBEs from another Python process which did not apply the
``exceptiongroup`` patches
(`144 <https://github.com/agronholm/exceptiongroup/issues/144>`_)
Links

Update fonttools from 4.59.0 to 4.61.0.

Changelog

4.61.0

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

- [varLib.main]: **SECURITY** Only use basename(vf.filename) to prevent path traversal attacks when
running `fonttools varLib` command. Fixes CVE-2025-66034, see:
https://github.com/fonttools/fonttools/security/advisories/GHSA-768j-98cg-p3fv.
- [feaLib] Sort BaseLangSysRecords by tag (3986).
- Drop support for EOL Python 3.9 (3982).
- [instancer] Support --remove-overlaps for fonts with CFF2 table (3975).
- [CFF2ToCFF] Add --remove-overlaps option (3976).
- [feaLib] Raise an error for rsub with NULL target (3979).
- [bezierTools] Fix logic bug in curveCurveIntersections (3963).
- [feaLib] Error when condition sets have the same name (3958).
- [cu2qu.ufo] skip processing empty glyphs to support sparse kerning masters (3956).
- [unicodedata] Update to Unicode 17. Require ``unicodedata2 >= 17.0.0`` when installed with 'unicode' extra.

4.60.1

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

- [ufoLib] Reverted accidental method name change in ``UFOReader.getKerningGroupConversionRenameMaps``
that broke compatibility with downstream projects like defcon (3948, 3947, robotools/defcon478).
- [ufoLib] Added test coverage for ``getKerningGroupConversionRenameMaps`` method (3950).
- [subset] Don't try to subset BASE table; pass it through by default instead (3949).
- [subset] Remove empty BaseRecord entries in MarkBasePos lookups (3897, 3892).
- [subset] Add pruning for MarkLigPos and MarkMarkPos lookups (3946).
- [subset] Remove duplicate features when subsetting (3945).
- [Docs] Added documentation for the visitor module (3944).

4.60.0

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

- [pointPen] Allow ``reverseFlipped`` parameter of ``DecomposingPointPen`` to take a ``ReverseFlipped``
enum value to control whether/how to reverse contour direction of flipped components, in addition to
the existing True/False. This allows to set ``ReverseFlipped.ON_CURVE_FIRST`` to ensure that
the decomposed outline starts with an on-curve point before being reversed, for better consistency
with other segment-oriented contour transformations. The change is backward compatible, and the
default behavior hasn't changed (3934).
- [filterPen] Added ``ContourFilterPointPen``, base pen for buffered contour operations, and
``OnCurveStartPointPen`` filter to ensure contours start with an on-curve point (3934).
- [cu2qu] Fixed difference in cython vs pure-python complex division by real number (3930).
- [varLib.avar] Refactored and added some new sub-modules and scripts (3926).
* ``varLib.avar.build`` module to build avar (and a missing fvar) binaries into a possibly empty TTFont,
* ``varLib.avar.unbuild`` module to print a .designspace snippet that would generate the same avar binary,
* ``varLib.avar.map`` module to take TTFont and do the mapping, in user/normalized space,
* ``varLib.avar.plan`` module moved from ``varLib.avarPlanner``.
The bare ``fonttools varLib.avar`` script is deprecated, in favour of ``fonttools varLib.avar.build`` (or ``unbuild``).
- [interpolatable] Clarify ``linear_sum_assignment`` backend options and minimal dependency
usage (3927).
- [post] Speed up ``build_psNameMapping`` (3923).
- [ufoLib] Added typing annotations to fontTools.ufoLib (3875).

4.59.2

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

- [varLib] Clear ``USE_MY_METRICS`` component flags when inconsistent across masters (3912).
- [varLib.instancer] Avoid negative advance width/height values when instatiating HVAR/VVAR,
(unlikely in well-behaved fonts) (3918).
- [subset] Fix shaping behaviour when pruning empty mark sets (3915, harfbuzz/harfbuzz5499).
- [cu2qu] Fixed ``dot()`` product of perpendicular vectors not always returning exactly 0.0
in all Python implementations (3911)
- [varLib.instancer] Implemented fully-instantiating ``avar2`` fonts (3909).
- [feaLib] Allow float values in ``VariableScalar``'s axis locations (3906, 3907).
- [cu2qu] Handle special case in ``calc_intersect`` for degenerate cubic curves where 3 to 4
control points are equal (3904).

4.59.1

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

- [featureVars] Update OS/2.usMaxContext if possible after addFeatureVariationsRaw (3894).
- [vhmtx] raise TTLibError('not enough data...') when hmtx/vmtx are truncated (3843, 3901).
- [feaLib] Combine duplicate features that have the same set of lookups regardless of the order in which those lookups are added to the feature (3895).
- [varLib] Deprecate ``varLib.mutator`` in favor of ``varLib.instancer``. The latter
provides equivalent full (static font) instancing in addition to partial VF instancing.
CLI users should replace ``fonttools varLib.mutator`` with ``fonttools varLib.instancer``.
API users should migrate to ``fontTools.varLib.instancer.instantiateVariableFont`` (2680).
Links

Update lxml from 6.0.0 to 6.0.2.

Changelog

6.0.2

==================

Bugs fixed
----------

* LP2125278: Compilation with libxml2 2.15.0 failed.
Original patch by Xi Ruoyao.

* Setting ``decompress=True`` in the parser had no effect in libxml2 2.15.

* Binary wheels on Linux and macOS use the library version libxml2 2.14.6.
See https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.14.6

* Test failures in libxml2 2.15.0 were fixed.

Other changes
-------------

* Binary wheels for Py3.9-3.11 on the ``riscv64`` architecture were added.

* Error constants were updated to match libxml2 2.15.0.

* Built using Cython 3.1.4.

6.0.1

==================

Bugs fixed
----------

* LP2116333: ``lxml.sax._getNsTag()`` could fail with an exception on malformed input.

* GH467: Some test adaptations were made for libxml2 2.15.
Patch by Nick Wellnhofer.

* LP2119510, GH473: A Python compatibility test was fixed for Python 3.14+.
Patch by Lumír Balhar.

* GH471: Wheels for "riscv64" on recent Python versions were added.
Patch by ffgan.

* GH469: The wheel build no longer requires the ``wheel`` package unconditionally.
Patch by Miro Hrončok.

* Binary wheels use the library version libxml2 2.14.5.
See https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.14.5

* Windows binary wheels continue to use a security patched library version libxml2 2.11.9.
Links

Update msgpack from 1.1.1 to 1.1.2.

Changelog

1.1.2

=====

Release Date: 2025-10-08

This release does not change source code. It updates only building wheels:

* Update Cython to v3.1.4
* Update cibuildwheel to v3.2.0
* Drop Python 3.8
* Add Python 3.14
* Add windows-arm
Links

Update orjson from 3.11.0 to 3.11.5.

Changelog

3.11.5

Changed

- Show simple error message instead of traceback when attempting to
build on unsupported Python versions.

3.11.4

Changed

- ABI compatibility with CPython 3.15 alpha 1.
- Publish PyPI wheels for 3.14 and manylinux i686, manylinux arm7,
manylinux ppc64le, manylinux s390x.
- Build now requires a C compiler.

3.11.3

Fixed

- Fix PyPI project metadata when using maturin 1.9.2 or later.

3.11.2

Fixed

- Fix build using Rust 1.89 on amd64.

Changed

- Build now depends on Rust 1.85 or later instead of 1.82.

3.11.1

Changed

- Publish PyPI wheels for CPython 3.14.

Fixed

- Fix `str` on big-endian architectures. This was introduced in 3.11.0.
Links

Update typing-extensions from 4.14.1 to 4.15.0.

Changelog

4.15.0

No user-facing changes since 4.15.0rc1.

4.15.0rc1

- Add the `typing_extensions.disjoint_base` decorator, as specified
in PEP 800. Patch by Jelle Zijlstra.
- Add `typing_extensions.type_repr`, a backport of
[`annotationlib.type_repr`](https://docs.python.org/3.14/library/annotationlib.html#annotationlib.type_repr),
introduced in Python 3.14 (CPython PR [124551](https://github.com/python/cpython/pull/124551),
originally by Jelle Zijlstra). Patch by Semyon Moroz.
- Fix behavior of type params in `typing_extensions.evaluate_forward_ref`. Backport of
CPython PR [137227](https://github.com/python/cpython/pull/137227) by Jelle Zijlstra.
Links

Update black from 25.1.0 to 25.11.0.

Changelog

25.11.0

Highlights

- Enable base 3.14 support (4804)
- Add support for the new Python 3.14 t-string syntax introduced by PEP 750 (4805)

Stable style

- Fix bug where comments between ` fmt: off` and ` fmt: on` were reformatted (4811)
- Comments containing fmt directives now preserve their exact formatting instead of
being normalized (4811)

Preview style

- Move `multiline_string_handling` from `--unstable` to `--preview` (4760)
- Fix bug where module docstrings would be treated as normal strings if preceded by
comments (4764)
- Fix bug where python 3.12 generics syntax split line happens weirdly (4777)
- Standardize type comments to form ` type: <value>` (4645)
- Fix `fix_fmt_skip_in_one_liners` preview feature to respect ` fmt: skip` for compound
statements with semicolon-separated bodies (4800)

Configuration

- Add `no_cache` option to control caching behavior. (4803)

Packaging

- Releases now include arm64 Linux binaries (4773)

Output

- Write unchanged content to stdout when excluding formatting from stdin using pipes
(4610)

_Blackd_

- Implemented BlackDClient. This simple python client allows to easily send formatting
requests to blackd (4774)

Integrations

- Enable 3.14 base CI (4804)
- Enhance GitHub Action `psf/black` to support the `required-version` major-version-only
"stability" format when using pyproject.toml (4770)
- Improve error message for vim plugin users. It now handles independently vim version
- Vim: Warn on unsupported Vim and Python versions independently (4772)
- Vim: Print the import paths when importing black fails (4675)
- Vim: Fix handling of virtualenvs that have a different Python version (4675)

25.9.0

Highlights

- Remove support for pre-python 3.7 `await/async` as soft keywords/variable names
(4676)

Stable style

- Fix crash while formatting a long `del` statement containing tuples (4628)
- Fix crash while formatting expressions using the walrus operator in complex `with`
statements (4630)
- Handle ` fmt: skip` followed by a comment at the end of file (4635)
- Fix crash when a tuple appears in the `as` clause of a `with` statement (4634)
- Fix crash when tuple is used as a context manager inside a `with` statement (4646)
- Fix crash when formatting a `\` followed by a `\r` followed by a comment (4663)
- Fix crash on a `\\r\n` (4673)
- Fix crash on `await ...` (where `...` is a literal `Ellipsis`) (4676)
- Fix crash on parenthesized expression inside a type parameter bound (4684)
- Fix crash when using line ranges excluding indented single line decorated items
(4670)

Preview style

- Fix a bug where one-liner functions/conditionals marked with ` fmt: skip` would still
be formatted (4552)
- Improve `multiline_string_handling` with ternaries and dictionaries (4657)
- Fix a bug where `string_processing` would not split f-strings directly after
expressions (4680)
- Wrap the `in` clause of comprehensions across lines if necessary (4699)
- Remove parentheses around multiple exception types in `except` and `except*` without
`as`. (4720)
- Add `\r` style newlines to the potential newlines to normalize file newlines both from
and to (4710)

Parser

- Rewrite tokenizer to improve performance and compliance (4536)
- Fix bug where certain unusual expressions (e.g., lambdas) were not accepted in type
parameter bounds and defaults. (4602)

Performance

- Avoid using an extra process when running with only one worker (4734)

Integrations

- Fix the version check in the vim file to reject Python 3.8 (4567)
- Enhance GitHub Action `psf/black` to read Black version from an additional section in
pyproject.toml: `[project.dependency-groups]` (4606)
- Build gallery docker image with python3-slim and reduce image size (4686)

Documentation

- Add FAQ entry for windows emoji not displaying (4714)
Links

Update click from 8.1.8 to 8.3.1.

Changelog

8.3.0

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

Released 2025-09-17

-   **Improved flag option handling**: Reworked the relationship between ``flag_value``
 and ``default`` parameters for better consistency:

 * The ``default`` parameter value is now preserved as-is and passed directly
   to CLI functions (no more unexpected transformations)
 * Exception: flag options with ``default=True`` maintain backward compatibility
   by defaulting to their ``flag_value``
 * The ``default`` parameter can now be any type (``bool``, ``None``, etc.)
 * Fixes inconsistencies reported in: :issue:`1992` :issue:`2514` :issue:`2610`
   :issue:`3024` :pr:`3030`
-   Allow ``default`` to be set on ``Argument`` for ``nargs = -1``. :issue:`2164`
 :pr:`3030`
-   Show correct auto complete value for ``nargs`` option in combination with flag
 option :issue:`2813`
-   Fix handling of quoted and escaped parameters in Fish autocompletion. :issue:`2995` :pr:`3013`
-   Lazily import ``shutil``. :pr:`3023`
-   Properly forward exception information to resources registered with
 ``click.core.Context.with_resource()``. :issue:`2447` :pr:`3058`
-   Fix regression related to EOF handling in ``CliRunner``. :issue:`2939` :pr:`2940`

8.2.2

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

Released 2025-07-31

-   Fix reconciliation of ``default``, ``flag_value`` and ``type`` parameters for
 flag options, as well as parsing and normalization of environment variables.
 :issue:`2952` :pr:`2956`
-   Fix typing issue in ``BadParameter`` and ``MissingParameter`` exceptions for the
 parameter ``param_hint`` that did not allow for a sequence of string where the
 underlying function ``_join_param_hints`` allows for it. :issue:`2777` :pr:`2990`
-   Use the value of ``Enum`` choices to render their default value in help
 screen. Refs :issue:`2911` :pr:`3004`
-   Fix completion for the Z shell (``zsh``) for completion items containing
 colons. :issue:`2703` :pr:`2846`
-   Don't include envvar in error hint when not configured. :issue:`2971` :pr:`2972`
-   Fix a rare race in ``click.testing.StreamMixer``'s finalization that manifested
 as a ``ValueError`` on close in a multi-threaded test session.
 :issue:`2993` :pr:`2991`

8.2.1

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

Released 2025-05-20

-   Fix flag value handling for flag options with a provided type. :issue:`2894`
 :issue:`2897` :pr:`2930`
-   Fix shell completion for nested groups. :issue:`2906` :pr:`2907`
-   Flush ``sys.stderr`` at the end of ``CliRunner.invoke``. :issue:`2682`
-   Fix EOF handling for stdin input in CliRunner. :issue:`2787`

8.2.0

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

Released 2025-05-10

-   Drop support for Python 3.7, 3.8, and 3.9. :pr:`2588` :pr:`2893`
-   Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.
 :pr:`2438`
-   Use ``flit_core`` instead of ``setuptools`` as build backend. :pr:`2543`
-   Deprecate the ``__version__`` attribute. Use feature detection, or
 ``importlib.metadata.version("click")``, instead. :issue:`2598`
-   ``BaseCommand`` is deprecated. ``Command`` is the base class for all
 commands. :issue:`2589`
-   ``MultiCommand`` is deprecated. ``Group`` is the base class for all group
 commands. :issue:`2590`
-   The current parser and related classes and methods, are deprecated.
 :issue:`2205`

 -   ``OptionParser`` and the ``parser`` module, which is a modified copy of
     ``optparse`` in the standard library.
 -   ``Context.protected_args`` is unneeded. ``Context.args`` contains any
     remaining arguments while parsing.
 -   ``Parameter.add_to_parser`` (on both ``Argument`` and ``Option``) is
     unneeded. Parsing works directly without building a separate parser.
 -   ``split_arg_string`` is moved from ``parser`` to ``shell_completion``.

-   Enable deferred evaluation of annotations with
 ``from __future__ import annotations``. :pr:`2270`
-   When generating a command's name from a decorated function's name, the
 suffixes ``_command``, ``_cmd``, ``_group``, and ``_grp`` are removed.
 :issue:`2322`
-   Show the ``types.ParamType.name`` for ``types.Choice`` options within
 ``--help`` message if ``show_choices=False`` is specified.
 :issue:`2356`
-   Do not display default values in prompts when ``Option.show_default`` is
 ``False``. :pr:`2509`
-   Add ``get_help_extra`` method on ``Option`` to fetch the generated extra
 items used in ``get_help_record`` to render help text. :issue:`2516`
 :pr:`2517`
-   Keep stdout and stderr streams independent in ``CliRunner``. Always
 collect stderr output and never raise an exception. Add a new
 output stream to simulate what the user sees in its terminal. Removes
 the ``mix_stderr`` parameter in ``CliRunner``. :issue:`2522` :pr:`2523`
-   ``Option.show_envvar`` now also shows environment variable in error messages.
 :issue:`2695` :pr:`2696`
-   ``Context.close`` will be called on exit. This results in all
 ``Context.call_on_close`` callbacks and context managers added via
 ``Context.with_resource`` to be closed on exit as well. :pr:`2680`
-   Add ``ProgressBar(hidden: bool)`` to allow hiding the progressbar. :issue:`2609`
-   A ``UserWarning`` will be shown when multiple parameters attempt to use the
 same name. :issue:`2396`
-   When using ``Option.envvar`` with ``Option.flag_value``, the ``flag_value``
 will always be used instead of the value of the environment variable.
 :issue:`2746` :pr:`2788`
-   Add ``Choice.get_invalid_choice_message`` method for customizing the
 invalid choice message. :issue:`2621` :pr:`2622`
-   If help is shown because ``no_args_is_help`` is enabled (defaults to ``True``
 for groups, ``False`` for commands), the exit code is 2 instead of 0.
 :issue:`1489` :pr:`1489`
-   Contexts created during shell completion are closed properly, fixing
 a ``ResourceWarning`` when using ``click.File``. :issue:`2644` :pr:`2800`
 :pr:`2767`
-   ``click.edit(filename)`` now supports passing an iterable of filenames in
 case the editor supports editing multiple files at once. Its return type
 is now also typed: ``AnyStr`` if ``text`` is passed, otherwise ``None``.
 :issue:`2067` :pr:`2068`
-   Specialized typing of ``progressbar(length=...)`` as ``ProgressBar[int]``.
 :pr:`2630`
-   Improve ``echo_via_pager`` behaviour in face of errors.
 :issue:`2674`

 -   Terminate the pager in case a generator passed to ``echo_via_pager``
     raises an exception.
 -   Ensure to always close the pipe to the pager process and wait for it
     to terminate.
 -   ``echo_via_pager`` will not ignore ``KeyboardInterrupt`` anymore. This
     allows the user to search for future output of the generator when
     using less and then aborting the program using ctrl-c.

-   ``deprecated: bool | str`` can now be used on options and arguments. This
 previously was only available for ``Command``. The message can now also be
 customised by using a ``str`` instead of a ``bool``. :issue:`2263` :pr:`2271`

 -   ``Command.deprecated`` formatting in ``--help`` changed from
     ``(Deprecated) help`` to ``help (DEPRECATED)``.
 -   Parameters cannot be required nor prompted or an error is raised.
 -   A warning will be printed when something deprecated is used.

-   Add a ``catch_exceptions`` parameter to ``CliRunner``. If
 ``catch_exceptions`` is not passed to ``CliRunner.invoke``, the value
 from ``CliRunner`` is used. :issue:`2817` :pr:`2818`
-   ``Option.flag_value`` will no longer have a default value set based on
 ``Option.default`` if ``Option.is_flag`` is ``False``. This results in
 ``Option.default`` not needing to implement `__bool__`. :pr:`2829`
-   Incorrect ``click.edit`` typing has been corrected. :pr:`2804`
-   ``Choice`` is now generic and supports any iterable value.
 This allows you to use enums and other non-``str`` values. :pr:`2796`
 :issue:`605`
-   Fix setup of help option's defaults when using a custom class on its
 decorator. Removes ``HelpOption``. :issue:`2832` :pr:`2840`
Links

Update coverage from 7.9.2 to 7.12.0.

Changelog

7.12.0

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

- The HTML report now shows separate coverage totals for statements and
branches, as well as the usual combined coverage percentage. Thanks to Ryuta
Otsuka for the `discussion <issue 2081_>`_ and the `implementation
<pull 2085_>`_.

- The JSON report now includes separate coverage totals for statements and
branches, thanks to `Ryuta Otsuka <pull 2090_>`_.

- Fix: ``except*`` clauses were not handled properly under the "sysmon"
measurement core, causing KeyError exceptions as described in `issue 2086`_.
This is now fixed.

- Fix: we now defend against aggressive mocking of ``open()`` that could cause
errors inside coverage.py.  An example of a failure is in `issue 2083`_.

- Fix: in unusual cases where a test suite intentionally exhausts the system's
file descriptors to test handling errors in ``open()``, coverage.py would
fail when trying to open source files, as described in `issue 2091`_.  This
is now fixed.

- A small tweak to the HTML report: file paths now use thin spaces around
slashes to make them easier to read.

.. _issue 2081: https://github.com/coveragepy/coveragepy/issues/2081
.. _issue 2083: https://github.com/coveragepy/coveragepy/issues/2083
.. _pull 2085: https://github.com/coveragepy/coveragepy/pull/2085
.. _issue 2086: https://github.com/coveragepy/coveragepy/issues/2086
.. _pull 2090: https://github.com/coveragepy/coveragepy/pull/2090
.. _issue 2091: https://github.com/coveragepy/coveragepy/issues/2091


.. _changes_7-11-3:

7.11.3

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

- Fix: the 7.11.1 changes meant that conflicts between a requested measurement
core and other settings would raise an error. This was a breaking change from
previous behavior, as reported in `issue 2076`_ and `issue 2078`_.

The previous behavior has been restored: when the requested core conflicts
with other settings, another core is used instead, and a warning is issued.

- For contributors: the repo has moved from Ned's `nedbat GitHub account`_ to
the `coveragepy GitHub organization`_. The default branch has changed from
master to main.

.. _issue 2076: https://github.com/coveragepy/coveragepy/issues/2076
.. _issue 2078: https://github.com/coveragepy/coveragepy/issues/2078
.. _nedbat GitHub account: https://github.com/nedbat
.. _coveragepy GitHub organization: https://github.com/coveragepy


.. _changes_7-11-2:

7.11.2

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

- Fix: using the "sysmon" measurement core in 7.11.1, if Python code was
claimed to come from a non-Python file, a ``NotPython`` exception could be
raised. This could happen for example with Jinja templates compiled to
Python, as reported in `issue 2077`_. This is now fixed.

- Doc: corrected the first entry in the 7.11.1 changelog.

.. _issue 2077: https://github.com/coveragepy/coveragepy/issues/2077


.. _changes_7-11-1:

7.11.1

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

- Fix: some chanages to details of how the measurement core is chosen, and how
conflicting settings are handled. The "sysmon" core cannot be used with some
conurrency settings, with dynamic context, and in Python 3.12/3.13, with
branch measurement.

- If the core is not specified and defaults to "sysmon" (Python 3.14+), but
 other settings conflict with sysmon, then the "ctrace" core will be used
 instead with no warning. For concurrency conflicts, this used to produce an
 error, as described in `issue 2064`_.

- If the "sysmon" core is explicitly requested in your configuration, but
 other settings conflict, an error is now raised. This used to produce a
 warning.

- Fix: some multi-line case clauses or for loops (and probably other
constructs) could cause incorrect claims of missing branches with the
sys.monitoring core, as described in `issue 2070`_. This is now fixed.

- Fix: when running in pytest under coverage, a ``breakpoint()`` would stop in
the wrong frame, one level down from where it should, as described in `issue
1420`_. This was due to a coverage change in v6.4.1 that seemed to give a
slight performance improvement, but I couldn't reproduce the performance
gain, so it's been reverted, fixing the debugger problem.

- A new debug option ``--debug=core`` shows which core is in use and why.

- Split ``sqlite`` debugging information out of the ``sys`` :ref:`coverage
debug <cmd_debug>` and :ref:`cmd_run_debug` options since it's bulky and not
very useful.

- Updated the :ref:`howitworks` page to better describe the three different
measurement cores.

.. _issue 1420: https://github.com/coveragepy/coveragepy/issues/1420
.. _issue 2064: https://github.com/coveragepy/coveragepy/issues/2064
.. _issue 2070: https://github.com/coveragepy/coveragepy/issues/2070


.. _changes_7-11-0:

7.11.0

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

- Dropped support for Python 3.9, declared support for Python 3.15 alpha.


.. _changes_7-10-7:

7.10.7

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

- Performance: with branch coverage in large files, generating HTML, JSON, or
LCOV reports could take far too long due to some quadratic behavior when
creating the function and class index pages.  This is now fixed, closing
`issue 2048`_.  Thanks to Daniel Diniz for help diagnosing the problem.

- Most warnings and a few errors now have links to a page in the docs
explaining the specific message.  Closes `issue 1921`_.

.. _issue 1921: https://github.com/coveragepy/coveragepy/issues/1921
.. _issue 2048: https://github.com/coveragepy/coveragepy/issues/2048


.. _changes_7-10-6:

7.10.6

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

- Fix: ``source`` directories were not properly communicated to subprocesses
that ran in different directories, as reported in `issue 1499`_.  This is now
fixed.

- Performance: `Alex Gaynor continues fine-tuning <pull 2038_>`_ the speed of
combination, especially with many contexts.

.. _issue 1499: https://github.com/coveragepy/coveragepy/issues/1499
.. _pull 2038: https://github.com/coveragepy/coveragepy/pull/2038


.. _changes_7-10-5:

7.10.5

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

- Big speed improvements for ``coverage combine``: it's now about twice as
fast! Huge thanks to Alex Gaynor for pull requests `2032 <pull 2032_>`_,
`2033 <pull 2033_>`_, and `2034 <pull 2034_>`_.

.. _pull 2032: https://github.com/coveragepy/coveragepy/pull/2032
.. _pull 2033: https://github.com/coveragepy/coveragepy/pull/2033
.. _pull 2034: https://github.com/coveragepy/coveragepy/pull/2034


.. _changes_7-10-4:

7.10.4

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

- Added ``patch = fork`` for times when the built-in forking support is
insufficient.

- Fix: ``patch = execv`` also inherits the entire coverage configuration now.


.. _changes_7-10-3:

7.10.3

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

- Fixes for ``patch = subprocess``:

- If subprocesses spawned yet more subprocesses simultaneously, some coverage
 could be missed.  This is now fixed, closing `issue 2024`_.

- If subprocesses were created in other directories, their data files were
 stranded there and not combined into the totals, as described in `issue
 2025`_.  This is now fixed.

- On Windows (or maybe only some Windows?) the patch would fail with a
 ``ModuleNotFound`` error trying to import coverage.  This is now fixed,
 closing `issue 2022`_.

- Originally only options set in the coverage configuration file would apply
 to subprocesses.  Options set on the ``coverage run`` command line (such as
 ``--branch``) wouldn't be communicated to the subprocesses.  This could
 lead to combining failures, as described in `issue 2021`_. Now the entire
 configuration is used in subprocesses, regardless of its origin.

- Added ``debug=patch`` to help diagnose problems.

- Fix: really close all SQLite databases, even in-memory ones. Closes `issue
2017`_.

.. _issue 2017: https://github.com/coveragepy/coveragepy/issues/2017
.. _issue 2021: https://github.com/coveragepy/coveragepy/issues/2021
.. _issue 2022: https://github.com/coveragepy/coveragepy/issues/2022
.. _issue 2024: https://github.com/coveragepy/coveragepy/issues/2024
.. _issue 2025: https://github.com/coveragepy/coveragepy/issues/2025


.. _changes_7-10-2:

7.10.2

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

- Fix: some code with NOP bytecodes could report missing branches that are
actually executed. This is now fixed, closing `issue 1999`_. Python 3.9
still shows the problem.

.. _issue 1999: https://github.com/coveragepy/coveragepy/issues/1999


.. _changes_7-10-1:

7.10.1

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

- Fix: the exclusion for ``if TYPE_CHECKING:`` was wrong: it marked the branch
as partial, but it should have been a line exclusion so the entire clause
would be excluded. Improves `issue 831`_.

- Fix: changed where .pth files are written for ``patch = subprocess``, closing
`issue 2006`_.

.. _issue 2006: https://github.com/coveragepy/coveragepy/issues/2006


.. _changes_7-10-0:

7.10.0

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

- A new configuration option: ":ref:`config_run_patch`" specifies named patches
to work around some limitations in coverage measurement.  These patches are
available:

- ``patch = _exit`` lets coverage save its data even when :func:`os._exit()
 <python:os._exit>` is used to abruptly end the process.  This closes
 long-standing `issue 310`_ as well as its duplicates: `issue 312`_, `issue
 1673`_, `issue 1845`_, and `issue 1941`_.

- ``patch = subprocess`` measures coverage in Python subprocesses created
 with :mod:`subprocess`, :func:`os.system`, or one of the :func:`execv
 <python:os.execl>` or :func:`spawnv <python:os.spawnl>` family of
 functions. Closes old `issue 367`_, its duplicate `issue 378`_ and old
 `issue 689`_.

- ``patch = execv`` adjusts the :func:`execv <python:os.execl>` family of
 functions to save coverage data before ending the current program and
 starting the next. Not available on Windows. Closes `issue 43`_ after 15
 years!

- The HTML report now dimly colors subsequent lines in multi-line statements.
They used to have no color.  This gives a better indication of the amount of
code missing in the report.  Closes `issue 1308`_.

- Two new exclusion patterns are part of the defaults: ``...`` is automatically
excluded as a line and ``if TYPE_CHECKING:`` is excluded as a branch.  Closes
`issue 831`_.

- A new command-line option: ``--save-signal=USR1`` specifies a signal that
coverage.py will listen for.  When the signal is sent, the coverage data will
be saved.  This makes it possible to save data from within long-running
processes.  Thanks, `Arkady Gilinsky <pull 1998_>`_.

- A new configuration option: ":ref:`config_report_partial_also`" is a list of
regexes to add as pragmas for partial branches.  This parallels the
":ref:`config_report_exclude_also`" setting for adding line exclusion
patterns.

- A few file path configuration settings didn't allow for tilde expansion:
:ref:`config_json_output`, :ref:`config_lcov_output` and
:ref:`config_run_debug_file`.  This is now fixed.

- Wheels are included for 3.14 now that 3.14 rc1 is available.

- We no longer ship a PyPy-specific wheel. PyPy will install the pure-Python
wheel.  Closes `issue 2001`_.

- In the very unusual situation of not having a current frame, coverage no
longer crashes when using the sysmon core, fixing `issue 2005`_.

.. _issue 43: https://github.com/coveragepy/coveragepy/issues/43
.. _issue 310: https://github.com/coveragepy/coveragepy/issues/310
.. _issue 312: https://github.com/coveragepy/coveragepy/issues/312
.. _issue 367: https://github.com/coveragepy/coveragepy/issues/367
.. _issue 378: https://github.com/coveragepy/coveragepy/issues/378
.. _issue 689: https://github.com/coveragepy/coveragepy/issues/689
.. _issue 831: https://github.com/coveragepy/coveragepy/issues/831
.. _issue 1308: https://github.com/coveragepy/coveragepy/issues/1308
.. _issue 1673: https://github.com/coveragepy/coveragepy/issues/1673
.. _issue 1845: https://github.com/coveragepy/coveragepy/issues/1845
.. _issue 1941: https://github.com/coveragepy/coveragepy/issues/1941
.. _pull 1998: https://github.com/coveragepy/coveragepy/pull/1998
.. _issue 2001: https://github.com/coveragepy/coveragepy/issues/2001
.. _issue 2005: https://github.com/coveragepy/coveragepy/issues/2005

.. _changes_7-9-2:
Links

Update iniconfig from 2.1.0 to 2.3.0.

Changelog

2.2.0

=====

* drop Python 3.8 and 3.9 support (now requires Python >= 3.10)
* add Python 3.14 classifier
* migrate from hatchling to setuptools 77 with setuptools_scm
* adopt PEP 639 license specifiers and PEP 740 build attestations
* migrate from black + pyupgrade to ruff
* migrate CI to uv and unified test workflow
* automate GitHub releases and PyPI publishing via Trusted Publishing
* include tests in sdist
* modernize code for Python 3.10+ (remove __future__ annotations, TYPE_CHECKING guards)
* rename _ParsedLine to ParsedLine
Links

Update isort from 6.0.1 to 7.0.0.

Changelog

6.1.0

- Add python 3.14 classifier and badge (2409) staticdev
- Drop use of non-standard pkg_resources API (2405) dvarrazzo
Links

Update mypy from 1.17.0 to 1.19.0.

Changelog

1.19

We’ve just uploaded mypy 1.19.0 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
Mypy is a static type checker for Python. This release includes new features, performance
improvements and bug fixes. You can install it as follows:

 python3 -m pip install -U mypy

You can read the full documentation for this release on [Read the Docs](http://mypy.readthedocs.io).

Python 3.9 Support Ending Soon

This is the last mypy feature release that supports Python 3.9, which reached
end of life in October 2025.

Performance Improvements
- Switch to a more dynamic SCC processing logic (Ivan Levkivskyi, PR [20053](https://github.com/python/mypy/pull/20053))
- Speed up type aliases (Ivan Levkivskyi, PR [19810](https://github.com/python/mypy/pull/19810))

Fixed‑Format Cache Improvements

Mypy uses a cache by default to speed up incremental runs by reusing partial results
from earlier runs. Mypy 1.18 added a new binary fixed-format cache representation as
an experimental feature. The feature is no longer experimental, and we are planning
to enable it by default in a future mypy release (possibly 1.20), since it's faster
and uses less space than the original, JSON-based cache format. Use
`--fixed-format-cache` to enable the fixed-format cache.

Mypy now has an extra dependency on the `librt` PyPI package, as it's needed for
cache serialization and deserialization.

Mypy ships with a tool to convert fixed-format cache files to the old JSON format.
Example of how to use this:

$ python -m mypy.exportjson .mypy_cache/.../my_module.data.ff


This way existing use cases that parse JSON cache files can be supported when using
the new format, though an extra conversion step is needed.

This release includes these improvements:

- Force-discard cache if cache format changed (Ivan Levkivskyi, PR [20152](https://github.com/python/mypy/pull/20152))
- Add tool to convert binary cache files to JSON (Jukka Lehtosalo, PR [20071](https://github.com/python/mypy/pull/20071))
- Use more efficient serialization format for long integers in cache files (Jukka Lehtosalo, PR [20151](https://github.com/python/mypy/pull/20151))
- More robust packing of floats in fixed-format cache (Ivan Levkivskyi, PR [20150](https://github.com/python/mypy/pull/20150))
- Use self-descriptive cache with type tags (Ivan Levkivskyi, PR [20137](https://github.com/python/mypy/pull/20137))
- Use fixed format for cache metas (Ivan Levkivskyi, PR [20088](https://github.com/python/mypy/pull/20088))
- Make metas more compact; fix indirect suppression (Ivan Levkivskyi, PR [20075](https://github.com/python/mypy/pull/20075))
- Use dedicated tags for most common cached instances (Ivan Levkivskyi, PR [19762](https://github.com/python/mypy/pull/19762))

PEP 747: Annotating Type Forms

Mypy now recognizes `TypeForm[T]` as a type and implements
[PEP 747](https://peps.python.org/pep-0747/). The feature is still experimental,
and it's disabled by default. Use `--enable-incomplete-feature=TypeForm` to
enable type forms. A type form object captures the type information provided by a
runtime type expression. Example:

python
from typing_extensions import TypeForm

def trycast[T](typx: TypeForm[T], value: object) -> T | None: ...

def example(o: object) -> None:
  'int | str' below is an expression that represents a type.
  Unlike type[T], TypeForm[T] can be used with all kinds of types,
  including union types.
 x = trycast(int | str, o)
 if x is not None:
      Type of 'x' is 'int | str' here
     ...


This feature was contributed by David Foster (PR [19596](https://github.com/python/mypy/pull/19596)).

Fixes to Crashes
- Do not push partial types to the binder (Stanislav Terliakov, PR [20202](https://github.com/python/mypy/pull/20202))
- Fix crash on recursive tuple with Hashable (Ivan Levkivskyi, PR [20232](https://github.com/python/mypy/pull/20232))
- Fix crash related to decorated functions (Stanislav Terliakov, PR [20203](https://github.com/python/mypy/pull/20203))
- Do not abort constructing TypeAlias if only type parameters hold us back (Stanislav Terliakov, PR [20162](https://github.com/python/mypy/pull/20162))
- Use the fallback for `ModuleSpec` early if it can never be resolved (Stanislav Terliakov, PR [20167](https://github.com/python/mypy/pull/20167))
- Do not store deferred NamedTuple fields as redefinitions (Stanislav Terliakov, PR [20147](https://github.com/python/mypy/pull/20147))
- Discard partial types remaining after inference failure (Stanislav Terliakov, PR [20126](https://github.com/python/mypy/pull/20126))
- Fix an infinite recursion bug (Stanislav Terliakov, PR [20127](https://github.com/python/mypy/pull/20127))
- Fix IsADirectoryError for namespace packages when using --linecoverage-report (wyattscarpenter, PR [20109](https://github.com/python/mypy/pull/20109))
- Fix an internal error when creating cobertura output for namespace package (wyattscarpenter, PR [20112](https://github.com/python/mypy/pull/20112))
- Allow type parameters reusing the name missing from current module (Stanislav Terliakov, PR [20081](https://github.com/python/mypy/pull/20081))
- Prevent TypeGuardedType leak from narrowing declared type as part of type variable bound (Stanislav Terliakov, PR [20046](https://github.com/python/mypy/pull/20046))
- Fix crash on invalid unpack in base class (Ivan Levkivskyi, PR [19962](https://github.com/python/mypy/pull/19962))
- Traverse ParamSpec prefix where we should (Ivan Levkivskyi, PR [19800](https://github.com/python/mypy/pull/19800))
- Fix daemon crash related to imports (Ivan Levkivskyi, PR [20271](https://github.com/python/mypy/pull/20271))

Mypyc: Support for `__getattr__`, `__setattr__`, and `__delattr__`

Mypyc now has partial support for `__getattr__`, `__setattr__` and
`__delattr__` methods in native classes.

Note that native attributes are not stored using `__dict__`. Setting attributes
directly while bypassing `__setattr__` is possible by using
`super().__setattr__(...)` or `object.__setattr__(...)`, but not via `__dict__`.

Example:
python
class Demo:
 _data: dict[str, str]

 def __init__(self) -> None:
      Initialize data dict without calling our __setattr__
     super().__setattr__("_data", {})

 def __setattr__(self, name: str, value: str) -> None:
     print(f"Setting {name} = {value!r}")

     if name == "_data":
         raise AttributeError("'_data' cannot be set")

     self._data[name] = value

 def __getattr__(self, name: str) -> str:
     print(f"Getting {name}")

     try:
         return self._data[name]
     except KeyError:
         raise AttributeError(name)

d = Demo()
d.x = "hello"
d.y = "world"

print(d.x)
print(d.y)


Related PRs:
- Generate `__setattr__` wrapper (Piotr Sawicki, PR [19937](https://github.com/python/mypy/pull/19937))
- Generate `__getattr__` wrapper (Piotr Sawicki, PR [19909](https://github.com/python/mypy/pull/19909))
- Support deleting attributes in `__setattr__` wrapper (Piotr Sawicki, PR [19997](https://github.com/python/mypy/pull/19997))

Miscellaneous Mypyc Improvements
- Fix `__new__` in native classes with inheritance (Piotr Sawicki, PR [20302](https://github.com/python/mypy/pull/20302))
- Fix crash on `super` in generator (Ivan Levkivskyi, PR [20291](https://github.com/python/mypy/pull/20291))
- Fix calling base class async method using `super()` (Jukka Lehtosalo, PR [20254](https://github.com/python/mypy/pull/20254))
- Fix async or generator methods in traits (Jukka Lehtosalo, PR [20246](https://github.com/python/mypy/pull/20246))
- Optimize equality check with string literals (BobTheBuidler, PR [19883](https://github.com/python/mypy/pull/19883))
- Fix inheritance of async defs (Jukka Lehtosalo, PR [20044](https://github.com/python/mypy/pull/20044))
- Reject invalid `mypyc_attr` args (BobTheBuidler, PR [19963](https://github.com/python/mypy/pull/19963))
- Optimize `isinstance` with tuple of primitive types (BobTheBuidler, PR [19949](https://github.com/python/mypy/pull/19949))
- Optimize away first index check in for loops if length > 1 (BobTheBuidler, PR [19933](https://github.com/python/mypy/pull/19933))
- Fix broken exception/cancellation handling in async def (Jukka Lehtosalo, PR [19951](https://github.com/python/mypy/pull/19951))
- Transform `object.__new__` inside `__new__` (Piotr Sawicki, PR [19866](https://github.com/python/mypy/pull/19866))
- Fix crash with NewType and other non-class types in incremental builds (Jukka Lehtosalo, PR [19837](https://github.com/python/mypy/pull/19837))
- Optimize container creation from expressions with length known at compile time (BobTheBuidler, PR [19503](https://github.com/python/mypy/pull/19503))
- Allow per-class free list to be used with inheritance (Jukka Lehtosalo, PR [19790](https://github.com/python/mypy/pull/19790))
- Fix object finalization (Marc Mueller, PR [19749](https://github.com/python/mypy/pull/19749))
- Allow defining a single-item free "list" for a native class (Jukka Lehtosalo, PR [19785](https://github.com/python/mypy/pull/19785))
- Speed up unary "not" (Jukka Lehtosalo, PR [19774](https://github.com/python/mypy/pull/19774))

Stubtest Improvements
- Check `_value_` for ellipsis-valued stub enum members (Stanislav Terliakov, PR [19760](https://github.com/python/mypy/pull/19760))
- Include function name in overload assertion messages (Joren Hammudoglu, PR [20063](https://github.com/python/mypy/pull/20063))
- Fix special case in analyzing function signature (iap, PR [19822](https://github.com/python/mypy/pull/19822))
- Improve `allowlist` docs with better example (sobolevn, PR [20007](https://github.com/python/mypy/pull/20007))

Documentation Updates
- Update duck type compatibility: mention strict-bytes and mypy 2.0 (wyattscarpenter, PR [20121](https://github.com/python/mypy/pull/20121))
- Document `--enable-incomplete-feature TypeForm` (wyattscarpenter, PR [20173](https://github.com/python/mypy/pull/20173))
- Change the inline TypedDict example (wyattscarpenter, PR [20172](https://github.com/python/mypy/pull/20172))
- Replace `List` with built‑in `list` (PEP 585) (Thiago J. Barbalho, PR [20000](https://github.com/python/mypy/pull/20000))
- Improve junit documentation (wyattscarpenter, PR [19867](https://github.com/python/mypy/pull/19867))

Other Notable Fixes and Improvements
- Fix annotated with function as type keyword list parameter (KarelKenens, PR [20094](https://github.com/python/mypy/pull/20094))
- Fix errors for raise NotImplemented (Shantanu, PR [20168](https://github.com/python/mypy/pull/20168))
- Don't let help formatter line-wrap URLs (Frank Dana, PR [19825](https://github.com/python/mypy/pull/19825))
- Do not cache fast container types inside lambdas (Stanislav Terliakov, PR [20166](https://github.com/python/mypy/pull/20166))
- Respect force-union-syntax flag in error hint (Marc Mueller, PR [20165](https://github.com/python/mypy/pull/20165))
- Fix type checking of dict type aliases (Shantanu, PR [20170](https://github.com/python/mypy/pull/20170))
- Use pretty callable formatting more often for callable expressions (Theodore Ando, PR [20128](https://github.com/python/mypy/pull/20128))
- Use dummy concrete type instead of `Any` when checking protocol variance (bzoracler, PR [20110](https://github.com/python/mypy/pull/20110))
- PEP 696: Fix swapping TypeVars with defaults (Randolf Scholz, PR [19449](https://github.com/python/mypy/pull/19449))
- Fix narrowing of class pattern with union type (Randolf Scholz, PR [19517](https://github.com/python/mypy/pull/19517))
- Do not emit unreachable warnings for lines that return `NotImplemented` (Christoph Tyralla, PR [20083](https://github.com/python/mypy/pull/20083))
- Fix matching against `typing.Callable` and `Protocol` types (Randolf Scholz, PR [19471](https://github.com/python/mypy/pull/19471))
- Make `--pretty` work better on multi-line issues (A5rocks, PR [20056](https://github.com/python/mypy/pull/20056))
- More precise return types for `TypedDict.get` (Randolf Scholz, PR [19897](https://github.com/python/mypy/pull/19897))
- Prevent false unreachable warnings for `final` instances that occur when strict optional checking is disabled (Christoph Tyralla, PR [20045](https://github.com/python/mypy/pull/20045))
- Check class references to catch non-existent classes in match cases (A5rocks, PR [20042](https://github.com/python/mypy/pull/20042))
- Do not sort unused error codes in unused error codes warning (wyattscarpenter, PR [20036](https://github.com/python/mypy/pull/20036))
- Fix `[name-defined]` false positive in `class A[X, Y=X]:` case (sobolevn, PR [20021](https://github.com/python/mypy/pull/20021))
- Filter SyntaxWarnings during AST parsing (Marc Mueller, PR [20023](https://github.com/python/mypy/pull/20023))
- Make untyped decorator its own error code (wyattscarpenter, PR [19911](https://github.com/python/mypy/pull/19911))
- Support error codes from plugins in options (Sigve Sebastian Farstad, PR [19719](https://github.com/python/mypy/pull/19719))
- Allow returning Literals in `__new__` (James Hilton-Balfe, PR [15687](https://github.com/python/mypy/pull/15687))
- Inverse interface freshness logic (Ivan Levkivskyi, PR [19809](https://github.com/python/mypy/pull/19809))
- Do not report exhaustive-match after deferral (Stanislav Terliakov, PR [19804](https://github.com/python/mypy/pull/19804))
- Make `untyped_calls_exclude` invalidate cache (Ivan Levkivskyi, PR [19801](https://github.com/python/mypy/pull/19801))
- Add await to empty context hack (Stanislav Terliakov, PR [19777](https://github.com/python/mypy/pull/19777))
- Consider non-empty enums assignable to Self (Stanislav Terliakov, PR [19779](https://github.com/python/mypy/pull/19779))

Typeshed updates

Please see [git log](https://github.com/python/typeshed/commits/main?after=ebce8d766b41fbf4d83cf47c1297563a9508ff60+0&branch=main&path=stdlib) for full list of standard library typeshed stub changes.

Acknowledgements

Thanks to all mypy contributors who contributed to this release:
- A5rocks
- BobTheBuidler
- bzoracler
- Chainfire
- Christoph Tyralla
- David Foster
- Frank Dana
- Guo Ci
- iap
- Ivan Levkivskyi
- James Hilton-Balfe
- jhance
- Joren Hammudoglu
- Jukka Lehtosalo
- KarelKenens
- Kevin Kannammalil
- Marc Mueller
- Michael Carlstrom
- Michael J. Sullivan
- Piotr Sawicki
- Randolf Scholz
- Shantanu
- Sigve Sebastian Farstad
- sobolevn
- Stanislav Terliakov
- Stephen Morton
- Theodore Ando
- Thiago J. Barbalho
- wyattscarpenter

I’d also like to thank my employer, Dropbox, for supporting mypy development.

1.18.2

- Fix crash on recursive alias (Ivan Levkivskyi, PR [19845](https://github.com/python/mypy/pull/19845))
- Add additional guidance for stubtest errors when runtime is `object.__init__` (Stephen Morton, PR [19733](https://github.com/python/mypy/pull/19733))
- Fix handling of None values in f-string expressions in mypyc (BobTheBuidler, PR [19846](https://github.com/python/mypy/pull/19846))

Acknowledgements

Thanks to all mypy contributors who contributed to this release:

- Ali Hamdan
- Anthony Sottile
- BobTheBuidler
- Brian Schubert
- Chainfire
- Charlie Denton
- Christoph Tyralla
- CoolCat467
- Daniel Hnyk
- Emily
- Emma Smith
- Ethan Sarp
- Ivan Levkivskyi
- Jahongir Qurbonov
- Jelle Zijlstra
- Joren Hammudoglu
- Jukka Lehtosalo
- Marc Mueller
- Omer Hadari
- Piotr Sawicki
- PrinceNaroliya
- Randolf Scholz
- Robsdedude
- Saul Shanabrook
- Shantanu
- Stanislav Terliakov
- Stephen Morton
- wyattscarpenter

I’d also like to thank my employer, Dropbox, for supporting mypy development.

1.18.1

compared to 1.17 when type checking mypy itself. In extreme cases, the improvement
can be 10x or higher. The list below is an overview of the various mypy optimizations.
Many mypyc improvements (discussed in a separate section below) also improve performance.

Type caching optimizations have a small risk of causing regressions. When
reporting issues with unexpected inferred types, please also check if
`--disable-expression-cache` will work around the issue, as it turns off some of
these optimizations.

- Improve self check performance by 1.8% (Jukka Lehtosalo, PR [19768](https://github.com/python/mypy/pull/19768), [19769](https://github.com/python/mypy/pull/19769), [19770](https://github.com/python/mypy/pull/19770))
- Optimize fixed-format deserialization (Ivan Levkivskyi, PR [19765](https://github.com/python/mypy/pull/19765))
- Use macros to optimize fixed-format deserialization (Ivan Levkivskyi, PR [19757](https://github.com/python/mypy/pull/19757))
- Two additional micro‑optimizations (Ivan Levkivskyi, PR [19627](https://github.com/python/mypy/pull/19627))
- Another set of micro‑optimizations (Ivan Levkivskyi, PR [19633](https://github.com/python/mypy/pull/19633))
- Cache common types (Ivan Levkivskyi, PR [19621](https://github.com/python/mypy/pull/19621))
- Skip more method bodies in third‑party libraries for speed (Ivan Levkivskyi, PR [19586](https://github.com/python/mypy/pull/19586))
- Simplify the representation of callable types (Ivan Levkivskyi, PR [19580](https://github.com/python/mypy/pull/19580))
- Add cache for types of some expressions (Ivan Levkivskyi, PR [19505](https://github.com/python/mypy/pull/19505))
- Use cache for dictionary expressions (Ivan Levkivskyi, PR [19536](https://github.com/python/mypy/pull/19536))
- Use cache for binary operations (Ivan Levkivskyi, PR [19523](https://github.com/python/mypy/pull/19523))
- Cache types of type objects (Ivan Levkivskyi, PR [19514](https://github.com/python/mypy/pull/19514))
- Avoid duplicate work when checking boolean operations (Ivan Levkivskyi, PR [19515](https://github.com/python/mypy/pull/19515))
- Optimize generic inference passes (Ivan Levkivskyi, PR [19501](https://github.com/python/mypy/pull/19501))
- Speed up the default plugin (Jukka Lehtosalo, PRs [19385](https://github.com/python/mypy/pull/19385) and [19462](https://github.com/python/mypy/pull/19462))
- Remove nested imports from the default plugin (Ivan Levkivskyi, PR [19388](https://github.com/python/mypy/pull/19388))
- Micro‑optimize type expansion (Jukka Lehtosalo, PR [19461](https://github.com/python/mypy/pull/19461))
- Micro‑optimize type indirection (Jukka Lehtosalo, PR [19460](https://github.com/python/mypy/pull/19460))
- Micro‑optimize the plugin framework (Jukka Lehtosalo, PR [19464](https://github.com/python/mypy/pull/19464))
- Avoid temporary set creation in subtype checking (Jukka Lehtosalo, PR [19463](https://github.com/python/mypy/pull/19463))
- Subtype checking micro‑optimization (Jukka Lehtosalo, PR [19384](https://github.com/python/mypy/pull/19384))
- Return early where possible in subtype check (Stanislav Terliakov, PR [19400](https://github.com/python/mypy/pull/19400))
- Deduplicate some types before joining (Stanislav Terliakov, PR [19409](https://github.com/python/mypy/pull/19409))
- Speed up type checking by caching argument inference context (Jukka Lehtosalo, PR [19323](https://github.com/python/mypy/pull/19323))
- Optimize binding method self argument type and deprecation checks (Ivan Levkivskyi, PR [19556](https://github.com/python/mypy/pull/19556))
- Keep trivial instance types/aliases during expansion (Ivan Levkivskyi, PR [19543](https://github.com/python/mypy/pull/19543))

Fixed‑Format Cache (Experimental)

Mypy now supports a new cache format used for faster incremental builds. It makes
incremental builds up to twice as fast. The feature is experimental and
currently only supported when using a compiled version of mypy. Use `--fixed-format-cache`
to enable the new format, or `fixed_format_cache = True` in a configuration file.

We plan to enable this by default in a future mypy release, and we'll eventually
deprecate and remove support for the original JSON-based format.

Unlike the JSON-based cache format, the new binary format is currently
not easy to parse and inspect by mypy users. We are planning to provide a tool to
convert fixed-format cache files to JSON, but details of the output JSON may be
different from the current JSON format. If you rely on being able to inspect
mypy cache files, we recommend creating a GitHub issue and explaining your use
case, so that we can more likely provide support for it. (Using
`MypyFile.read(binary_data)` to inspect cache data may be sufficient to support
some use cases.)

This feature was contributed by Ivan Levkivskyi (PR [19668](https://github.com/python/mypy/pull/19668), [19735](https://github.com/python/mypy/pull/19735), [19750](https://github.com/python/mypy/pull/19750), [19681](https://github.com/python/mypy/pull/19681), [19752](https://github.com/python/mypy/pull/19752), [19815](https://github.com/python/mypy/pull/19815)).

Flexible Variable Definitions: Update

1.17.1

* Retain `None` as constraints bottom if no bottoms were provided (Stanislav Terliakov, PR [19485](https://github.com/python/mypy/pull/19485))
* Fix "ignored exception in `hasattr`" in dmypy (Stanislav Terliakov, PR [19428](https://github.com/python/mypy/pull/19428))
* Prevent a crash when InitVar is redefined with a method in a subclass (Stanislav Terliakov, PR [19453](https://github.com/python/mypy/pull/19453))

Acknowledgements

Thanks to all mypy contributors who contributed to this release:

* Alexey Makridenko
* Brian Schubert
* Chad Dombrova
* Chainfire
* Charlie Denton
* Charulata
* Christoph Tyralla
* CoolCat467
* Donal Burns
* Guy Wilson
* Ivan Levkivskyi
* johnthagen
* Jukka Lehtosalo
* Łukasz Kwieciński
* Marc Mueller
* Michael J. Sullivan
* Mikhail Golubev
* Sebastian Rittau
* Shantanu
* Stanislav Terliakov
* wyattscarpenter

I’d also like to thank my employer, Dropbox, for supporting mypy development.
Links

Update platformdirs from 4.3.8 to 4.5.1.

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

Links

Update pytest from 8.4.1 to 9.0.2.

Changelog

9.0.2

=========================

Bug fixes
---------

- `13896 <https://github.com/pytest-dev/pytest/issues/13896>`_: The terminal progress feature added in pytest 9.0.0 has been disabled by default, except on Windows, due to compatibility issues with some terminal emulators.

You may enable it again by passing ``-p terminalprogress``. We may enable it by de

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.

2 participants