github pyrefly-org/pyrefly 1.5.2
Pyrefly v1.5.2

48 minutes ago

Release date: December 2, 2026

Pyrefly v1.5.2 is a patch release that restores the optimized builds that v1.5.1 shipped without, and fixes two false positives that are new in v1.5.0.


⚡ Performance

  • The v1.5.1 executables were built without profile-guided optimization (PGO) and BOLT, because the release workflow skipped them when a version bump triggered the release. In our measurements on Linux, v1.5.1 type checks 10–20% slower than v1.5.0. v1.5.2 is built with them again.

🐛 Bug fixes

  • Accessing an attribute of a functools.cached_property through its class, such as C.foo.func or C.foo.attrname, no longer reports a false missing-attribute error. A common case is a subclass that overrides a cached_property with a property and calls Base.foo.func(self).
  • Calling model_construct on a pydantic model no longer requires every field without a default. model_construct skips validation and sets only the fields you pass, so a partial call such as Model.model_construct(x=1) no longer reports missing-argument. Pyrefly still checks the types of the values you pass.

Thank-you to all our contributors who found these bugs and reported them! Did you know this is one of the most helpful contributions you can make to an open-source project? If you find any bugs in Pyrefly we want to know about them! Please open a bug report issue here.


📦 Upgrade

pip install --upgrade pyrefly==1.5.2

How to safely upgrade your codebase

Upgrading the version of Pyrefly you're using or a third-party library you depend on can reveal new type errors in your code. Fixing them all at once is often unrealistic. We've written scripts to help you temporarily silence them. After upgrading, follow these steps:

  1. pyrefly check --suppress-errors
  2. Run your code formatter of choice
  3. pyrefly check --remove-unused-ignores
  4. Repeat until you achieve a clean formatting run and a clean type check.

This will add # pyrefly: ignore comments to your code, enabling you to silence errors and return to fix them later. This can make the process of upgrading a large codebase much more manageable.

Read more about error suppressions in the Pyrefly documentation.

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.