Skip to content

chore(deps): update dependency mypy to v1.19.1#27

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/mypy-1.x-lockfile
Open

chore(deps): update dependency mypy to v1.19.1#27
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/mypy-1.x-lockfile

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jul 31, 2024

This PR contains the following updates:

Package Change Age Confidence
mypy (changelog) 1.11.01.19.1 age confidence

Release Notes

python/mypy (mypy)

v1.19.1

Compare Source

  • Fix noncommutative joins with bounded TypeVars (Shantanu, PR 20345)
  • Respect output format for cached runs by serializing raw errors in cache metas (Ivan Levkivskyi, PR 20372)
  • Allow types.NoneType in match cases (A5rocks, PR 20383)
  • Fix mypyc generator regression with empty tuple (BobTheBuidler, PR 20371)
  • Fix crash involving Unpack-ed TypeVarTuple (Shantanu, PR 20323)
  • Fix crash on star import of redefinition (Ivan Levkivskyi, PR 20333)
  • Fix crash on typevar with forward ref used in other module (Ivan Levkivskyi, PR 20334)
  • Fail with an explicit error on PyPy (Ivan Levkivskyi, PR 20389)

v1.19.0

Compare Source

v1.18.2

Compare Source

  • Fix crash on recursive alias (Ivan Levkivskyi, PR 19845)
  • Add additional guidance for stubtest errors when runtime is object.__init__ (Stephen Morton, PR 19733)
  • Fix handling of None values in f-string expressions in mypyc (BobTheBuidler, PR 19846)

v1.18.1

Compare Source

We’ve just uploaded mypy 1.18.1 to the Python Package Index (PyPI).
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.

Mypy Performance Improvements

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

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

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

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

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

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

This feature was contributed by Ivan Levkivskyi (PR 19668, 19735, 19750, 19681, 19752, 19815).

Flexible Variable Definitions: Update

Mypy 1.16.0 introduced --allow-redefinition-new, which allows redefining variables
with different types, and inferring union types for variables from multiple assignments.
The feature is now documented in the --help output, but the feature is still experimental.

We are planning to enable this by default in mypy 2.0, and we will also deprecate the
older --allow-redefinition flag. Since the new behavior differs significantly from
the older flag, we encourage users of --allow-redefinition to experiment with
--allow-redefinition-new and create a GitHub issue if the new functionality doesn't
support some important use cases.

This feature was contributed by Jukka Lehtosalo.

Inferred Type for Bare ClassVar

A ClassVar without an explicit type annotation now causes the type of the variable
to be inferred from the initializer:

from typing import ClassVar

class Item:

### Type of 'next_id' is now 'int' (it was 'Any')
    next_id: ClassVar = 1

    ...

This feature was contributed by Ivan Levkivskyi (PR 19573).

Disjoint Base Classes (@​disjoint_base, PEP 800)

Mypy now understands disjoint bases (PEP 800): it recognizes the @disjoint_base
decorator, and rejects class definitions that combine mutually incompatible base classes,
and takes advantage of the fact that such classes cannot exist in reachability and
narrowing logic.

This class definition will now generate an error:

v1.17.1

Compare Source

  • Retain None as constraints bottom if no bottoms were provided (Stanislav Terliakov, PR 19485)
  • Fix "ignored exception in hasattr" in dmypy (Stanislav Terliakov, PR 19428)
  • Prevent a crash when InitVar is redefined with a method in a subclass (Stanislav Terliakov, PR 19453)

v1.17.0

Compare Source

v1.16.1

Compare Source

v1.16.0

Compare Source

v1.15.0

Compare Source

v1.14.1

Compare Source

v1.14.0

Compare Source

v1.13.0

Compare Source

v1.12.1

Compare Source

  • Fix crash when showing partially analyzed type in error message (Ivan Levkivskyi, PR 17961)
  • Fix iteration over union (when self type is involved) (Shantanu, PR 17976)
  • Fix type object with type var default in union context (Jukka Lehtosalo, PR 17991)
  • Revert change to os.path stubs affecting use of os.PathLike[Any] (Shantanu, PR 17995)

v1.12.0

Compare Source

v1.11.2

Compare Source

  • Alternative fix for a union-like literal string (Ivan Levkivskyi, PR 17639)
  • Unwrap TypedDict item types before storing (Ivan Levkivskyi, PR 17640)

v1.11.1

Compare Source

  • Fix RawExpressionType.accept crash with --cache-fine-grained (Anders Kaseorg, PR 17588)
  • Fix PEP 604 isinstance caching (Shantanu, PR 17563)
  • Fix typing.TypeAliasType being undefined on python < 3.12 (Nikita Sobolev, PR 17558)
  • Fix types.GenericAlias lookup crash (Shantanu, PR 17543)

Configuration

📅 Schedule: Branch creation - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added the 🎲 dependencies Working on dependencies label Jul 31, 2024
@renovate renovate bot requested a review from billsioros as a code owner July 31, 2024 02:34
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.11.1 chore(deps): update dependency mypy to v1.11.2 Aug 25, 2024
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 34d4423 to da79265 Compare August 25, 2024 20:50
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.11.2 chore(deps): update dependency mypy to v1.12.0 Oct 14, 2024
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch 2 times, most recently from f4da712 to 66c9fb8 Compare October 20, 2024 06:02
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.12.0 chore(deps): update dependency mypy to v1.12.1 Oct 20, 2024
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 66c9fb8 to 3ad16e3 Compare October 23, 2024 02:18
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.12.1 chore(deps): update dependency mypy to v1.13.0 Oct 23, 2024
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.13.0 chore(deps): update dependency mypy to v1.14.0 Dec 21, 2024
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 3ad16e3 to 0e7634a Compare December 21, 2024 11:34
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.14.0 chore(deps): update dependency mypy to v1.14.1 Dec 31, 2024
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 0e7634a to 0982606 Compare December 31, 2024 05:38
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.14.1 chore(deps): update dependency mypy to v1.15.0 Feb 6, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 0982606 to a3436cf Compare February 6, 2025 07:52
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.15.0 chore(deps): update dependency mypy to v1.16.0 Jun 1, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from a3436cf to a20347c Compare June 1, 2025 04:08
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.16.0 chore(deps): update dependency mypy to v1.16.1 Jun 16, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from a20347c to ff5ae77 Compare June 16, 2025 18:09
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from ff5ae77 to a3c9804 Compare July 21, 2025 18:33
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.16.1 chore(deps): update dependency mypy to v1.17.0 Jul 21, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from a3c9804 to f76573d Compare August 4, 2025 18:52
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.17.0 chore(deps): update dependency mypy to v1.17.1 Aug 4, 2025
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.17.1 chore(deps): update dependency mypy to v1.18.1 Sep 14, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch 2 times, most recently from 19d6402 to c34dafc Compare September 19, 2025 12:10
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.18.1 chore(deps): update dependency mypy to v1.18.2 Sep 19, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from c34dafc to 28a57ee Compare November 29, 2025 12:07
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.18.2 chore(deps): update dependency mypy to v1.19.0 Nov 29, 2025
@renovate renovate bot changed the title chore(deps): update dependency mypy to v1.19.0 chore(deps): update dependency mypy to v1.19.1 Dec 15, 2025
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 28a57ee to 499ef8f Compare December 15, 2025 19:00
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from 499ef8f to ad6ecba Compare January 28, 2026 23:53
@renovate renovate bot force-pushed the renovate/mypy-1.x-lockfile branch from ad6ecba to b378d63 Compare February 12, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🎲 dependencies Working on dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants