Closed pyup-bot closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
3e6a650
) 97.10% compared to head (2a1c34d
) 97.10%.:exclamation: Current head 2a1c34d differs from pull request most recent head ceb35c1. Consider uploading reports for the commit ceb35c1 to get more accurate results
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closing this in favor of #682
Update matplotlib from 3.7.2 to 3.8.2.
Changelog
### 3.8.2 ``` This is the second bugfix release of the 3.8 series. Highlights of this release include: - Fix a segfault in the MacOS backend when running on Python 3.12 - Fix Contour labeling manual positions selecting incorrect contours. - Various documentation improvements ``` ### 3.8.1 ``` This is the first bugfix release of the 3.8.x series. This release contains several bug fixes and adjustments: - Bump setuptools required version because of setuptools_scm v8 - Update ``find_nearest_contour`` and revert contour deprecations - ``allsegs`` and ``allkinds`` return individual segments - Restore default behavior of hexbin mincnt with C provided - Try/except import of Axes3D - Ensure valid path mangling for ContourLabeler - BLD: Remove development dependencies from sdists - FIX 2-tuple of colors in to_rgba_array - Fix issue with non-string labels and legend - Fix issue with locale comma when not using math text - Various type hinting improvements - Various documentation improvements - Improvements to the MacOS backend ``` ### 3.7.4 ``` This is the fourth bugfix release of the 3.7.x series. This release contains one bug-fix: - Fix a segmentation fault when resizing on Python 3.12 and macOS 14 ``` ### 3.7.3 ``` This is the third bugfix release of the 3.7.x series. This release contains several bug-fixes and adjustments: * Add Python 3.12 wheels * Update the license for the bundled colorbrewer colormap data * Fix Cairo backend when using cairocffi * Fix axes_grid1 inset axes with `bbox_inches=tight` * Fix bugs in `Path3DCollection` / `Poly3DCollection` constructors * Fix setting array labelcolor on Tick * Improve compatibility with latest NumPy * Stop warning when calling `tight_layout` multiple times ```Links
- PyPI: https://pypi.org/project/matplotlib - Changelog: https://data.safetycli.com/changelogs/matplotlib/ - Homepage: https://matplotlib.orgUpdate Pillow from 10.1.0 to 10.2.0.
Changelog
### 10.2.0 ``` ------------------- - Add ``keep_rgb`` option when saving JPEG to prevent conversion of RGB colorspace 7553 [bgilbert, radarhere] - Trim glyph size in ImageFont.getmask() 7669, 7672 [radarhere, nulano] - Deprecate IptcImagePlugin helpers 7664 [nulano, hugovk, radarhere] - Allow uncompressed TIFF images to be saved in chunks 7650 [radarhere] - Concatenate multiple JPEG EXIF markers 7496 [radarhere] - Changed IPTC tile tuple to match other plugins 7661 [radarhere] - Do not assign new fp attribute when exiting context manager 7566 [radarhere] - Support arbitrary masks for uncompressed RGB DDS images 7589 [radarhere, akx] - Support setting ROWSPERSTRIP tag 7654 [radarhere] - Apply ImageFont.MAX_STRING_LENGTH to ImageFont.getmask() 7662 [radarhere] - Optimise ``ImageColor`` using ``functools.lru_cache`` 7657 [hugovk] - Restricted environment keys for ImageMath.eval() 7655 [wiredfool, radarhere] - Optimise ``ImageMode.getmode`` using ``functools.lru_cache`` 7641 [hugovk, radarhere] - Fix incorrect color blending for overlapping glyphs 7497 [ZachNagengast, nulano, radarhere] - Attempt memory mapping when tile args is a string 7565 [radarhere] - Fill identical pixels with transparency in subsequent frames when saving GIF 7568 [radarhere] - Corrected duration when combining multiple GIF frames into single frame 7521 [radarhere] - Handle disposing GIF background from outside palette 7515 [radarhere] - Seek past the data when skipping a PSD layer 7483 [radarhere] - Import plugins relative to the module 7576 [deliangyang, jaxx0n] - Translate encoder error codes to strings; deprecate ``ImageFile.raise_oserror()`` 7609 [bgilbert, radarhere] - Support reading BC4U and DX10 BC1 images 6486 [REDxEYE, radarhere, hugovk] - Optimize ImageStat.Stat.extrema 7593 [florath, radarhere] - Handle pathlib.Path in FreeTypeFont 7578 [radarhere, hugovk, nulano] - Added support for reading DX10 BC4 DDS images 7603 [sambvfx, radarhere] - Optimized ImageStat.Stat.count 7599 [florath] - Correct PDF palette size when saving 7555 [radarhere] - Fixed closing file pointer with olefile 0.47 7594 [radarhere] - Raise ValueError when TrueType font size is not greater than zero 7584, 7587 [akx, radarhere] - If absent, do not try to close fp when closing image 7557 [RaphaelVRossi, radarhere] - Allow configuring JPEG restart marker interval on save 7488 [bgilbert, radarhere] - Decrement reference count for PyObject 7549 [radarhere] - Implement ``streamtype=1`` option for tables-only JPEG encoding 7491 [bgilbert, radarhere] - If save_all PNG only has one frame, do not create animated image 7522 [radarhere] - Fixed frombytes() for images with a zero dimension 7493 [radarhere] ```Links
- PyPI: https://pypi.org/project/pillow - Changelog: https://data.safetycli.com/changelogs/pillow/Update sqlalchemy from 2.0.22 to 2.0.25.
Changelog
### 2.0.25 ``` :released: January 2, 2024 .. change:: :tags: oracle, asyncio :tickets: 10679 Added support for :ref:`oracledb` in asyncio mode, using the newly released version of the ``oracledb`` DBAPI that includes asyncio support. For the 2.0 series, this is a preview release, where the current implementation does not yet have include support for :meth:`_asyncio.AsyncConnection.stream`. Improved support is planned for the 2.1 release of SQLAlchemy. .. change:: :tags: bug, orm :tickets: 10800 Fixed issue where when making use of the :paramref:`_orm.relationship.post_update` feature at the same time as using a mapper version_id_col could lead to a situation where the second UPDATE statement emitted by the post-update feature would fail to make use of the correct version identifier, assuming an UPDATE was already emitted in that flush which had already bumped the version counter. .. change:: :tags: bug, typing :tickets: 10801, 10818 Fixed regressions caused by typing added to the ``sqlalchemy.sql.functions`` module in version 2.0.24, as part of :ticket:`6810`: * Further enhancements to pep-484 typing to allow SQL functions from :attr:`_sql.func` derived elements to work more effectively with ORM-mapped attributes (:ticket:`10801`) * Fixed the argument types passed to functions so that literal expressions like strings and ints are again interpreted correctly (:ticket:`10818`) .. change:: :tags: usecase, orm :tickets: 10807 Added preliminary support for Python 3.12 pep-695 type alias structures, when resolving custom type maps for ORM Annotated Declarative mappings. .. change:: :tags: bug, orm :tickets: 10815 Fixed issue where ORM Annotated Declarative would mis-interpret the left hand side of a relationship without any collection specified as uselist=True if the left type were given as a class and not a string, without using future-style annotations. .. change:: :tags: bug, sql :tickets: 10817 Improved compilation of :func:`_sql.any_` / :func:`_sql.all_` in the context of a negation of boolean comparison, will now render ``NOT (expr)`` rather than reversing the equality operator to not equals, allowing finer-grained control of negations for these non-typical operators. .. changelog:: ``` ### 2.0.24 ``` :released: December 28, 2023 .. change:: :tags: bug, orm :tickets: 10597 Fixed issue where use of :func:`_orm.foreign` annotation on a non-initialized :func:`_orm.mapped_column` construct would produce an expression without a type, which was then not updated at initialization time of the actual column, leading to issues such as relationships not determining ``use_get`` appropriately. .. change:: :tags: bug, schema :tickets: 10654 Fixed issue where error reporting for unexpected schema item when creating objects like :class:`_schema.Table` would incorrectly handle an argument that was itself passed as a tuple, leading to a formatting error. The error message has been modernized to use f-strings. .. change:: :tags: bug, engine :tickets: 10662 Fixed URL-encoding of the username and password components of :class:`.engine.URL` objects when converting them to string using the :meth:`_engine.URL.render_as_string` method, by using Python standard library ``urllib.parse.quote`` while allowing for plus signs and spaces to remain unchanged as supported by SQLAlchemy's non-standard URL parsing, rather than the legacy home-grown routine from many years ago. Pull request courtesy of Xavier NUNN. .. change:: :tags: bug, orm :tickets: 10668 Improved the error message produced when the unit of work process sets the value of a primary key column to NULL due to a related object with a dependency rule on that column being deleted, to include not just the destination object and column name but also the source column from which the NULL value is originating. Pull request courtesy Jan Vollmer. .. change:: :tags: bug, postgresql :tickets: 10717 Adjusted the asyncpg dialect such that when the ``terminate()`` method is used to discard an invalidated connection, the dialect will first attempt to gracefully close the connection using ``.close()`` with a timeout, if the operation is proceeding within an async event loop context only. This allows the asyncpg driver to attend to finalizing a ``TimeoutError`` including being able to close a long-running query server side, which otherwise can keep running after the program has exited. .. change:: :tags: bug, orm :tickets: 10732 Modified the ``__init_subclass__()`` method used by :class:`_orm.MappedAsDataclass`, :class:`_orm.DeclarativeBase` and :class:`_orm.DeclarativeBaseNoMeta` to accept arbitrary ``**kw`` and to propagate them to the ``super()`` call, allowing greater flexibility in arranging custom superclasses and mixins which make use of ``__init_subclass__()`` keyword arguments. Pull request courtesy Michael Oliver. .. change:: :tags: bug, tests :tickets: 10747 Improvements to the test suite to further harden its ability to run when Python ``greenlet`` is not installed. There is now a tox target that includes the token "nogreenlet" that will run the suite with greenlet not installed (note that it still temporarily installs greenlet as part of the tox config, however). .. change:: :tags: bug, sql :tickets: 10753 Fixed issue in stringify for SQL elements, where a specific dialect is not passed, where a dialect-specific element such as the PostgreSQL "on conflict do update" construct is encountered and then fails to provide for a stringify dialect with the appropriate state to render the construct, leading to internal errors. .. change:: :tags: bug, sql Fixed issue where stringifying or compiling a :class:`.CTE` that was against a DML construct such as an :func:`_sql.insert` construct would fail to stringify, due to a mis-detection that the statement overall is an INSERT, leading to internal errors. .. change:: :tags: bug, orm :tickets: 10776 Ensured the use case of :class:`.Bundle` objects used in the ``returning()`` portion of ORM-enabled INSERT, UPDATE and DELETE statements is tested and works fully. This was never explicitly implemented or tested previously and did not work correctly in the 1.4 series; in the 2.0 series, ORM UPDATE/DELETE with WHERE criteria was missing an implementation method preventing :class:`.Bundle` objects from working. .. change:: :tags: bug, orm :tickets: 10784 Fixed 2.0 regression in :class:`.MutableList` where a routine that detects sequences would not correctly filter out string or bytes instances, making it impossible to assign a string value to a specific index (while non-sequence values would work fine). .. change:: :tags: change, asyncio The ``async_fallback`` dialect argument is now deprecated, and will be removed in SQLAlchemy 2.1. This flag has not been used for SQLAlchemy's test suite for some time. asyncio dialects can still run in a synchronous style by running code within a greenlet using :func:`_util.greenlet_spawn`. .. change:: :tags: bug, typing :tickets: 6810 Completed pep-484 typing for the ``sqlalchemy.sql.functions`` module. :func:`_sql.select` constructs made against ``func`` elements should now have filled-in return types. .. changelog:: ``` ### 2.0.23 ``` :released: November 2, 2023 .. change:: :tags: bug, oracle :tickets: 10509 Fixed issue in :class:`.Interval` datatype where the Oracle implementation was not being used for DDL generation, leading to the ``day_precision`` and ``second_precision`` parameters to be ignored, despite being supported by this dialect. Pull request courtesy Indivar. .. change:: :tags: bug, orm :tickets: 10516 Fixed issue where the ``__allow_unmapped__`` directive failed to allow for legacy :class:`.Column` / :func:`.deferred` mappings that nonetheless had annotations such as ``Any`` or a specific type without ``Mapped[]`` as their type, without errors related to locating the attribute name. .. change:: :tags: bug, mariadb :tickets: 10056 Adjusted the MySQL / MariaDB dialects to default a generated column to NULL when using MariaDB, if :paramref:`_schema.Column.nullable` was not specified with an explicit ``True`` or ``False`` value, as MariaDB does not support the "NOT NULL" phrase with a generated column. Pull request courtesy Indivar. .. change:: :tags: bug, mariadb, regression :tickets: 10505 Established a workaround for what seems to be an intrinsic issue across MySQL/MariaDB drivers where a RETURNING result for DELETE DML which returns no rows using SQLAlchemy's "empty IN" criteria fails to provide a cursor.description, which then yields result that returns no rows, leading to regressions for the ORM that in the 2.0 series uses RETURNING for bulk DELETE statements for the "synchronize session" feature. To resolve, when the specific case of "no description when RETURNING was given" is detected, an "empty result" with a correct cursor description is generated and used in place of the non-working cursor. .. change:: :tags: bug, orm :tickets: 10570 Fixed caching bug where using the :func:`_orm.with_expression` construct in conjunction with loader options :func:`_orm.selectinload`, :func:`_orm.lazyload` would fail to substitute bound parameter values correctly on subsequent caching runs. .. change:: :tags: usecase, mssql :tickets: 6521 Added support for the ``aioodbc`` driver implemented for SQL Server, which builds on top of the pyodbc and general aio* dialect architecture. .. seealso:: :ref:`mssql_aioodbc` - in the SQL Server dialect documentation. .. change:: :tags: bug, sql :tickets: 10535 Added compiler-level None/NULL handling for the "literal processors" of all datatypes that include literal processing, that is, where a value is rendered inline within a SQL statement rather than as a bound parameter, for all those types that do not feature explicit "null value" handling. Previously this behavior was undefined and inconsistent. .. change:: :tags: usecase, orm :tickets: 10575 Implemented the :paramref:`_orm.Session.bulk_insert_mappings.render_nulls` parameter for new style bulk ORM inserts, allowing ``render_nulls=True`` as an execution option. This allows for bulk ORM inserts with a mixture of ``None`` values in the parameter dictionaries to use a single batch of rows for a given set of dicationary keys, rather than breaking up into batches that omit the NULL columns from each INSERT. .. seealso:: :ref:`orm_queryguide_insert_null_params` .. change:: :tags: bug, postgresql :tickets: 10479 Fixed 2.0 regression caused by :ticket:`7744` where chains of expressions involving PostgreSQL JSON operators combined with other operators such as string concatenation would lose correct parenthesization, due to an implementation detail specific to the PostgreSQL dialect. .. change:: :tags: bug, postgresql :tickets: 10532 Fixed SQL handling for "insertmanyvalues" when using the :class:`.postgresql.BIT` datatype with the asyncpg backend. The :class:`.postgresql.BIT` on asyncpg apparently requires the use of an asyncpg-specific ``BitString`` type which is currently exposed when using this DBAPI, making it incompatible with other PostgreSQL DBAPIs that all work with plain bitstrings here. A future fix in version 2.1 will normalize this datatype across all PG backends. Pull request courtesy Sören Oldag. .. change:: :tags: usecase, sql :tickets: 9737 Implemented "literal value processing" for the :class:`.Interval` datatype for both the PostgreSQL and Oracle dialects, allowing literal rendering of interval values. Pull request courtesy Indivar Mishra. .. change:: :tags: bug, oracle :tickets: 10470 Fixed issue where the cx_Oracle dialect claimed to support a lower cx_Oracle version (7.x) than was actually supported in practice within the 2.0 series of SQLAlchemy. The dialect imports symbols that are only in cx_Oracle 8 or higher, so runtime dialect checks as well as setup.cfg requirements have been updated to reflect this compatibility. .. change:: :tags: sql Removed unused placeholder method :meth:`.TypeEngine.compare_against_backend` This method was used by very old versions of Alembic. See https://github.com/sqlalchemy/alembic/issues/1293 for details. .. change:: :tags: bug, orm :tickets: 10472 Fixed bug in ORM annotated declarative where using a ``ClassVar`` that nonetheless referred in some way to an ORM mapped class name would fail to be interpreted as a ``ClassVar`` that's not mapped. .. change:: :tags: bug, asyncio :tickets: 10421 Fixed bug with method :meth:`_asyncio.AsyncSession.close_all` that was not working correctly. Also added function :func:`_asyncio.close_all_sessions` that's the equivalent of :func:`_orm.close_all_sessions`. Pull request courtesy of Bryan不可思议. .. changelog:: ```Links
- PyPI: https://pypi.org/project/sqlalchemy - Changelog: https://data.safetycli.com/changelogs/sqlalchemy/ - Homepage: https://www.sqlalchemy.orgUpdate coverage from 6.5.0 to 7.4.1.
Changelog
### 7.4.1 ``` - Python 3.13.0a3 is supported. - Fix: the JSON report now includes an explicit format version number, closing [issue 1732](https://github.com/nedbat/coveragepy/issues/1732). :arrow_right: PyPI page: [coverage 7.4.1](https://pypi.org/project/coverage/7.4.1). :arrow_right: To install: `python3 -m pip install coverage==7.4.1` ``` ### 7.4.0 ``` - In Python 3.12 and above, you can try an experimental core based on the new `sys.monitoring <python:sys.monitoring>` module by defining a `COVERAGE_CORE=sysmon` environment variable. This should be faster for line coverage, but not for branch coverage, and plugins and dynamic contexts are not yet supported with it. I am very interested to hear how it works (or doesn't!) for you. :arrow_right: PyPI page: [coverage 7.4.0](https://pypi.org/project/coverage/7.4.0). :arrow_right: To install: `python3 -m pip install coverage==7.4.0` ``` ### 7.3.4 ``` - Fix: the change for multi-line signature exclusions in 7.3.3 broke other forms of nested clauses being excluded properly. This is now fixed, closing [issue 1713](https://github.com/nedbat/coveragepy/issues/1713). - Fix: in the HTML report, selecting code for copying won't select the line numbers also. Thanks, [Robert Harris](https://github.com/nedbat/coveragepy/pull/1717). :arrow_right: PyPI page: [coverage 7.3.4](https://pypi.org/project/coverage/7.3.4). :arrow_right: To install: `python3 -m pip install coverage==7.3.4` ``` ### 7.3.3 ``` - Fix: function definitions with multi-line signatures can now be excluded by matching any of the lines, closing [issue 684](https://github.com/nedbat/coveragepy/issues/684). Thanks, [Jan Rusak, Maciej Kowalczyk and Joanna Ejzel](https://github.com/nedbat/coveragepy/pull/1705). - Fix: XML reports could fail with a TypeError if files had numeric components that were duplicates except for leading zeroes, like `file1.py` and `file001.py`. Fixes [issue 1709](https://github.com/nedbat/coveragepy/issues/1709). - The `coverage annotate` command used to announce that it would be removed in a future version. Enough people got in touch to say that they use it, so it will stay. Don't expect it to keep up with other new features though. - Added new `debug options <cmd_run_debug>`: - `pytest` writes the pytest test name into the debug output. - `dataop2` writes the full data being added to CoverageData objects. :arrow_right: PyPI page: [coverage 7.3.3](https://pypi.org/project/coverage/7.3.3). :arrow_right: To install: `python3 -m pip install coverage==7.3.3` ``` ### 7.3.2 ``` - The `coverage lcov` command ignored the `[report] exclude_lines` and `[report] exclude_also` settings ([issue 1684](https://github.com/nedbat/coveragepy/issues/1684)). This is now fixed, thanks [Jacqueline Lee](https://github.com/nedbat/coveragepy/pull/1685). - Sometimes SQLite will create journal files alongside the coverage.py database files. These are ephemeral, but could be mistakenly included when combining data files. Now they are always ignored, fixing [issue 1605](https://github.com/nedbat/coveragepy/issues/1605). Thanks to Brad Smith for suggesting fixes and providing detailed debugging. - On Python 3.12+, we now disable SQLite writing journal files, which should be a little faster. - The new 3.12 soft keyword `type` is properly bolded in HTML reports. - Removed the "fullcoverage" feature used by CPython to measure the coverage of early-imported standard library modules. CPython [stopped using it](https://github.com/python/cpython/issues/88054) in 2021, and it stopped working completely in Python 3.13. :arrow_right: PyPI page: [coverage 7.3.2](https://pypi.org/project/coverage/7.3.2). :arrow_right: To install: `python3 -m pip install coverage==7.3.2` ``` ### 7.3.1 ``` - The semantics of stars in file patterns has been clarified in the docs. A leading or trailing star matches any number of path components, like a double star would. This is different than the behavior of a star in the middle of a pattern. This discrepancy was [identified by Sviatoslav Sydorenko](https://github.com/nedbat/coveragepy/issues/1407#issuecomment-1631085209), who [provided patient detailed diagnosis](https://github.com/nedbat/coveragepy/pull/1650) and graciously agreed to a pragmatic resolution. - The API docs were missing from the last version. They are now [restored](https://coverage.readthedocs.io/en/latest/api_coverage.html). :arrow_right: PyPI page: [coverage 7.3.1](https://pypi.org/project/coverage/7.3.1). :arrow_right: To install: `python3 -m pip install coverage==7.3.1` ``` ### 7.3.0 ``` - Added a `.Coverage.collect` context manager to start and stop coverage data collection. - Dropped support for Python 3.7. - Fix: in unusual circumstances, SQLite cannot be set to asynchronous mode. Coverage.py would fail with the error `Safety level may not be changed inside a transaction.` This is now avoided, closing [issue 1646](https://github.com/nedbat/coveragepy/issues/1646). Thanks to Michael Bell for the detailed bug report. - Docs: examples of configuration files now include separate examples for the different syntaxes: .coveragerc, pyproject.toml, setup.cfg, and tox.ini. - Fix: added `nosemgrep` comments to our JavaScript code so that semgrep-based SAST security checks won't raise false alarms about security problems that aren't problems. - Added a CITATION.cff file, thanks to [Ken Schackart](https://github.com/nedbat/coveragepy/pull/1641). :arrow_right: PyPI page: [coverage 7.3.0](https://pypi.org/project/coverage/7.3.0). :arrow_right: To install: `python3 -m pip install coverage==7.3.0` ``` ### 7.2.7 ``` - Fix: reverted a [change from 6.4.3](https://github.com/nedbat/coveragepy/pull/1347) that helped Cython, but also increased the size of data files when using dynamic contexts, as described in the now-fixed [issue 1586](https://github.com/nedbat/coveragepy/issues/1586). The problem is now avoided due to a recent change ([issue 1538](https://github.com/nedbat/coveragepy/issues/1538)). Thanks to [Anders Kaseorg](https://github.com/nedbat/coveragepy/pull/1629) and David Szotten for persisting with problem reports and detailed diagnoses. - Wheels are now provided for CPython 3.12. :arrow_right: PyPI page: [coverage 7.2.7](https://pypi.org/project/coverage/7.2.7). :arrow_right: To install: `python3 -m pip install coverage==7.2.7` ``` ### 7.2.6 ``` - Fix: the `lcov` command could raise an IndexError exception if a file is translated to Python but then executed under its own name. Jinja2 does this when rendering templates. Fixes [issue 1553](https://github.com/nedbat/coveragepy/issues/1553). - Python 3.12 beta 1 now inlines comprehensions. Previously they were compiled as invisible functions and coverage.py would warn you if they weren't completely executed. This no longer happens under Python 3.12. - Fix: the `coverage debug sys` command includes some environment variables in its output. This could have included sensitive data. Those values are now hidden with asterisks, closing [issue 1628](https://github.com/nedbat/coveragepy/issues/1628). :arrow_right: PyPI page: [coverage 7.2.6](https://pypi.org/project/coverage/7.2.6). :arrow_right: To install: `python3 -m pip install coverage==7.2.6` ``` ### 7.2.5 ``` - Fix: `html_report()` could fail with an AttributeError on `isatty` if run in an unusual environment where sys.stdout had been replaced. This is now fixed. :arrow_right: PyPI page: [coverage 7.2.5](https://pypi.org/project/coverage/7.2.5). :arrow_right: To install: `python3 -m pip install coverage==7.2.5` ``` ### 7.2.4 ``` PyCon 2023 sprint fixes! - Fix: with `relative_files = true`, specifying a specific file to include or omit wouldn't work correctly ([issue 1604](https://github.com/nedbat/coveragepy/issues/1604)). This is now fixed, with testing help by [Marc Gibbons](https://github.com/nedbat/coveragepy/pull/1608). - Fix: the XML report would have an incorrect `<source>` element when using relative files and the source option ended with a slash ([issue 1541](https://github.com/nedbat/coveragepy/issues/1541)). This is now fixed, thanks to [Kevin Brown-Silva](https://github.com/nedbat/coveragepy/pull/1608). - When the HTML report location is printed to the terminal, it's now a terminal-compatible URL, so that you can click the location to open the HTML file in your browser. Finishes [issue 1523](https://github.com/nedbat/coveragepy/issues/1523) thanks to [Ricardo Newbery](https://github.com/nedbat/coveragepy/pull/1613). - Docs: a new `Migrating page <migrating>` with details about how to migrate between major versions of coverage.py. It currently covers the wildcard changes in 7.x. Thanks, [Brian Grohe](https://github.com/nedbat/coveragepy/pull/1610). :arrow_right: PyPI page: [coverage 7.2.4](https://pypi.org/project/coverage/7.2.4). :arrow_right: To install: `python3 -m pip install coverage==7.2.4` ``` ### 7.2.3 ``` - Fix: the `config_run_sigterm` setting was meant to capture data if a process was terminated with a SIGTERM signal, but it didn't always. This was fixed thanks to [Lewis Gaul](https://github.com/nedbat/coveragepy/pull/1600), closing [issue 1599](https://github.com/nedbat/coveragepy/issues/1599). - Performance: HTML reports with context information are now much more compact. File sizes are typically as small as one-third the previous size, but can be dramatically smaller. This closes [issue 1584](https://github.com/nedbat/coveragepy/issues/1584) thanks to [Oleh Krehel](https://github.com/nedbat/coveragepy/pull/1587). - Development dependencies no longer use hashed pins, closing [issue 1592](https://github.com/nedbat/coveragepy/issues/1592). :arrow_right: PyPI page: [coverage 7.2.3](https://pypi.org/project/coverage/7.2.3). :arrow_right: To install: `python3 -m pip install coverage==7.2.3` ``` ### 7.2.2 ``` - Fix: if a virtualenv was created inside a source directory, and a sourced package was installed inside the virtualenv, then all of the third-party packages inside the virtualenv would be measured. This was incorrect, but has now been fixed: only the specified packages will be measured, thanks to [Manuel Jacob](https://github.com/nedbat/coveragepy/pull/1560). - Fix: the `coverage lcov` command could create a .lcov file with incorrect LF (lines found) and LH (lines hit) totals. This is now fixed, thanks to [Ian Moore](https://github.com/nedbat/coveragepy/pull/1583). - Fix: the `coverage xml` command on Windows could create a .xml file with duplicate `<package>` elements. This is now fixed, thanks to [Benjamin Parzella](https://github.com/nedbat/coveragepy/pull/1574), closing [issue 1573](https://github.com/nedbat/coveragepy/issues/1573). :arrow_right: PyPI page: [coverage 7.2.2](https://pypi.org/project/coverage/7.2.2). :arrow_right: To install: `python3 -m pip install coverage==7.2.2` ``` ### 7.2.1 ``` - Fix: the PyPI page had broken links to documentation pages, but no longer does, closing [issue 1566](https://github.com/nedbat/coveragepy/issues/1566). - Fix: public members of the coverage module are now properly indicated so that mypy will find them, fixing [issue 1564](https://github.com/nedbat/coveragepy/issues/1564). :arrow_right: PyPI page: [coverage 7.2.1](https://pypi.org/project/coverage/7.2.1). :arrow_right: To install: `python3 -m pip install coverage==7.2.1` ``` ### 7.2.0 ``` - Added a new setting `[report] exclude_also` to let you add more exclusions without overwriting the defaults. Thanks, [Alpha Chen](https://github.com/nedbat/coveragepy/pull/1557), closing [issue 1391](https://github.com/nedbat/coveragepy/issues/1391). - Added a `.CoverageData.purge_files` method to remove recorded data for a particular file. Contributed by [Stephan Deibel](https://github.com/nedbat/coveragepy/pull/1547). - Fix: when reporting commands fail, they will no longer congratulate themselves with messages like "Wrote XML report to file.xml" before spewing a traceback about their failure. - Fix: arguments in the public API that name file paths now accept pathlib.Path objects. This includes the `data_file` and `config_file` arguments to the Coverage constructor and the `basename` argument to CoverageData. Closes [issue 1552](https://github.com/nedbat/coveragepy/issues/1552). - Fix: In some embedded environments, an IndexError could occur on stop() when the originating thread exits before completion. This is now fixed, thanks to [Russell Keith-Magee](https://github.com/nedbat/coveragepy/pull/1543), closing [issue 1542](https://github.com/nedbat/coveragepy/issues/1542). - Added a `py.typed` file to announce our type-hintedness. Thanks, [KotlinIsland](https://github.com/nedbat/coveragepy/pull/1550). :arrow_right: PyPI page: [coverage 7.2.0](https://pypi.org/project/coverage/7.2.0). :arrow_right: To install: `python3 -m pip install coverage==7.2.0` ``` ### 7.1.0 ``` - Added: the debug output file can now be specified with `[run] debug_file` in the configuration file. Closes [issue 1319](https://github.com/nedbat/coveragepy/issues/1319). - Performance: fixed a slowdown with dynamic contexts that's been around since 6.4.3. The fix closes [issue 1538](https://github.com/nedbat/coveragepy/issues/1538). Thankfully this doesn't break the [Cython change](https://github.com/nedbat/coveragepy/pull/1347) that fixed [issue 972](https://github.com/nedbat/coveragepy/issues/972). Thanks to Mathieu Kniewallner for the deep investigative work and comprehensive issue report. - Typing: all product and test code has type annotations. :arrow_right: PyPI page: [coverage 7.1.0](https://pypi.org/project/coverage/7.1.0). :arrow_right: To install: `python3 -m pip install coverage==7.1.0` ``` ### 7.0.5 ``` - Fix: On Python 3.7, a file with type annotations but no `from __future__ import annotations` would be missing statements in the coverage report. This is now fixed, closing [issue 1524](https://github.com/nedbat/coveragepy/issues/1524). :arrow_right: PyPI page: [coverage 7.0.5](https://pypi.org/project/coverage/7.0.5). :arrow_right: To install: `python3 -m pip install coverage==7.0.5` ``` ### 7.0.4 ``` - Performance: an internal cache of file names was accidentally disabled, resulting in sometimes drastic reductions in performance. This is now fixed, closing [issue 1527](https://github.com/nedbat/coveragepy/issues/1527). Thanks to Ivan Ciuvalschii for the reproducible test case. :arrow_right: PyPI page: [coverage 7.0.4](https://pypi.org/project/coverage/7.0.4). :arrow_right: To install: `python3 -m pip install coverage==7.0.4` ``` ### 7.0.3 ``` - Fix: when using pytest-cov or pytest-xdist, or perhaps both, the combining step could fail with `assert row is not None` using 7.0.2. This was due to a race condition that has always been possible and is still possible. In 7.0.1 and before, the error was silently swallowed by the combining code. Now it will produce a message "Couldn't combine data file" and ignore the data file as it used to do before 7.0.2. Closes [issue 1522](https://github.com/nedbat/coveragepy/issues/1522). :arrow_right: PyPI page: [coverage 7.0.3](https://pypi.org/project/coverage/7.0.3). :arrow_right: To install: `python3 -m pip install coverage==7.0.3` ``` ### 7.0.2 ``` - Fix: when using the `[run] relative_files = True` setting, a relative `[paths]` pattern was still being made absolute. This is now fixed, closing [issue 1519](https://github.com/nedbat/coveragepy/issues/1519). - Fix: if Python doesn't provide tomllib, then TOML configuration files can only be read if coverage.py is installed with the `[toml]` extra. Coverage.py will raise an error if TOML support is not installed when it sees your settings are in a .toml file. But it didn't understand that `[tools.coverage]` was a valid section header, so the error wasn't reported if you used that header, and settings were silently ignored. This is now fixed, closing [issue 1516](https://github.com/nedbat/coveragepy/issues/1516). - Fix: adjusted how decorators are traced on PyPy 7.3.10, fixing [issue 1515](https://github.com/nedbat/coveragepy/issues/1515). - Fix: the `coverage lcov` report did not properly implement the `--fail-under=MIN` option. This has been fixed. - Refactor: added many type annotations, including a number of refactorings. This should not affect outward behavior, but they were a bit invasive in some places, so keep your eyes peeled for oddities. - Refactor: removed the vestigial and long untested support for Jython and IronPython. :arrow_right: PyPI page: [coverage 7.0.2](https://pypi.org/project/coverage/7.0.2). :arrow_right: To install: `python3 -m pip install coverage==7.0.2` ``` ### 7.0.1 ``` - When checking if a file mapping resolved to a file that exists, we weren't considering files in .whl files. This is now fixed, closing [issue 1511](https://github.com/nedbat/coveragepy/issues/1511). - File pattern rules were too strict, forbidding plus signs and curly braces in directory and file names. This is now fixed, closing [issue 1513](https://github.com/nedbat/coveragepy/issues/1513). - Unusual Unicode or control characters in source files could prevent reporting. This is now fixed, closing [issue 1512](https://github.com/nedbat/coveragepy/issues/1512). - The PyPy wheel now installs on PyPy 3.7, 3.8, and 3.9, closing [issue 1510](https://github.com/nedbat/coveragepy/issues/1510). :arrow_right: PyPI page: [coverage 7.0.1](https://pypi.org/project/coverage/7.0.1). :arrow_right: To install: `python3 -m pip install coverage==7.0.1` ``` ### 7.0.0 ``` Nothing new beyond 7.0.0b1. :arrow_right: PyPI page: [coverage 7.0.0](https://pypi.org/project/coverage/7.0.0). :arrow_right: To install: `python3 -m pip install coverage==7.0.0` ``` ### 7.0.0b1 ``` A number of changes have been made to file path handling, including pattern matching and path remapping with the `[paths]` setting (see `config_paths`). These changes might affect you, and require you to update your settings. (This release includes the changes from [6.6.0b1](https://coverage.readthedocs.io/en/latest/changes.html#changes-6-6-0b1), since 6.6.0 was never released.) - Changes to file pattern matching, which might require updating your configuration: - Previously, `*` would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing [issue 1407](https://github.com/nedbat/coveragepy/issues/1407). - Now `**` matches any number of nested directories, including none. - Improvements to combining data files when using the `config_run_relative_files` setting, which might require updating your configuration: - During `coverage combine`, relative file paths are implicitly combined without needing a `[paths]` configuration setting. This also fixed [issue 991](https://github.com/nedbat/coveragepy/issues/991). - A `[paths]` setting like `*/foo` will now match `foo/bar.py` so that relative file paths can be combined more easily. - The `config_run_relative_files` setting is properly interpreted in more places, fixing [issue 1280](https://github.com/nedbat/coveragepy/issues/1280). - When remapping file paths with `[paths]`, a path will be remapped only if the resulting path exists. The documentation has long said the prefix had to exist, but it was never enforced. This fixes [issue 608](https://github.com/nedbat/coveragepy/issues/608), improves [issue 649](https://github.com/nedbat/coveragepy/issues/649), and closes [issue 757](https://github.com/nedbat/coveragepy/issues/757). - Reporting operations now implicitly use the `[paths]` setting to remap file paths within a single data file. Combining multiple files still requires the `coverage combine` step, but this simplifies some single-file situations. Closes [issue 1212](https://github.com/nedbat/coveragepy/issues/1212) and [issue 713](https://github.com/nedbat/coveragepy/issues/713). - The `coverage report` command now has a `--format=` option. The original style is now `--format=text`, and is the default. - Using `--format=markdown` will write the table in Markdown format, thanks to [Steve Oswald](https://github.com/nedbat/coveragepy/pull/1479), closing [issue 1418](https://github.com/nedbat/coveragepy/issues/1418). - Using `--format=total` will write a single total number to the output. This can be useful for making badges or writing status updates. - Combining data files with `coverage combine` now hashes the data files to skip files that add no new information. This can reduce the time needed. Many details affect the speed-up, but for coverage.py's own test suite, combining is about 40% faster. Closes [issue 1483](https://github.com/nedbat/coveragepy/issues/1483). - When searching for completely un-executed files, coverage.py uses the presence of `__init__.py` files to determine which directories have source that could have been imported. However, [implicit namespace packages](https://peps.python.org/pep-0420/) don't require `__init__.py`. A new setting `[report] include_namespace_packages` tells coverage.py to consider these directories during reporting. Thanks to [Felix Horvat](https://github.com/nedbat/coveragepy/pull/1387) for the contribution. Closes [issue 1383](https://github.com/nedbat/coveragepy/issues/1383) and [issue 1024](https://github.com/nedbat/coveragepy/issues/1024). - Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in [issue 1481](https://github.com/nedbat/coveragepy/issues/1481) and [issue 1345](https://github.com/nedbat/coveragepy/issues/1345). This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution. - An empty file has a coverage total of 100%, but used to fail with `--fail-under`. This has been fixed, closing [issue 1470](https://github.com/nedbat/coveragepy/issues/1470). - The text report table no longer writes out two separator lines if there are no files listed in the table. One is plenty. - Fixed a mis-measurement of a strange use of wildcard alternatives in match/case statements, closing [issue 1421](https://github.com/nedbat/coveragepy/issues/1421). - Fixed internal logic that prevented coverage.py from running on implementations other than CPython or PyPy ([issue 1474](https://github.com/nedbat/coveragepy/issues/1474)). - The deprecated `[run] note` setting has been completely removed. :arrow_right: PyPI page: [coverage 7.0.0b1](https://pypi.org/project/coverage/7.0.0b1). :arrow_right: To install: `python3 -m pip install coverage==7.0.0b1` ``` ### 6.6.0b1 ``` (Note: 6.6.0 final was never released. These changes are part of [7.0.0b1](https://coverage.readthedocs.io/en/latest/changes.html#changes-7-0-0b1).) - Changes to file pattern matching, which might require updating your configuration: - Previously, `*` would incorrectly match directory separators, making precise matching difficult. This is now fixed, closing [issue 1407](https://github.com/nedbat/coveragepy/issues/1407). - Now `**` matches any number of nested directories, including none. - Improvements to combining data files when using the `config_run_relative_files` setting: - During `coverage combine`, relative file paths are implicitly combined without needing a `[paths]` configuration setting. This also fixed [issue 991](https://github.com/nedbat/coveragepy/issues/991). - A `[paths]` setting like `*/foo` will now match `foo/bar.py` so that relative file paths can be combined more easily. - The setting is properly interpreted in more places, fixing [issue 1280](https://github.com/nedbat/coveragepy/issues/1280). - Fixed environment variable expansion in pyproject.toml files. It was overly broad, causing errors outside of coverage.py settings, as described in [issue 1481](https://github.com/nedbat/coveragepy/issues/1481) and [issue 1345](https://github.com/nedbat/coveragepy/issues/1345). This is now fixed, but in rare cases will require changing your pyproject.toml to quote non-string values that use environment substitution. - Fixed internal logic that prevented coverage.py from running on implementations other than CPython or PyPy ([issue 1474](https://github.com/nedbat/coveragepy/issues/1474)). :arrow_right: PyPI page: [coverage 6.6.0b1](https://pypi.org/project/coverage/6.6.0b1). :arrow_right: To install: `python3 -m pip install coverage==6.6.0b1` ```Links
- PyPI: https://pypi.org/project/coverage - Changelog: https://data.safetycli.com/changelogs/coverage/ - Repo: https://github.com/nedbat/coveragepyUpdate mypy from 1.6.1 to 1.8.0.
Changelog
### 1.8 ``` We’ve just uploaded mypy 1.8 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). Type-checking Improvements * Do not intersect types in isinstance checks if at least one is final (Christoph Tyralla, PR [16330](https://github.com/python/mypy/pull/16330)) * Detect that `final` class without `__bool__` cannot have falsey instances (Ilya Priven, PR [16566](https://github.com/python/mypy/pull/16566)) * Do not allow `TypedDict` classes with extra keywords (Nikita Sobolev, PR [16438](https://github.com/python/mypy/pull/16438)) * Do not allow class-level keywords for `NamedTuple` (Nikita Sobolev, PR [16526](https://github.com/python/mypy/pull/16526)) * Make imprecise constraints handling more robust (Ivan Levkivskyi, PR [16502](https://github.com/python/mypy/pull/16502)) * Fix strict-optional in extending generic TypedDict (Ivan Levkivskyi, PR [16398](https://github.com/python/mypy/pull/16398)) * Allow type ignores of PEP 695 constructs (Shantanu, PR [16608](https://github.com/python/mypy/pull/16608)) * Enable `type_check_only` support for `TypedDict` and `NamedTuple` (Nikita Sobolev, PR [16469](https://github.com/python/mypy/pull/16469)) Performance Improvements * Add fast path to analyzing special form assignments (Jukka Lehtosalo, PR [16561](https://github.com/python/mypy/pull/16561)) Improvements to Error Reporting * Don't show documentation links for plugin error codes (Ivan Levkivskyi, PR [16383](https://github.com/python/mypy/pull/16383)) * Improve error messages for `super` checks and add more tests (Nikita Sobolev, PR [16393](https://github.com/python/mypy/pull/16393)) * Add error code for mutable covariant override (Ivan Levkivskyi, PR [16399](https://github.com/python/mypy/pull/16399)) Stubgen Improvements * Preserve simple defaults in function signatures (Ali Hamdan, PR [15355](https://github.com/python/mypy/pull/15355)) * Include `__all__` in output (Jelle Zijlstra, PR [16356](https://github.com/python/mypy/pull/16356)) * Fix stubgen regressions with pybind11 and mypy 1.7 (Chad Dombrova, PR [16504](https://github.com/python/mypy/pull/16504)) Stubtest Improvements * Improve handling of unrepresentable defaults (Jelle Zijlstra, PR [16433](https://github.com/python/mypy/pull/16433)) * Print more helpful errors if a function is missing from stub (Alex Waygood, PR [16517](https://github.com/python/mypy/pull/16517)) * Support `type_check_only` decorator (Nikita Sobolev, PR [16422](https://github.com/python/mypy/pull/16422)) * Warn about missing `__del__` (Shantanu, PR [16456](https://github.com/python/mypy/pull/16456)) * Fix crashes with some uses of `final` and `deprecated` (Shantanu, PR [16457](https://github.com/python/mypy/pull/16457)) Fixes to Crashes * Fix crash with type alias to `Callable[[Unpack[Tuple[Any, ...]]], Any]` (Alex Waygood, PR [16541](https://github.com/python/mypy/pull/16541)) * Fix crash on TypeGuard in `__call__` (Ivan Levkivskyi, PR [16516](https://github.com/python/mypy/pull/16516)) * Fix crash on invalid enum in method (Ivan Levkivskyi, PR [16511](https://github.com/python/mypy/pull/16511)) * Fix crash on unimported Any in TypedDict (Ivan Levkivskyi, PR [16510](https://github.com/python/mypy/pull/16510)) Documentation Updates * Update soft-error-limit default value to -1 (Sveinung Gundersen, PR [16542](https://github.com/python/mypy/pull/16542)) * Support Sphinx 7.x (Michael R. Crusoe, PR [16460](https://github.com/python/mypy/pull/16460)) Other Notable Changes and Fixes * Allow mypy to output a junit file with per-file results (Matthew Wright, PR [16388](https://github.com/python/mypy/pull/16388)) Typeshed Updates Please see [git log](https://github.com/python/typeshed/commits/main?after=4a854366e03dee700109f8e758a08b2457ea2f51+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: - Alex Waygood - Ali Hamdan - Chad Dombrova - Christoph Tyralla - Ilya Priven - Ivan Levkivskyi - Jelle Zijlstra - Jukka Lehtosalo - Marcel Telka - Matthew Wright - Michael R. Crusoe - Nikita Sobolev - Ole Peder Brandtzæg - robjhornby - Shantanu - Sveinung Gundersen - Valentin Stanciu I’d also like to thank my employer, Dropbox, for supporting mypy development. Posted by Wesley Collin Wright ``` ### 1.7 ``` We’ve just uploaded mypy 1.7 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). Using TypedDict for `**kwargs` Typing Mypy now has support for using `Unpack[...]` with a TypedDict type to annotate `**kwargs` arguments enabled by default. Example: python Or 'from typing_extensions import ...' from typing import TypedDict, Unpack class Person(TypedDict): name: str age: int def foo(**kwargs: Unpack[Person]) -> None: ... foo(name="x", age=1) Ok foo(name=1) Error The definition of `foo` above is equivalent to the one below, with keyword-only arguments `name` and `age`: python def foo(*, name: str, age: int) -> None: ... Refer to [PEP 692](https://peps.python.org/pep-0692/) for more information. Note that unlike in the current version of the PEP, mypy always treats signatures with `Unpack[SomeTypedDict]` as equivalent to their expanded forms with explicit keyword arguments, and there aren't special type checking rules for TypedDict arguments. This was contributed by Ivan Levkivskyi back in 2022 (PR [13471](https://github.com/python/mypy/pull/13471)). TypeVarTuple Support Enabled (Experimental) Mypy now has support for variadic generics (TypeVarTuple) enabled by default, as an experimental feature. Refer to [PEP 646](https://peps.python.org/pep-0646/) for the details. TypeVarTuple was implemented by Jared Hance and Ivan Levkivskyi over several mypy releases, with help from Jukka Lehtosalo. Changes included in this release: * Fix handling of tuple type context with unpacks (Ivan Levkivskyi, PR [16444](https://github.com/python/mypy/pull/16444)) * Handle TypeVarTuples when checking overload constraints (robjhornby, PR [16428](https://github.com/python/mypy/pull/16428)) * Enable Unpack/TypeVarTuple support (Ivan Levkivskyi, PR [16354](https://github.com/python/mypy/pull/16354)) * Fix crash on unpack call special-casing (Ivan Levkivskyi, PR [16381](https://github.com/python/mypy/pull/16381)) * Some final touches for variadic types support (Ivan Levkivskyi, PR [16334](https://github.com/python/mypy/pull/16334)) * Support PEP-646 and PEP-692 in the same callable (Ivan Levkivskyi, PR [16294](https://github.com/python/mypy/pull/16294)) * Support new `*` syntax for variadic types (Ivan Levkivskyi, PR [16242](https://github.com/python/mypy/pull/16242)) * Correctly handle variadic instances with empty arguments (Ivan Levkivskyi, PR [16238](https://github.com/python/mypy/pull/16238)) * Correctly handle runtime type applications of variadic types (Ivan Levkivskyi, PR [16240](https://github.com/python/mypy/pull/16240)) * Support variadic tuple packing/unpacking (Ivan Levkivskyi, PR [16205](https://github.com/python/mypy/pull/16205)) * Better support for variadic calls and indexing (Ivan Levkivskyi, PR [16131](https://github.com/python/mypy/pull/16131)) * Subtyping and inference of user-defined variadic types (Ivan Levkivskyi, PR [16076](https://github.com/python/mypy/pull/16076)) * Complete type analysis of variadic types (Ivan Levkivskyi, PR [15991](https://github.com/python/mypy/pull/15991)) New Way of Installing Mypyc Dependencies If you want to install package dependencies needed by mypyc (not just mypy), you should now install `mypy[mypyc]` instead of just `mypy`: python3 -m pip install -U 'mypy[mypyc]' Mypy has many more users than mypyc, so always installing mypyc dependencies would often bring unnecessary dependencies. This change was contributed by Shantanu (PR [16229](https://github.com/python/mypy/pull/16229)). New Rules for Re-exports Mypy no longer considers an import such as `import a.b as b` as an explicit re-export. The old behavior was arguably inconsistent and surprising. This may impact some stub packages, such as older versions of `types-six`. You can change the import to `from a import b as b`, if treating the import as a re-export was intentional. This change was contributed by Anders Kaseorg (PR [14086](https://github.com/python/mypy/pull/14086)). Improved Type Inference The new type inference algorithm that was recently introduced to mypy (but was not enabled by default) is now enabled by default. It improves type inference of calls to generic callables where an argument is also a generic callable, in particular. You can use `--old-type-inference` to disable the new behavior. The new algorithm can (rarely) produce different error messages, different error codes, or errors reported on different lines. This is more likely in cases where generic types were used incorrectly. The new type inference algorithm was contributed by Ivan Levkivskyi. PR [16345](https://github.com/python/mypy/pull/16345) enabled it by default. Narrowing Tuple Types Using len() Mypy now can narrow tuple types using `len()` checks. Example: python def f(t: tuple[int, int] | tuple[int, int, int]) -> None: if len(t) == 2: a, b = t Ok ... This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/python/mypy/pull/16237)). More Precise Tuple Lengths (Experimental) Mypy supports experimental, more precise checking of tuple type lengths through `--enable-incomplete-feature=PreciseTupleTypes`. Refer to the [documentation](https://mypy.readthedocs.io/en/latest/command_line.html#enabling-incomplete-experimental-features) for more information. More generally, we are planning to use `--enable-incomplete-feature` to introduce experimental features that would benefit from community feedback. This feature was contributed by Ivan Levkivskyi (PR [16237](https://github.com/python/mypy/pull/16237)). Mypy Changelog We now maintain a [changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) in the mypy Git repository. It mirrors the contents of [mypy release blog posts](https://mypy-lang.blogspot.com/). We will continue to also publish release blog posts. In the future, release blog posts will be created based on the changelog near a release date. This was contributed by Shantanu (PR [16280](https://github.com/python/mypy/pull/16280)). Mypy Daemon Improvements * Fix daemon crash caused by deleted submodule (Jukka Lehtosalo, PR [16370](https://github.com/python/mypy/pull/16370)) * Fix file reloading in dmypy with --export-types (Ivan Levkivskyi, PR [16359](https://github.com/python/mypy/pull/16359)) * Fix dmypy inspect on Windows (Ivan Levkivskyi, PR [16355](https://github.com/python/mypy/pull/16355)) * Fix dmypy inspect for namespace packages (Ivan Levkivskyi, PR [16357](https://github.com/python/mypy/pull/16357)) * Fix return type change to optional in generic function (Jukka Lehtosalo, PR [16342](https://github.com/python/mypy/pull/16342)) * Fix daemon false positives related to module-level `__getattr__` (Jukka Lehtosalo, PR [16292](https://github.com/python/mypy/pull/16292)) * Fix daemon crash related to ABCs (Jukka Lehtosalo, PR [16275](https://github.com/python/mypy/pull/16275)) * Stream dmypy output instead of dumping everything at the end (Valentin Stanciu, PR [16252](https://github.com/python/mypy/pull/16252)) * Make sure all dmypy errors are shown (Valentin Stanciu, PR [16250](https://github.com/python/mypy/pull/16250)) Mypyc Improvements * Generate error on duplicate function definitions (Jukka Lehtosalo, PR [16309](https://github.com/python/mypy/pull/16309)) * Don't crash on unreachable statements (Jukka Lehtosalo, PR [16311](https://github.com/python/mypy/pull/16311)) * Avoid cyclic reference in nested functions (Jukka Lehtosalo, PR [16268](https://github.com/python/mypy/pull/16268)) * Fix direct `__dict__` access on inner functions in new Python (Shantanu, PR [16084](https://github.com/python/mypy/pull/16084)) * Make tuple packing and unpacking more efficient (Jukka Lehtosalo, PR [16022](https://github.com/python/mypy/pull/16022)) Improvements to Error Reporting * Update starred expression error message to match CPython (Cibin Mathew, PR [16304](https://github.com/python/mypy/pull/16304)) * Fix error code of "Maybe you forgot to use await" note (Jelle Zijlstra, PR [16203](https://github.com/python/mypy/pull/16203)) * Use error code `[unsafe-overload]` for unsafe overloads, instead of `[misc]` (Randolf Scholz, PR [16061](https://github.com/python/mypy/pull/16061)) * Reword the error message related to void functions (Albert Tugushev, PR [15876](https://github.com/python/mypy/pull/15876)) * Represent bottom type as Never in messages (Shantanu, PR [15996](https://github.com/python/mypy/pull/15996)) * Add hint for AsyncIterator incompatible return type (Ilya Priven, PR [15883](https://github.com/python/mypy/pull/15883)) * Don't suggest stubs packages where the runtime package now ships with types (Alex Waygood, PR [16226](https://github.com/python/mypy/pull/16226)) Performance Improvements * Speed up type argument checking (Jukka Lehtosalo, PR [16353](https://github.com/python/mypy/pull/16353)) * Add fast path for checking self types (Jukka Lehtosalo, PR [16352](https://github.com/python/mypy/pull/16352)) * Cache information about whether file is typeshed file (Jukka Lehtosalo, PR [16351](https://github.com/python/mypy/pull/16351)) * Skip expensive `repr()` in logging call when not needed (Jukka Lehtosalo, PR [16350](https://github.com/python/mypy/pull/16350)) Attrs and Dataclass Improvements * `dataclass.replace`: Allow transformed classes (Ilya Priven, PR [15915](https://github.com/python/mypy/pull/15915)) * `dataclass.replace`: Fall through to typeshed signature (Ilya Priven, PR [15962](https://github.com/python/mypy/pull/15962)) * Document `dataclass_transform` behavior (Ilya Priven, PR [16017](https://github.com/python/mypy/pull/16017)) * `attrs`: Remove fields type check (Ilya Priven, PR [15983](https://github.com/python/mypy/pull/15983)) * `attrs`, `dataclasses`: Don't enforce slots when base class doesn't (Ilya Priven, PR [15976](https://github.com/python/mypy/pull/15976)) * Fix crash on dataclass field / property collision (Nikita Sobolev, PR [16147](https://github.com/python/mypy/pull/16147)) Stubgen Improvements * Write stubs with utf-8 encoding (Jørgen Lind, PR [16329](https://github.com/python/mypy/pull/16329)) * Fix missing property setter in semantic analysis mode (Ali Hamdan, PR [16303](https://github.com/python/mypy/pull/16303)) * Unify C extension and pure python stub generators with object oriented design (Chad Dombrova, PR [15770](https://github.com/python/mypy/pull/15770)) * Multiple fixes to the generated imports (Ali Hamdan, PR [15624](https://github.com/python/mypy/pull/15624)) * Generate valid dataclass stubs (Ali Hamdan, PR [15625](https://github.com/python/mypy/pull/15625)) Fixes to Crashes * Fix incremental mode crash on TypedDict in method (Ivan Levkivskyi, PR [16364](https://github.com/python/mypy/pull/16364)) * Fix crash on star unpack in TypedDict (Ivan Levkivskyi, PR [16116](https://github.com/python/mypy/pull/16116)) * Fix crash on malformed TypedDict in incremental mode (Ivan Levkivskyi, PR [16115](https://github.com/python/mypy/pull/16115)) * Fix crash with report generation on namespace packages (Shantanu, PR [16019](https://github.com/python/mypy/pull/16019)) * Fix crash when parsing error code config with typo (Shantanu, PR [16005](https://github.com/python/mypy/pull/16005)) * Fix `__post_init__()` internal error (Ilya Priven, PR [16080](https://github.com/python/mypy/pull/16080)) Documentation Updates * Make it easier to copy commands from README (Hamir Mahal, PR [16133](https://github.com/python/mypy/pull/16133)) * Document and rename `[overload-overlap]` error code (Shantanu, PR [16074](https://github.com/python/mypy/pull/16074)) * Document `--force-uppercase-builtins` and `--force-union-syntax` (Nikita Sobolev, PR [16049](https://github.com/python/mypy/pull/16049)) * Document `force_union_syntax` and `force_uppercase_builtins` (Nikita Sobolev, PR [16048](https://github.com/python/mypy/pull/16048)) * Document we're not tracking relationships between symbols (Ilya Priven, PR [16018](https://github.com/python/mypy/pull/16018)) Other Notable Changes and Fixes * Propagate narrowed types to lambda expressions (Ivan Levkivskyi, PR [16407](https://github.com/python/mypy/pull/16407)) * Avoid importing from `setuptools._distutils` (Shantanu, PR [16348](https://github.com/python/mypy/pull/16348)) * Delete recursive aliases flags (Ivan Levkivskyi, PR [16346](https://github.com/python/mypy/pull/16346)) * Properly use proper subtyping for callables (Ivan Levkivskyi, PR [16343](https://github.com/python/mypy/pull/16343)) * Use upper bound as inference fallback more consistently (Ivan Levkivskyi, PR [16344](https://github.com/python/mypy/pull/16344)) * Add `[unimported-reveal]` error code (Nikita Sobolev, PR [16271](https://github.com/python/mypy/pull/16271)) * Add `|=` and `|` operators support for `TypedDict` (Nikita Sobolev, PR [16249](https://github.com/python/mypy/pull/16249)) * Clarify variance convention for Parameters (Ivan Levkivskyi, PR [16302](https://github.com/python/mypy/pull/16302)) * Correctly recognize `typing_extensions.NewType` (Ganden Schaffner, PR [16298](https://github.com/python/mypy/pull/16298)) * Fix partially defined in the case of missing type maps (Shantanu, PR [15995](https://github.com/python/mypy/pull/15995)) * Use SPDX license identifier (Nikita Sobolev, PR [16230](https://github.com/python/mypy/pull/16230)) * Make `__qualname__` and `__module__` available in class bodies (Anthony Sottile, PR [16215](https://github.com/python/mypy/pull/16215)) * stubtest: Hint when args in stub need to be keyword-