Skip to content

Conversation

pyup-bot
Copy link
Collaborator

Update attrs from 24.2.0 to 25.3.0.

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

Links

Update cattrs from 24.1.2 to 24.1.3.

Changelog

24.1.3

- Fix structuring of keyword-only dataclass fields when not using detailed validation.
([637](https://github.com/python-attrs/cattrs/issues/637) [#638](https://github.com/python-attrs/cattrs/pull/638))
Links

Update exceptiongroup from 1.2.2 to 1.3.0.

Changelog

1.3.0

- Added ``**kwargs`` to function and method signatures as appropriate to match the
signatures in the standard library
- In line with the stdlib typings in typeshed, updated ``(Base)ExceptionGroup`` generic
types to define defaults for their generic arguments (defaulting to
``BaseExceptionGroup[BaseException]`` and ``ExceptionGroup[Exception]``)
(PR by mikenerone)
- Changed ``BaseExceptionGroup.__init__()`` to directly call
``BaseException.__init__()`` instead of the superclass ``__init__()`` in order to
emulate the CPython behavior (broken or not) (PR by cfbolz)
- Changed the ``exceptions`` attribute to always return the same tuple of exceptions,
created from the original exceptions sequence passed to ``BaseExceptionGroup`` to
match CPython behavior
(`143 <https://github.com/agronholm/exceptiongroup/issues/143>`_)
Links

Update fonttools from 4.54.1 to 4.58.0.

Changelog

4.58.0

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

- Drop Python 3.8, require 3.9+ (3819)
- [HVAR, VVAR] Prune unused regions when using a direct mapping (3797)
- [Docs] Improvements to ufoLib documentation (3721)
- [Docs] Improvements to varLib documentation (3727)
- [Docs] Improvements to Pens and pen-module documentation (3724)
- [Docs] Miscellany updates to docs (misc modules and smaller modules) (3730)
- [subset] Close codepoints over BiDi mirror variants. (3801)
- [feaLib] Fix serializing ChainContextPosStatement and
ChainContextSubstStatement in some rare cases (3788)
- [designspaceLib] Clarify user expectations for getStatNames (2892)
- [GVAR] Add support for new `GVAR` table (3728)
- [TSI0, TSI5] Derive number of entries to decompile from data length (2477)
- [ttLib] Fix `AttributeError` when reporting table overflow (3808)
- [ttLib] Apply rounding more often in getCoordinates (3798)
- [ttLib] Ignore component bounds if empty (3799)
- [ttLib] Change the separator for duplicate glyph names from "" to "." (3809)
- [feaLib] Support subtable breaks in CursivePos, MarkBasePos, MarkToLigPos and
MarkToMarkPos lookups (3800, 3807)
- [feaLib] If the same lookup has single substitutions and ligature
substitutions, upgrade single substitutions to ligature substitutions with
one input glyph (3805)
- [feaLib] Correctly handle <NULL> in single pos lookups (3803)
- [feaLib] Remove duplicates from class pair pos classes instead of raising an
error (3804)
- [feaLib] Support creating extension lookups using useExtenion lookup flag
instead of silently ignoring it (3811)
- [STAT] Add typing for the simpler STAT arguments (3812)
- [otlLib.builder] Add future import for annotations (3814)
- [cffLib] Fix reading supplement encoding (3813)
- [voltLib] Add some missing functionality and fixes to voltLib and VoltToFea,
making the conversion to feature files more robust. Add also `fonttools
voltLib` command line tool to compile VOLT sources directly (doing an
intermediate fea conversion internally) (3818)
- [pens] Add some PointPen annotations (3820)

4.57.0

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

- [ttLib.__main__] Add `--no-recalc-timestamp` flag (3771)
- [ttLib.__main__] Add `-b` (recalcBBoxes=False) flag (3772)
- [cmap] Speed up glyphOrder loading from cmap (3774)
- [ttLib.__main__] Improvements around the `-t` flag (3776)
- [Debg] Fix parsing from XML; add roundtrip tests (3781)
- [fealib] Support \*Base.MinMax tables (3783, 3786)
- [config] Add OPTIMIZE_FONT_SPEED (3784)
- [varLib.hvar] New module to add HVAR table to the font (3780)
- [otlLib.optimize] Fix crash when the provided TTF does not contain a `GPOS` (3794)

4.56.0

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

- [varStore] Sort the input todo list with the same sorting key used for the opimizer's output (3767).
- [otData] Fix DeviceTable's ``DeltaValue`` repeat value which caused a crash after importing from XML and then compiling a GPOS containing Device tables (3758).
- [feaLib] Make ``FeatureLibError`` pickleable, so client can e.g. use feaLib to can compile features in parallel with multiprocessing (3762).
- [varLib/gvar] Removed workaround for old, long-fixed macOS bug about composite glyphs with all zero deltas (1381, 1788).
- [Docs] Updated ttLib documentation, beefed up TTFont and TTGlyphSet explanations (3720).

4.55.8

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

- [MetaTools] Fixed bug in buildUCD.py script whereby the first non-header line of some UCD text file was being skipped. This affected in particular the U+00B7 (MIDDLE DOT) entry of ScriptExtensions.txt (3756).

4.55.7

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

- Shorten the changelog included in PyPI package description to accommodate maximum length limit imposed by Azure DevOps. No actual code changes since v4.55.6 (3754).

4.55.6

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

- [glyf] Fixed regression introduced in 4.55.5 when computing bounds of nested composite glyphs  with transformed components (3752).

4.55.5

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

- [glyf] Fixed recalcBounds of transformed components with unrounded coordinates (3750).
- [feaLib] Allow duplicate script/language statements (3749).

4.55.4

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

- [bezierTools] Fixed ``splitCubicAtT`` sometimes not returning identical start/end points as result of numerical precision (3742, 3743).
- [feaLib/ast] Fixed docstring of ``AlternateSubstStatement`` (3735).
- [transform] Typing fixes (3734).

4.55.3

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

- [Docs] fill out ttLib table section [3716]
- [feaLib] More efficient inline format 4 lookups [3726]

4.55.2

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

- [Docs] update Sphinx config (3712)
- [designspaceLib] Allow axisOrdering to be set to zero (3715)
- [feaLib] Don’t modify variable anchors in place (3717)

4.55.1

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

- [ttGlyphSet] Support VARC CFF2 fonts (3683)
- [DecomposedTransform] Document and implement always skewY == 0 (3697)
- [varLib] "Fix" cython iup issue? (3704)
- Cython minor refactor (3705)

4.55.0

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

- [cffLib.specializer] Adjust stack use calculation (3689)
- [varLib] Lets not add mac names if the rest of name doesn't have them (3688)
- [ttLib.reorderGlyphs] Update CFF table charstrings and charset (3682)
- [cffLib.specializer] Add cmdline to specialize a CFF2 font (3675, 3679)
- [CFF2] Lift uint16 VariationStore.length limitation (3674)
- [subset] consider variation selectors subsetting cmap14 (3672)
- [varLib.interpolatable] Support CFF2 fonts (3670)
- Set isfinal to true in XML parser for proper resource cleanup (3669)
- [removeOverlaps] Fix CFF CharString width (3659)
- [glyf] Add optimizeSize option (3657)
- Python 3.13 support (3656)
- [TupleVariation] Optimize for loading speed, not size (3650, 3653)
Links

Update lxml from 5.3.0 to 5.4.0.

Changelog

5.4.0

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

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

* Binary wheels use libxml2 2.13.8 and libxslt 1.1.43 to resolve several CVEs.
(Binary wheels for Windows continue to use a patched libxml2 2.11.9 and libxslt 1.1.39.)

5.3.2

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

This release resolves CVE-2025-24928 as described in
https://gitlab.gnome.org/GNOME/libxml2/-/issues/847

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

* Binary wheels use libxml2 2.12.10 and libxslt 1.1.42.

* Binary wheels for Windows use a patched libxml2 2.11.9 and libxslt 1.1.39.

5.3.1

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

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

* GH440: Some tests were adapted for libxml2 2.14.0.
Patch by Nick Wellnhofer.

* LP2097175: ``DTD(external_id="…")`` erroneously required a byte string as ID value.

* GH450: ``iterparse()`` internally triggered the `DeprecationWarning`` added in lxml 5.3.0 when parsing HTML.

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

* GH442: Binary wheels for macOS no longer use the linker flag ``-flat_namespace``.
Links

Update orjson from 3.10.10 to 3.10.18.

Changelog

3.10.18

Fixed

- Fix incorrect escaping of the vertical tabulation character. This was
introduced in 3.10.17.

3.10.17

Changed

- Publish PyPI Windows aarch64/arm64 wheels.
- ABI compatibility with CPython 3.14 alpha 7.
- Fix incompatibility running on Python 3.13 using WASM.

3.10.16

Changed

- Improve performance of serialization on amd64 machines with AVX-512.
- ABI compatibility with CPython 3.14 alpha 6.
- Drop support for Python 3.8.
- Publish additional PyPI wheels for macOS that target only aarch64, macOS 15,
and recent Python.

3.10.15

Changed

- Publish PyPI manylinux aarch64 wheels built and tested on aarch64.
- Publish PyPI musllinux aarch64 and arm7l wheels built and tested on aarch64.
- Publish PyPI manylinux Python 3.13 wheels for i686, arm7l, ppc64le, and s390x.

3.10.14

Changed

- Specify build system dependency on `maturin>=1,<2` again.
- Allocate memory using `PyMem_Malloc()` and similar APIs for integration
with pymalloc, mimalloc, and tracemalloc.
- Source distribution does not ship compressed test documents and relevant
tests skip if fixtures are not present.
- Build now depends on Rust 1.82 or later instead of 1.72.

3.10.13

Changed

- Fix compatibility with maturin introducing a breaking change in 1.8.0 and
specify a fixed version of maturin. Projects relying on any previous version
being buildable from source by end users (via PEP 517) must upgrade to at
least this version.

3.10.12

Changed

- Publish PyPI manylinux i686 wheels.
- Publish PyPI musllinux i686 and arm7l wheels.
- Publish PyPI macOS wheels for Python 3.10 or later built on macOS 15.
- Publish PyPI Windows wheels using trusted publishing.

3.10.11

Changed

- Improve performance of UUIDs.
- Publish PyPI wheels with trusted publishing and PEP 740 attestations.
- Include text of licenses for vendored dependencies.
Links

Update setuptools from 75.3.0 to 80.4.0.

Changelog

80.4.0

=======

Features
--------

- Simplified the error reporting in editable installs. (4984)

80.3.1

=======

Bugfixes
--------

- Restored select attributes in easy_install for temporary pbr compatibility. (4976)

80.3.0

=======

Features
--------

- Removed easy_install and package_index modules. (917)
- Restored license declaration in package metadata. See jaraco/skeleton171. (4956)

80.2.0

=======

Features
--------

- Restored support for install_scripts --executable (and classic behavior for the executable for those invocations). Instead, build_editable provides the portable form of the executables for downstream installers to rewrite. (4934)

80.1.0

=======

Features
--------

- Added a deadline of Oct 31 to the setup.py install deprecation.


Bugfixes
--------

- With ``setup.py install --prefix=...``, fall back to distutils install rather than failing. Note that running ``setup.py install`` is deprecated. (3143)

80.0.1

=======

Bugfixes
--------

- Fixed index_url logic in develop compatibility shim. (4966)

80.0.0

=======

Bugfixes
--------

- Update test to honor new behavior in importlib_metadata 8.7. (4961)


Deprecations and Removals
-------------------------

- Removed support for the easy_install command including the sandbox module. (2908)
- Develop command no longer uses easy_install, but instead defers execution to pip (which then will re-invoke Setuptools via PEP 517 to build the editable wheel). Most of the options to develop are dropped. This is the final warning before the command is dropped completely in a few months. Use-cases relying on 'setup.py develop' should pin to older Setuptools version or migrate to modern build tooling. (4955)

79.0.1

=======

Bugfixes
--------

- Merge with pypa/distutils24bd3179b including fix for pypa/distutils355.

79.0.0

=======

Deprecations and Removals
-------------------------

- Removed support for 'legacy-editable' installs. (917)

78.1.1

=======

Bugfixes
--------

- More fully sanitized the filename in PackageIndex._download. (4946)

78.1.0

=======

Features
--------

- Restore access to _get_vc_env with a warning. (4874)

78.0.2

=======

Bugfixes
--------

- Postponed removals of deprecated dash-separated and uppercase fields in ``setup.cfg``.
All packages with deprecated configurations are advised to move before 2026. (4911)

78.0.1

=======

Misc
----

- 4909

78.0.0

=======

Bugfixes
--------

- Reverted distutils changes that broke the monkey patching of command classes. (4902)


Deprecations and Removals
-------------------------

- Setuptools no longer accepts options containing uppercase or dash characters in ``setup.cfg``.
Please ensure to write the options in ``setup.cfg`` using the :wiki:`lower_snake_case <Snake_case>` convention
(e.g. ``Name => name``, ``install-requires => install_requires``).
This is a follow-up on deprecations introduced in
`v54.1.0 <https://setuptools.pypa.io/en/latest/history.html#v54-1-0>`_ (see 1608) and
`v54.1.1 <https://setuptools.pypa.io/en/latest/history.html#v54-1-1>`_ (see 2592).

.. note::
  This change *does not affect configurations in* ``pyproject.toml``
  (which uses the :wiki:`lower-kebab-case <Letter_caseKebab_case>` convention following the precedent set in :pep:`517`/:pep:`518`). (4870)


Misc
----

- 4904

77.0.3

=======

Bugfixes
--------

- Temporarily convert error for license glob patterns containing ``../`` into a deprecation warning
to allow an accomodation period. (4896)
- Better error messages for ``packaging.licenses`` import errors in environments with ``packaging<24.2``\.
The import statement was also deferred to spare users that are not using
license expressions. (4898)
- Avoided eagerly raising an exception when ``license-files`` is defined
simultaneously inside and outside of ``pyproject.toml``.
Instead we rely on the existing deprecation error. (4899)

77.0.2

=======

Bugfixes
--------

- Restore ``distutils.ccompiler._default_compilers`` -- by :user:`ManiacDC` (4876)
- Fixed copy pasta in ``msvc.shared_lib_format``\. (4885)

77.0.1

=======

Bugfixes
--------

- Manually fix news fragment entries causing CI to crash when building docs. (4891)

77.0.0

=======

Features
--------

- Added initial support for license expression (PEP :pep:`639 <639add-license-expression-field>`). -- by :user:`cdce8p` (4706)
- Store ``License-File``\s in ``.dist-info/licenses`` subfolder and added support for recursive globs for ``license_files`` (PEP :pep:`639 <639add-license-expression-field>`). -- by :user:`cdce8p` (4728)
- Bump core metadata version to ``2.4``\. -- by :user:`cdce8p` (4830)
- Updated vendored copy of ``wheel`` to ``v0.45.1``\. (4869)


Deprecations and Removals
-------------------------

- Added initial implementation of :pep:`639`.
Users relying on pre- :pep:`639` implementation details
(like precise license file paths inside ``dist-info`` directory)
may need to adjust their code base to avoid problems.
Deprecations and stronger validation were also introduced (4829).
- Added exception (or warning) when deprecated license classifiers are used,
according to PEP :pep:`639 <639deprecate-license-classifiers>`. (4833)
- Deprecated ``tools.setuptools.license-files`` in favor of ``project.license-files``
and added exception if ``project.license-files`` and ``tools.setuptools.license-files``
are used together. -- by :user:`cdce8p` (4837)
- Deprecated ``project.license`` as a TOML table in
``pyproject.toml``\. Users are expected to move towards using
``project.license-files`` and/or SPDX expressions (as strings) in
``project.license``\.
See PEP :pep:`639 <639deprecate-license-key-table-subkeys>`. (4840)
- Added simple validation for given glob patterns in ``license-files``\:
a warning will be generated if no file is matched.
Invalid glob patterns can raise an exception.
-- thanks :user:`cdce8p` for contributions. (4838)


Misc
----

- 4734

76.1.0

=======

Features
--------

- In setuptools.msvc.EnvironmentInfo, now honor the correct paths when on an ARM host. (4786)


Bugfixes
--------

- Restored implicit distutils.ccompiler import for g-ir-scanner. (4871)
- Restore ``distutils.ccompiler.compiler_class`` -- by :user:`Avasam` (4876)

76.0.0

=======

Deprecations and Removals
-------------------------

- Synced with pypa/distutils5589d7527 including a simplified shebang generation when building scripts (4863). (4865)

75.9.1

=======

Bugfixes
--------

- Fix ImportError in distutils when configuring for linking. (4866)

75.9.0

=======

Features
--------

- Synced with pypa/distutils91f75bb98 including exporting of PyInit_pkg (pypa/distutils327) and a refactoring of the compiler classes into distutils.compilers (pypa/distutils295). (4852)

75.8.2

=======

Bugfixes
--------

- Fixed ``pkg_resources.require(...)`` to also consider standardised
``dist-info`` directories. (4856)

75.8.1

=======

Bugfixes
--------

- Fix wheel file naming to follow binary distribution specification -- by :user:`di` (4766)
- Fixed crash generating error message printed when building wheels for the
free-threaded build using the limited API. -- by :user:`ngoldbaum` (4809)
- Fix documentation for recent CFLAGS distutils change. -- by :user:`thesamesam` (4836)

75.8.0

=======

Features
--------

- Implemented ``Dynamic`` field for core metadata (as introduced in PEP 643).
The existing implementation is currently experimental and the exact approach
may change in future releases. (4698)

75.7.0

=======

Features
--------

- Synced with pypa/distutilsc97a3db2f including better support for free threaded Python on Windows (pypa/distutils310), improved typing support, and linter accommodations. (4478)
- Synced with pypa/distutilsff11eed0c including bugfix for duplicate CFLAGS and adaption to support Python 3.13 is_abs in the C compiler (4669). (4790)

75.6.0

=======

Features
--------

- Preserve original ``PKG-INFO`` into ``METADATA`` when creating wheel
(instead of calling ``wheel.metadata.pkginfo_to_metadata``).
This helps to be more compliant with the flow specified in PEP 517. (4701)
- Changed the ``WindowsSdkVersion``, ``FrameworkVersion32`` and ``FrameworkVersion64`` properties of ``setuptools.msvc.PlatformInfo`` to return an empty `tuple` instead of `None` as a fallthrough case --  by :user:`Avasam` (4754)

75.5.0

=======

Features
--------

- Removed support for ``SETUPTOOLS_DANGEROUSLY_SKIP_PYPROJECT_VALIDATION``, as it
is deemed prone to errors. (4746)

75.4.0

=======

Features
--------

- Added support for the environment variable
``SETUPTOOLS_DANGEROUSLY_SKIP_PYPROJECT_VALIDATION=true``, allowing users to bypass
the validation of ``pyproject.toml``.
This option should be used only as a last resort when resolving dependency
issues, as it may lead to improper functioning.
Users who enable this setting are responsible for ensuring that ``pyproject.toml``
complies with setuptools requirements. (4611)

.. attention::
  This environment variable was removed in a later version of ``setuptools``.

- Require Python 3.9 or later. (4718)
- Remove dependency on ``importlib_resources``
and the vendored copy of the library.
Instead, ``setuptools`` consistently rely on stdlib's ``importlib.resources``
(available on Python 3.9+). (4718)
- Setuptools' ``bdist_wheel`` implementation no longer produces wheels with
the ``m`` SOABI flag (pymalloc-related).
This flag was removed on Python 3.8+ (see :obj:`sys.abiflags`). (4718)
- Updated vendored packaging version to 24.2. (4740)


Bugfixes
--------

- Merge with pypa/distutils251797602, including fix for dirutil.mkpath handling in pypa/distutils304.

75.3.2

=======

- Fixed version error in changelog.

75.3.1

=======

Bugfixes
--------

- Fix wheel file naming to follow binary distribution specification -- by :user:`di` (4877)
Links

Update six from 1.16.0 to 1.17.0.

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

Links

Update typing-extensions from 4.12.2 to 4.13.2.

Changelog

4.13.2

- Fix `TypeError` when taking the union of `typing_extensions.TypeAliasType` and a
`typing.TypeAliasType` on Python 3.12 and 3.13.
Patch by [Joren Hammudoglu](https://github.com/jorenham).
- Backport from CPython PR [132160](https://github.com/python/cpython/pull/132160)
to avoid having user arguments shadowed in generated `__new__` by
`typing_extensions.deprecated`.
Patch by [Victorien Plot](https://github.com/Viicos).

4.13.1

Bugfixes:
- Fix regression in 4.13.0 on Python 3.10.2 causing a `TypeError` when using `Concatenate`.
Patch by [Daraan](https://github.com/Daraan).
- Fix `TypeError` when using `evaluate_forward_ref` on Python 3.10.1-2 and 3.9.8-10.
Patch by [Daraan](https://github.com/Daraan).

4.13.0

No user-facing changes since 4.13.0rc1.

4.13.0rc1

New features:

- Add `typing_extensions.TypeForm` from PEP 747. Patch by
Jelle Zijlstra.
- Add `typing_extensions.get_annotations`, a backport of
`inspect.get_annotations` that adds features specified
by PEP 649. Patches by Jelle Zijlstra and Alex Waygood.
- Backport `evaluate_forward_ref` from CPython PR
[119891](https://github.com/python/cpython/pull/119891) to evaluate `ForwardRef`s.
Patch by [Daraan](https://github.com/Daraan), backporting a CPython PR by Jelle Zijlstra.

Bugfixes and changed features:

- Update PEP 728 implementation to a newer version of the PEP. Patch by Jelle Zijlstra.
- Copy the coroutine status of functions and methods wrapped
with `typing_extensions.deprecated`. Patch by Sebastian Rittau.
- Fix bug where `TypeAliasType` instances could be subscripted even
where they were not generic. Patch by [Daraan](https://github.com/Daraan).
- Fix bug where a subscripted `TypeAliasType` instance did not have all
attributes of the original `TypeAliasType` instance on older Python versions.
Patch by [Daraan](https://github.com/Daraan) and Alex Waygood.
- Fix bug where subscripted `TypeAliasType` instances (and some other
subscripted objects) had wrong parameters if they were directly
subscripted with an `Unpack` object.
Patch by [Daraan](https://github.com/Daraan).
- Backport to Python 3.10 the ability to substitute `...` in generic `Callable`
aliases that have a `Concatenate` special form as their argument.
Patch by [Daraan](https://github.com/Daraan).
- Extended the `Concatenate` backport for Python 3.8-3.10 to now accept
`Ellipsis` as an argument. Patch by [Daraan](https://github.com/Daraan).
- Fix backport of `get_type_hints` to reflect Python 3.11+ behavior which does not add
`Union[..., NoneType]` to annotations that have a `None` default value anymore.
This fixes wrapping of `Annotated` in an unwanted `Optional` in such cases.
Patch by [Daraan](https://github.com/Daraan).
- Fix error in subscription of `Unpack` aliases causing nested Unpacks
to not be resolved correctly. Patch by [Daraan](https://github.com/Daraan).
- Backport CPython PR [124795](https://github.com/python/cpython/pull/124795):
fix `TypeAliasType` not raising an error on non-tuple inputs for `type_params`.
Patch by [Daraan](https://github.com/Daraan).
- Fix that lists and `...` could not be used for parameter expressions for `TypeAliasType`
instances before Python 3.11.
Patch by [Daraan](https://github.com/Daraan).
- Fix error on Python 3.10 when using `typing.Concatenate` and
`typing_extensions.Concatenate` together. Patch by [Daraan](https://github.com/Daraan).
- Backport of CPython PR [109544](https://github.com/python/cpython/pull/109544)
to reflect Python 3.13+ behavior: A value assigned to `__total__` in the class body of a
`TypedDict` will be overwritten by the `total` argument of the `TypedDict` constructor.
Patch by [Daraan](https://github.com/Daraan), backporting a CPython PR by Jelle Zijlstra.
- `isinstance(typing_extensions.Unpack[...], TypeVar)` now evaluates to `False` on Python 3.11
and newer, but remains `True` on versions before 3.11.
Patch by [Daraan](https://github.com/Daraan).
Links

Update black from 24.8.0 to 25.1.0.

Changelog

25.1.0

Highlights

This release introduces the new 2025 stable style (4558), stabilizing
the following changes:

- Normalize casing of Unicode escape characters in strings to lowercase (2916)
- Fix inconsistencies in whether certain strings are detected as docstrings (4095)
- Consistently add trailing commas to typed function parameters (4164)
- Remove redundant parentheses in if guards for case blocks (4214)
- Add parentheses to if clauses in case blocks when the line is too long (4269)
- Whitespace before ` fmt: skip` comments is no longer normalized (4146)
- Fix line length computation for certain expressions that involve the power operator (4154)
- Check if there is a newline before the terminating quotes of a docstring (4185)
- Fix type annotation spacing between `*` and more complex type variable tuple (4440)

The following changes were not in any previous release:

- Remove parentheses around sole list items (4312)
- Generic function definitions are now formatted more elegantly: parameters are
split over multiple lines first instead of type parameter definitions (4553)

Stable style

- Fix formatting cells in IPython notebooks with magic methods and starting or trailing
empty lines (4484)
- Fix crash when formatting `with` statements containing tuple generators/unpacking
(4538)

Preview style

- Fix/remove string merging changing f-string quotes on f-strings with internal quotes
(4498)
- Collapse multiple empty lines after an import into one (4489)
- Prevent `string_processing` and `wrap_long_dict_values_in_parens` from removing
parentheses around long dictionary values (4377)
- Move `wrap_long_dict_values_in_parens` from the unstable to preview style (4561)

Packaging

- Store license identifier inside the `License-Expression` metadata field, see
[PEP 639](https://peps.python.org/pep-0639/). (#4479)

Performance

- Speed up the `is_fstring_start` function in Black's tokenizer (4541)

Integrations

- If using stdin with `--stdin-filename` set to a force excluded path, stdin won't be
formatted. (4539)

24.10.0

Highlights

- Black is now officially tested with Python 3.13 and provides Python 3.13
mypyc-compiled wheels. (4436) (4449)
- Black will issue an error when used with Python 3.12.5, due to an upstream memory
safety issue in Python 3.12.5 that can cause Black's AST safety checks to fail. Please
use Python 3.12.6 or Python 3.12.4 instead. (4447)
- Black no longer supports running with Python 3.8 (4452)

Stable style

- Fix crashes involving comments in parenthesised return types or `X | Y` style unions.
(4453)
- Fix skipping Jupyter cells with unknown `%%` magic (4462)

Preview style

- Fix type annotation spacing between * and more complex type variable tuple (i.e. `def
fn(*args: *tuple[*Ts, T]) -> None: pass`) (4440)

Caching

- Fix bug where the cache was shared between runs with and without `--unstable` (4466)

Packaging

- Upgrade version of mypyc used to 1.12 beta (4450) (4449)
- `blackd` now requires a newer version of aiohttp. (4451)

Output

- Added Python target version information on parse error (4378)
- Add information about Black version to internal error messages (4457)
Links

Update click from 8.1.7 to 8.2.0.

Changelog

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`

8.1.8

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

Released 2024-12-19

-   Fix an issue with type hints for ``click.open_file()``. :issue:`2717`
-   Fix issue where error message for invalid ``click.Path`` displays on
 multiple lines. :issue:`2697`
-   Fixed issue that prevented a default value of ``""`` from being displayed in
 the help for an option. :issue:`2500`
-   The test runner handles stripping color consistently on Windows.
 :issue:`2705`
-   Show correct value for flag default when using ``default_map``.
 :issue:`2632`
-   Fix ``click.echo(color=...)`` passing ``color`` to coloroma so it can be
 forced on Windows. :issue:`2606`.
-   More robust bash version check, fixing problem on Windows with git-bash.
 :issue:`2638`
-   Cache the help option generated by the ``help_option_names`` setting to
 respect its eagerness. :pr:`2811`
-   Replace uses of ``os.system`` with ``subprocess.Popen``. :issue:`1476`
-   Exceptions generated during a command will use the context's ``color``
 setting when being displayed. :issue:`2193`
-   Error message when defining option with invalid name is more descriptive.
 :issue:`2452`
-   Refactor code generating default ``--help`` option to deduplicate code.
 :pr:`2563`
-   Test ``CLIRunner`` resets patched ``_compat.should_strip_ansi``.
 :issue:`2732`
Links

Update coverage from 7.6.1 to 7.8.0.

Changelog

7.8.0

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

- Added a new ``source_dirs`` setting for symmetry with the existing
``source_pkgs`` setting. It's preferable to the existing ``source`` setting,
because you'll get a clear error when directories don't exist. Fixes `issue
1942`_.  Thanks, `Jeremy Fleischman <pull 1943_>`_.

- Fix: the PYTHONSAFEPATH environment variable new in Python 3.11 is properly
supported, closing `issue 1696`_.  Thanks, `Philipp A. <pull 1700_>`_.  This
works properly except for a detail when using the ``coverage`` command on
Windows.  There you can use ``python -m coverage`` instead if you need exact
emulation.

.. _issue 1696: https://github.com/nedbat/coveragepy/issues/1696
.. _pull 1700: https://github.com/nedbat/coveragepy/pull/1700
.. _issue 1942: https://github.com/nedbat/coveragepy/issues/1942
.. _pull 1943: https://github.com/nedbat/coveragepy/pull/1943

.. _changes_7-7-1:

7.7.1

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

- A few small tweaks to the sys.monitoring support for Python 3.14.  Please
test!


.. _changes_7-7-0:

7.7.0

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

- The Coverage object has a new method, :meth:`.Coverage.branch_stats` for
getting simple branch information for a module.  Closes `issue 1888`_.

- The :class:`Coverage constructor<.Coverage>` now has a ``plugins`` parameter
for passing in plugin objects directly, thanks to `Alex Gaynor <pull
1919_>`_.

- Many constant tests in if statements are now recognized as being optimized
away.  For example, previously ``if 13:`` would have been considered a branch
with one path not taken.  Now it is understood as always true and no coverage
is missing.

- The experimental sys.monitoring support now works for branch coverage if you
are using Python 3.14.0 alpha 6 or newer.  This should reduce the overhead
coverage.py imposes on your test suite. Set the environment variable
``COVERAGE_CORE=sysmon`` to try it out.

- Confirmed support for PyPy 3.11. Thanks Michał Górny.

.. _issue 1888: https://github.com/nedbat/coveragepy/issues/1888
.. _pull 1919: https://github.com/nedbat/coveragepy/pull/1919


.. _changes_7-6-12:

7.6.12

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

- Fix: some aarch64 distributions were missing (`issue 1927`_).  These are now
building reliably.

.. _issue 1927: https://github.com/nedbat/coveragepy/issues/1927

.. _changes_7-6-11:

7.6.11

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

- Fix: a memory leak in CTracer has been fixed.  The details are in `issue
1924`_ and `pytest-dev 676`_.  This should reduce the memory footprint for
everyone even if it hadn't caused a problem before.

- We now ship a py3-none-any.whl wheel file.  Thanks, `Russell Keith-Magee
<pull 1914_>`_.

.. _pull 1914: https://github.com/nedbat/coveragepy/pull/1914
.. _issue 1924: https://github.com/nedbat/coveragepy/issues/1924
.. _pytest-dev 676: https://github.com/pytest-dev/pytest-cov/issues/676

.. _changes_7-6-10:

7.6.10

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

- Fix: some descriptions of missing branches in HTML and LCOV reports were
incorrect when multi-line statements were involved (`issue 1874`_ and `issue
1875`_).  These are now fixed.

- Fix: Python 3.14 `defers evaluation of annotations <pep649_>`_ by moving them
into separate code objects.  That code is rarely executed, so coverage.py
would mark them as missing, as reported in `issue 1908`_.  Now they are
ignored by coverage automatically.

- Fixed an obscure and mysterious problem on PyPy 3.10 seemingly involving
mocks, imports, and trace functions: `issue 1902`_.  To be honest, I don't
understand the problem or the solution, but ``git bisect`` helped find it,
and now it's fixed.

- Docs: re-wrote the :ref:`subprocess` page to put multiprocessing first and to
highlight the correct use of :class:`multiprocessing.Pool
<python:multiprocessing.pool.Pool>`.

.. _issue 1874: https://github.com/nedbat/coveragepy/issues/1874
.. _issue 1875: https://github.com/nedbat/coveragepy/issues/1875
.. _issue 1902: https://github.com/nedbat/coveragepy/issues/1902
.. _issue 1908: https://github.com/nedbat/coveragepy/issues/1908
.. _pep649: https://docs.python.org/3.14/whatsnew/3.14.html#pep-649-deferred-evaluation-of-annotations


.. _changes_7-6-9:

7.6.9

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

- Fix: `Tomas Uribe fixed <pull 1901_>`_ a performance problem in the XML
report.  Large code bases should produce XML reports much faster now.

.. _pull 1901: https://github.com/nedbat/coveragepy/pull/1901


.. _changes_7-6-8:

7.6.8

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

- Fix: the LCOV report code assumed that a branch line that took no branches
meant that the entire line was unexecuted.  This isn't true in a few cases:
the line might always raise an exception, or might have been optimized away.
Fixes `issue 1896`_.

- Fix: similarly, the HTML report will now explain that a line that jumps to
none of its expected destinations must have always raised an exception.
Previously, it would say something nonsensical like, "line 4 didn't jump to
line 5 because line 4 was never true, and it didn't jump to line 7 because
line 4 was always true."  This was also shown in `issue 1896`_.

.. _issue 1896: https://github.com/nedbat/coveragepy/issues/1896


.. _changes_7-6-7:

7.6.7

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

- Fix: ugh, the other assert from 7.6.5 can also be encountered in the wild,
so it's been restored to a conditional.  Sorry for the churn.


.. _changes_7-6-6:

7.6.6

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

- One of the new asserts from 7.6.5 caused problems in real projects, as
reported in `issue 1891`_.  The assert has been removed.

.. _issue 1891: https://github.com/nedbat/coveragepy/issues/1891


.. _changes_7-6-5:

7.6.5

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

- Fix: fine-tuned the exact Python version (3.12.6) when exiting from ``with``
statements changed how they traced.  This affected whether people saw the
fix for `issue 1880`_.

- Fix: isolate our code more from mocking in the os module that in rare cases
can cause `bizarre behavior <pytest-cov-666_>`_.

- Refactor: some code unreachable code paths in parser.py were changed to
asserts.  If you encounter any of these, please let me know!

.. _pytest-cov-666: https://github.com/pytest-dev/pytest-cov/issues/666


.. _changes_7-6-4:

7.6.4

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

- Fix: multi-line ``with`` statements could cause contained branches to be
incorrectly marked as missing (`issue 1880`_).  This is now fixed.

.. _issue 1880: https://github.com/nedbat/coveragepy/issues/1880


.. _changes_7-6-3:

7.6.3

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

- Fix: nested context managers could incorrectly be analyzed to flag a missing
branch on the last context manager, as described in `issue 1876`_.  This is
now fixed.

- Fix: the missing branch message about not exiting a module had an extra
"didn't," as described in `issue 1873`_.  This is now fixed.

.. _issue 1873: https://github.com/nedbat/coveragepy/issues/1873
.. _issue 1876: https://github.com/nedbat/coveragepy/issues/1876


.. _changes_7-6-2:

7.6.2

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

- Dropped support for Python 3.8 and PyPy 3.8.

- Fix: a final wildcard match/case clause assigning to a name (``case _ as
value``) was incorrectly marked as a missing branch.  This is now fixed,
closing `issue 1860`_.

- Fewer things are considered branches now. Lambdas, comprehensions, and
generator expressions are no longer marked as missing branches if they don't
complete execution.  Closes `issue 1852`_.

- Fix: the HTML report didn't properly show multi-line f-strings that end with
a backslash continuation.  This is now fixed, closing `issue 1836`_, thanks
to `LiuYinCarl and Marco Ricci <pull 1838_>`_.

- Fix: the LCOV report now has correct line numbers (fixing `issue 1846`_) and
better branch descriptions for BRDA records (fixing `issue 1850`_).  There
are other changes to lcov also, including a new configuration option
:ref:`line_checksums <config_lcov_line_checksums>` to control whether line
checksums are included in the lcov report.  The default is false. To keep
checksums set it to true.  All this work is thanks to Zack Weinberg
(`pull 1849`_ and `pull 1851`_).

- Fixed the docs for multi-line regex exclusions, closing `issue 1863`_.

- Fixed a potential crash in the C tracer, closing `issue 1835`_, thanks to
`Jan Kühle <pull 1843_>`_.

.. _issue 1835: https://github.com/nedbat/coveragepy/issues/1835
.. _issue 1836: https://github.com/nedbat/coveragepy/issues/1836
.. _pull 1838: https://github.com/nedbat/coveragepy/pull/1838
.. _pull 1843: https://github.com/nedbat/coveragepy/pull/1843
.. _issue 1846: https://github.com/nedbat/coveragepy/issues/1846
.. _pull 1849: https://github.com/nedbat/coveragepy/pull/1849
.. _issue 1850: https://github.com/nedbat/coveragepy/issues/1850
.. _pull 1851: https://github.com/nedbat/coveragepy/pull/1851
.. _issue 1852: https://github.com/nedbat/coveragepy/issues/1852
.. _issue 1860: https://github.com/nedbat/coveragepy/issues/1860
.. _issue 1863: https://github.com/nedbat/coveragepy/issues/1863


.. _changes_7-6-1:
Links

Update flake8 from 7.1.1 to 7.2.0.

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

Links

Update iniconfig from 2.0.0 to 2.1.0.

Changelog

2.1.0

=====

* fix artifact building - pin minimal version of hatch
* drop eol python 3.8
* add python 3.12 and 3.13
Links

Update isort from 5.13.2 to 6.0.1.

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

Links

Update mypy from 1.13.0 to 1.15.0.

Changelog

1.15

We’ve just uploaded mypy 1.15 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).

Performance Improvements

Mypy is up to 40% faster in some use cases. This improvement comes largely from tuning the performance
of the garbage collector. Additionally, the release includes several micro-optimizations that may
be impactful for large projects.

Contributed by Jukka Lehtosalo (PR [18306](https://github.com/python/mypy/pull/18306),
PR [18302](https://github.com/python/mypy/pull/18302, PR [18298](https://github.com/python/mypy/pull/18298,
PR [18299](https://github.com/python/mypy/pull/18299).

Mypyc Accelerated Mypy Wheels for ARM Linux

For best performance, mypy can be compiled to C extension modules using mypyc. This makes
mypy 3-5x faster than when interpreted with pure Python. We now build and upload mypyc
accelerated mypy wheels for `manylinux_aarch64` to PyPI, making it easy for Linux users on
ARM platforms to realise this speedup -- just `pip install` the latest mypy.

Contributed by Christian Bundy and Marc Mueller
(PR [mypy_mypyc-wheels76](https://github.com/mypyc/mypy_mypyc-wheels/pull/76),
PR [mypy_mypyc-wheels89](https://github.com/mypyc/mypy_mypyc-wheels/pull/89)).

`--strict-bytes`

By default, mypy treats `bytearray` and `memoryview` values as assignable to the `bytes`
type, for historical reasons. Use the `--strict-bytes` flag to disable this
behavior. [PEP 688](https://peps.python.org/pep-0688) specified the removal of this
special case. The flag will be enabled by default in **mypy 2.0**.

Contributed by Ali Hamdan (PR [18263](https://github.com/python/mypy/pull/18263)) and
Shantanu Jain (PR [13952](https://github.com/python/mypy/pull/13952)).

Improvements to Reachability Analysis and Partial Type Handling in Loops

This change results in mypy better modelling control flow within loops and hence detecting
several previously ignored issues. In some cases, this change may require additional
explicit variable annotations.

Contributed by Christoph Tyralla (PR [18180](https://github.com/python/mypy/pull/18180),
PR [18433](https://github.com/python/mypy/pull/18433)).

(Speaking of partial types, remember that we plan to enable `--local-partial-types`
by default in **mypy 2.0**.)

Better Discovery of Configuration Files

Mypy will now walk up the filesystem (up until a repository or file system root) to discover
configuration files. See the
[mypy configuration file documentation](https://mypy.readthedocs.io/en/stable/config_file.html)
for more details.

Contributed by Mikhail Shiryaev and Shantanu Jain
(PR [16965](https://github.com/python/mypy/pull/16965), PR [18482](https://github.com/python/mypy/pull/18482))

Better Line Numbers for Decorators and Slice Expressions

Mypy now uses more correct line numbers for decorators and slice expressions. In some cases,
you may have to change the location of a ` type: ignore` comment.

Contributed by Shantanu Jain (PR [18392](https://github.com/python/mypy/pull/18392),
PR [18397](https://github.com/python/mypy/pull/18397)).

Drop Support for Python 3.8

Mypy no longer supports running with Python 3.8, which has reached end-of-life.
When running mypy with Python 3.9+, it is still possible to type check code
that needs to support Python 3.8 with the `--python-version 3.8` argument.
Support for this will be dropped in the first half of 2025!

Contributed by Marc Mueller (PR [17492](https://github.com/python/mypy/pull/17492)).

Mypyc Improvements

* Fix `__init__` for classes with `attr.s(slots=True)` (Advait Dixit, PR [18447](https://github.com/python/mypy/pull/18447))
* Report error for nested class instead of crashing (Valentin Stanciu, PR [18460](https://github.com/python/mypy/pull/18460))
* Fix `InitVar` for dataclasses (Advait Dixit, PR [18319](https://github.com/python/mypy/pull/18319))
* Remove unnecessary mypyc files from wheels (Marc Mueller, PR [18416](https://github.com/python/mypy/pull/18416))
* Fix issues with relative imports (Advait Dixit, PR [18286](https://github.com/python/mypy/pull/18286))
* Add faster primitive for some list get item operations (Jukka Lehtosalo, PR [18136](https://github.com/python/mypy/pull/18136))
* Fix iteration over `NamedTuple` objects (Advait Dixit, PR [18254](https://github.com/python/mypy/pull/18254))
* Mark mypyc package with `py.typed` (bzoracler, PR [18253](https://github.com/python/mypy/pull/18253))
* Fix list index while checking for `Enum` class (Advait Dixit, PR [18426](https://github.com/python/mypy/pull/18426))

Stubgen Improvements

* Improve dataclass init signatures (Marc Mueller, PR [18430](https://github.com/python/mypy/pull/18430))
* Preserve `dataclass_transform` decorator (Marc Mueller, PR [18418](https://github.com/python/mypy/pull/18418))
* Fix `UnpackType` for 3.11+ (Marc Mueller, PR [18421](https://github.com/python/mypy/pull/18421))
* Improve `self` annotations (Marc Mueller, PR [18420](https://github.com/python/mypy/pull/18420))
* Print `InspectError` traceback in stubgen `walk_packages` when verbose is specified (Gareth, PR [18224](https://github.com/python/mypy/pull/18224))

Stubtest Improvements

* Fix crash with numpy array default values (Ali Hamdan, PR [18353](https://github.com/python/mypy/pull/18353))
* Distinguish metaclass attributes from class attributes (Stephen Morton, PR [18314](https://github.com/python/mypy/pull/18314))

Fixes to Crashes

* Prevent crash with `Unpack` of a fixed tuple in PEP695 type alias (Stanislav Terliakov, PR [18451](https://github.com/python/mypy/pull/18451))
* Fix crash with `--cache-fine-grained --cache-dir=/dev/null` (Shantanu, PR [18457](https://github.com/python/mypy/pull/18457))
* Prevent crashing when `match` arms use name of existing callable (Stanislav Terliakov, PR [18449](https://github.com/python/mypy/pull/18449))
* Gracefully handle encoding errors when writing to stdout (Brian Schubert, PR [18292](https://github.com/python/mypy/pull/18292))
* Prevent crash on generic NamedTuple with unresolved typevar bound (Stanislav Terliakov, PR [18585](https://github.com/python/mypy/pull/18585))

Documentation Updates

* Add inline tabs to documentation (Marc Mueller, PR [18262](https://github.com/python/mypy/pull/18262))
* Document any `TYPE_CHECKING` name works (Shantanu, PR [18443](https://github.com/python/mypy/pull/18443))
* Update documentation to not mention 3.8 where possible (sobolevn, PR [18455](https://github.com/python/mypy/pull/18455))
* Mention `ignore_errors` in exclude documentation (Shantanu, PR [18412](https://github.com/python/mypy/pull/18412))
* Add `Self` misuse to common issues (Shantanu, PR [18261](https://github.com/python/mypy/pull/18261))

Other Notable Fixes and Improvements

* Fix literal context for ternary expressions (Ivan Levkivskyi, PR [18545](https://github.com/python/mypy/pull/18545))
* Ignore `dataclass.__replace__` LSP violations (Marc Mueller, PR [18464](https://github.com/python/mypy/pull/18464))
* Bind `self` to the class being defined when checking multiple inheritance (Stanislav Terliakov, PR [18465](https://github.com/python/mypy/pull/18465))
* Fix attribute type resolution with multiple inheritance (Stanislav Terliakov, PR [18415](https://github.com/python/mypy/pull/18415))
* Improve security of our GitHub Actions (sobolevn, PR [18413](https://github.com/python/mypy/pull/18413))
* Unwrap `type[Union[...]]` when solving type variable constraints (Stanislav Terliakov, PR [18266](https://github.com/python/mypy/pull/18266))
* Allow `Any` to match sequence patterns in match/case (Stanislav Terliakov, PR [18448](https://github.com/python/mypy/pull/18448))
* Fix parent generics mapping when overriding generic attribute with property (Stanislav Terliakov, PR [18441](https://github.com/python/mypy/pull/18441))
* Add dedicated error code for explicit `Any` (Shantanu, PR [18398](https://github.com/python/mypy/pull/18398))
* Reject invalid `ParamSpec` locations (Stanislav Terliakov, PR [18278](https://github.com/python/mypy/pull/18278))
* Stop suggesting stubs that have been removed from typeshed (Shantanu, PR [18373](https://github.com/python/mypy/pull/18373))
* Allow inverting `--local-partial-types` (Shantanu, PR [18377](https://github.com/python/mypy/pull/18377))
* Allow to use `Final` and `ClassVar` after Python 3.13 (정승원, PR [18358](https://github.com/python/mypy/pull/18358))
* Update suggestions to include latest stubs in typeshed (Shantanu, PR [18366](https://github.com/python/mypy/pull/18366))
* Fix `--install-types` masking failure details (wyattscarpenter, PR [17485](https://github.com/python/mypy/pull/17485))
* Reject promotions when checking against protocols (Christoph Tyralla, PR [18360](https://github.com/python/mypy/pull/18360))
* Don't erase type object arguments in diagnostics (Shantanu, PR [18352](https://github.com/python/mypy/pull/18352))
* Clarify status in `dmypy status` output (Kcornw, PR [18331](https://github.com/python/mypy/pull/18331))
* Disallow no-argument generic aliases when using PEP 613 explicit aliases (Brian Schubert, PR [18173](https://github.com/python/mypy/pull/18173))
* Suppress errors for unreachable branches in conditional expressions (Brian Schubert, PR [18295](https://github.com/python/mypy/pull/18295))
* Do not allow `ClassVar` and `Final` in `TypedDict` and `NamedTuple` (sobolevn, PR [18281](https://github.com/python/mypy/pull/18281))
* Report error if not enough or too many types provided to `TypeAliasType` (bzoracler, PR [18308](https://github.com/python/mypy/pull/18308))
* Use more precise context for `TypedDict` plugin errors (Brian Schubert, PR [18293](https://github.com/python/mypy/pull/18293))
* Use more precise context for invalid type argument errors (Brian Schubert, PR [18290](https://github.com/python/mypy/pull/18290))
* Do not allow `type[]` to contain `Literal` types (sobolevn, PR [18276](https://github.com/python/mypy/pull/18276))
* Allow bytearray/bytes comparisons with `--strict-bytes` (Jukka Lehtosalo, PR [18255](https://github.com/python/mypy/pull/18255))

Acknowledgements

Thanks to all mypy contributors who contributed to this release:

- Advait Dixit
- Ali Hamdan
- Brian Schubert
- bzoracler
- Cameron Matsui
- Christoph Tyralla
- Gareth
- Ivan Levkivskyi
- Jukka Lehtosalo
- Kcornw
- Marc Mueller
- Mikhail f. Shiryaev
- Shantanu
- sobolevn
- Stanislav Terliakov
- Stephen Morton
- Valentin Stanciu
- Viktor Szépe
- wyattscarpenter
- 정승원

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

1.14

We’ve just uploaded mypy 1.14 to the Python Package Index ([PyPI](https://pypi.org/project/mypy/)).
Mypy is a static type checker for Python. This release includes new features 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).

Change to Enum Membership Semantics

As per the updated [typing specification for enums](https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members),
enum members must be left unannotated.

python
class Pet(Enum):
 CAT = 1   Member attribute
 DOG = 2   Member attribute

  New error: Enum members must be left unannotated
 WOLF: int = 3

 species: str   Considered a non-member attribute


In particular, the specification change can result in issues in type stubs (`.pyi` files), since
historically it was common to leave the value absent:

python
In a type stub (.pyi file)

class Pet(Enum):
  Change in semantics: previously considered members,
  now non-member attributes
 CAT: int
 DOG: int

  Mypy will now issue a warning if it detects this
  situation in type stubs:
  > Detected enum "Pet" in a type stub with zero
  > members. There is a chance this is due to a recent
  > change in the semantics of enum membership. If so,
  > use `member = value` to mark an enum member,
  > instead of `member: type`

class Pet(Enum):
  As per the specification, you should now do one of
  the following:
 DOG = 1   Member attribute with value 1 and known type
 WOLF = cast(int, ...)   Member attribute with unknown
                         value but known type
 LION = ...   Member attribute with unknown value and
               unknown type


Contributed by Terence Honles (PR [17207](https://github.com/python/mypy/pull/17207)) and
Shantanu Jain (PR [18068](https://github.com/python/mypy/pull/18068)).

Support for deprecated Decorator (PEP 702)

Mypy can now issue errors or notes when code imports a deprecated feature
explicitly with a `from mod import depr` statement, or uses a deprecated feature
imported otherwise or defined locally. Features are considered deprecated when
decorated with `warnings.deprecated`, as specified in [PEP 702](https://peps.python.org/pep-0702).

You can enable the error code via `--enable-error-code=deprecated` on the mypy
command line or `enable_error_code = deprecated` in the mypy config file.
Use the command line flag `--report-deprecated-as-note` or config file option
`report_deprecated_as_note=True` to turn all such errors into notes.

Deprecation errors will be enabled by default in a future mypy version.

This feature was contributed by Christoph Tyralla.

List of changes:

* Add basic support for PEP 702 (`deprecated`) (Christoph Tyralla, PR [17476](https://github.com/python/mypy/pull/17476))
* Support descriptors with `deprecated` (Christoph Tyralla, PR [18090](https://github.com/python/mypy/pull/18090))
* Make "deprecated" note an error, disabled by default (Valentin Stanciu, PR [18192](https://github.com/python/mypy/pull/18192))
* Consider all possible type positions with `deprecated` (Christoph Tyralla, PR [17926](https://github.com/python/mypy/pull/17926))
* Improve the handling of explicit type annotations in assignment statements with `deprecated` (Christoph Tyralla, PR [17899](https://github.com/python/mypy/pull/17899))

Optionally Analyzing Untyped Modules

Mypy normally doesn't analyze imports from third-party modules (installed using pip, for example)
if there are no stubs or a py.typed marker file. To force mypy to analyze these imports, you
can now use the `--follow-untyped-imports` flag or set the `follow_untyped_imports`
config file option to True. This can be set either in the global section of your mypy config
file, or individually on a per-module basis.

This feature was contribut

@pyup-bot
Copy link
Collaborator Author

Closing this in favor of #389

@pyup-bot pyup-bot closed this Jun 10, 2025
@madig madig deleted the pyup-scheduled-update-2025-05-12 branch June 10, 2025 00:34
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