github facebook/pyrefly 0.46.0
Pyrefly v0.46.0

one day ago

Status : BETA
Release date: December 15, 2025

Pyrefly v0.46.0 bundles 125 commits from 19 contributors.


✨ New & Improved

Area What’s new
Language Server - Call Hierarchy support for the Pyrefly LSP server now implemented. This is a fundamental IDE feature that allows users to explore function call relationships in your IDE.

- Function documentation now available in signature help

- Signature help now uses single-line labels, thereby maintaining compatibility with editors that don't support multi-line labels while still keeping hover tooltips readable

- Variables defined in ALL_CAPS are now correctly highlighted as constants in VSCode and the website sandbox.
Type Checking Implemented PEP 765 warnings. The checker now warns if return, break, or continue statements directly exit a finally block. Starting in Python 3.14, these statements emit a SyntaxWarning because they can silently mask exceptions.
Third Party Library Support - Added third-party stubs for scipy, matplotlib, scikit-learn, scikit-image, vispy, sympy, pandas, conan, botocore, and boto3 to the Pyrefly bundle for better out-of-the-box support for these libraries.

- Support for Pydantic “lax mode”. Pyrefly can now model Pydantic’s lax runtime behavior more precisely. As a result, you may see new inferred types such as LaxInt and LaxBool in your IDE, representing the unions of input types that Pydantic accepts at runtime.
Errors / Debugging Debug symbols are now included in release builds, enabling users to generate usable stack traces in crash reports

🐛 bug fixes

We closed 14 bug issues this release 👏

  • #1826 - Fixed panic/crash caused by capacity overflow with large tuple expansion.
  • #1809 - Fixed __future__ imports being incorrectly flagged as unused, as they have necessary module-level side effects.
  • #1794 - Fixed a panic/crash when a text range calculation exceeded the document buffer size limit.
  • #1418 - Fixed function hover popups (especially in numpy) missing the function name in the header when resolving from stub files.
  • #1289 -Fixed special casing for numba jit decorators (corrected path handling).
  • And more: #1348, #1214, #820, #253, #1667, #1787, #1799, #1821, #1709

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==v0.46.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

🖊️ Contributors this release

@javabster, @AryanBagade, @asukaminato0721, @connernilsen, @DanielNoord, @yangdanny97, @dearfl, @fangyi-zhou, Jack, @jvansch1, @kinto0, Liam, @arthaud, @rchen152, @samwgoldman, @stroxler, @tianhan0, @migeed-z

Don't miss a new pyrefly release

NewReleases is sending notifications on new releases.