github facebook/pyrefly 0.33.0
Pyrefly v0.33.0

10 hours ago

Status : ALPHA
Release date: 15 September 2025

Pyrefly v0.33.0 bundles 117 commits from 21 contributors


✨ New & Improved

Area What’s new
Type Checker Behavior - Pyrefly now distinguishes between Any as a value and as a type, preventing incorrect attribute access and constructor calls on Any values. For example, when Any (the value) is used as an attribute base or call target pyrefly will now error if you try to access attributes that are not defined on type.
- Basic support added for TypeAliasType
Experimental support for Pydantic now available!
- Type error messages by default now print paths relative to working directory (as opposed to absolute path)
IDE improvements - Kwarg completion now supports literals and unions of literals (requested feature)
- A new "typeServer/getSupportedProtocol" request handler included to fetch TSP version information
Website and Documentation - The sandbox feature on the website has been upgraded! It can now deal with multiple files, allowing users to try out Pyrefly with cross-file imports. Give it a go here!
- New documentation guide on experimental Pydantic support, read it here
- New editable installs section in documentation, detailing the nuances of working with editable dependencies. Read it here.

🐛 Bug fixes

We closed 4 bug issues this release 👏

  • #1052 - regression that caused issue with return type list[Self]
  • #1034 - Python version dropdown in website sandbox not working properly
  • #817 - bad-override error split into 2 separate error codes for type and name differences in arguments
  • #573 - when a package is pip-installed as editable from a local directory as a dependency, it was added in a way that Pyrefly didn’t recognise

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==0.33.0

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 [Pyefly documentation](https://pyrefly.org/en/docs/error-suppressions/)


🖊️ Contributors this release

@javabster, @stroxler, @grievejia, @ndmitchell, @fangyi-zhou, @samwgoldman, @rchen152, @kinto0, @connernilsen, @AryanBagade, Brian Rosenfeld, Carlos Fernandez, @yangdanny97, @hashiranhar, @IDrokin117, @maggiemoss, @rchiodo, @VladimirMakaev, @migeed-z

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.