release_notes/release-notes-v1.2.0-dev.3.md
Release date: July 24, 2026
About dev releases Dev releases (versions like
X.Y.Z-dev.N) are non-stable snapshots cut periodically from trunk. They give early adopters a chance to try in-progress features and surface issues before the next stable release, but they don't carry the same stability or compatibility guarantees as a stable release — don't pin production projects to a dev version.
Pyrefly v1.2.0-dev.3 bundles 250 commits from 29 contributors.
__required_keys__ and __optional_keys__ attributes during attribute lookup, so protocols requiring these attributes (like those in langgraph) work correctly.@<field>.converter decorator (added in attrs 26.2.0) to define converters, and the converter's input type is correctly used for the __init__ parameter.attrs.converters.pipe now types the __init__ parameter as the first converter's input type instead of Any, so invalid constructor arguments are caught.attrs.converters.default_if_none now types the __init__ parameter as <field type> | None instead of Any, matching the converter's runtime behavior.copy.deepcopy) now solve their type variables against the field's declared type, so the __init__ parameter is correctly typed.converter=tuple on a Sequence[int] field types the parameter as Iterable[int]..select(), .drop(), .rename(), and .with_columns() operations now preserve and transform the DataFrame schema, keeping column information through method chains..filter(), .sort(), and .fill_null() operations now preserve the DataFrame schema unchanged, since they only affect rows.... in display), so known columns are type-checked while avoiding false positives from dynamic column operations.functools.partial now type-checks bound arguments and synthesizes a precise residual signature for the remaining parameters, catching errors at construction and call sites.functools.partial over generic functions now preserves type variables, so bound arguments can solve them and the residual stays generic.functools.partial over overloaded functions now resolves to the matching overload branches, so later calls still benefit from overload resolution.functools.partial over class constructors and bound methods now works correctly, checking arguments and producing the expected instance type.functools.partial results now expose .func, .args, and .keywords attributes and narrow correctly in isinstance checks.functools.partial over **Unpack[TypedDict] splats now expands the TypedDict fields and checks the residual parameters correctly..value on an enum type (not a specific member) now infers as the union of member literal values instead of widening to the mixin type.__match_args__ at solve time.isinstance checks on facets (like tuple elements or union members) now filter the parent union to matching members.# pyrefly: ignore-errors directives (placed after code) now emit a misplaced-ignore warning pointing users to move them to the top.import x as y, from x import y as z) are now classified as definition contexts, so completions don't suggest module paths for them.from model import MyModel as MyModelAlias statements.and/or operators now returns the enclosing boolean expression range for better context.__init__.textDocument/selectionRange) now follow AST nesting from expression to statement to scope to document, with support for #region/#endregion markers.#region/#endregion folding markers are now recognized (including nested regions and spaced # region), independently of comment-section folding.getComputedType, getDeclaredType, getExpectedType) now resolve correctly for files that aren't open in the editor.pyrefly.*) are now ignored when running as a type server (TSP mode), so stale extension settings don't interfere with Pylance.unknown-column error kind flags reads of DataFrame columns that don't exist in the known schema.column-type-mismatch error kind flags Polars column literals whose elements cannot share one dtype.implicit-reexport error kind (default: ignore) flags imports of names that are only available through plain import/from ... import (not explicit re-exports).invalid-type-checking-constant error kind flags user-defined TYPE_CHECKING constants that aren't assignable to bool.missing-super-call error kind (default: ignore) flags __init__, __new__, or __init_subclass__ methods that override a non-object parent without calling the parent method.empty-body error kind (default: ignore) flags ellipsis-only function bodies where None isn't assignable to the annotated return type.unused-call-result error kind (default: ignore) flags discarded function/method call results whose type is informative (not None, Any, or Never).invalid-abstract-method error kind (default: ignore) flags @abstractmethod decorators in non-abstract classes.full-text-with-github output format now emits readable diagnostics followed by GitHub workflow commands, so source locations remain visible in raw logs.DataFrame construction from dictionary literals now infers a complete schema with column names and types.df[["a", "b"]]) now narrow the schema to the selected columns in the requested order..select() narrows the schema to the named columns in the order given..drop() narrows the schema by removing the named columns while preserving the original order..rename() relabels columns in the schema, handling swaps correctly and falling back on ambiguous cases..with_columns() adds or overwrites columns in the schema, appending new names and preserving untouched columns."*" and regex patterns) are now recognized, so .select("*") and .drop("^col.*$") fall back instead of erroring.pyrefly coverage check --public-only now keeps public re-exports from excluded files, so symbols are only excluded when all public re-export locations are excluded.pyrefly coverage commands now accept a [coverage] config table with includes and excludes that override project globs, so coverage can be measured on a different file set.pyrefly coverage check --fail-under now always prints findings regardless of whether the threshold is met, so users see what's missing even when passing.pyrefly coverage now excludes privately-named classes (like _Foo) unless exported via __all__, consistent with other symbol kinds.[tool.pyrefly] section are now only considered root markers, so pyproject.toml files don't shadow parent configs unless they contain Pyrefly settings.--project-excludes flag now takes precedence over coverage.excludes, and positional FILES... args also override coverage globs.fallback_search_path, so __unknown__ files count under --public-only.We closed 48 bug issues this release 👏
bad-override error when a child class generic over a TypeVarTuple overrides a parent method with the same *args: *Ts signature.__required_keys__ and __optional_keys__ attributes, so protocols requiring these attributes (like those in langgraph) no longer fail structural checks.import json).@NNN variables from leaking into tooltips.enumerate() over tuple literals now preserves element types instead of widening to a generic tuple, so for i, x in enumerate(("a", "b")) types x as Literal["a"] | Literal["b"].#region/#endregion folding markers are now recognized (including nested regions and spaced # region), independently of comment-section folding.copy.deepcopy) now solve their type variables against the field's declared type, so the __init__ parameter is correctly typed instead of leaking a bare TypeVar.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.
pip install --upgrade pyrefly==1.2.0-dev.3
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:
pyrefly check --suppress-errorspyrefly check --remove-unused-ignoresThis 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.
@stroxler, @shobhitmehro, generatedunixname2066905484085733, @yangdanny97, @asukaminato0721, @kinto0, @anushamukka-dev, @samwgoldman, @rchen152, @NathanTempest, @jorenham, @aodihis, @tobyh-canva, @brosenfeld, @nitishagar, @goutamadwant, @grievejia, @roian6, @paranoa233, @kz357, @teerthsharma, generatedunixname949130641157030, @coclique, @SarahMKosowsky, @markselby9, @oprypin, @knQzx, @alexander-beedie, @ak4-sh
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.