release_notes/release-notes-v1.3.0-dev.1.md
Release date: August 06, 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.3.0-dev.1 bundles 162 commits from 23 contributors.
Protocol as an instance of _ProtocolMeta in type checks, and Pyrefly correctly models Protocol using typeshed's _ProtocolMeta, making it assignable to ABCMeta.Sequence or other abstract base classes now correctly report when abstract methods remain unimplemented, even when the class doesn't directly extend ABC.type[type[X]] now uses the metaclass for more precise results instead of triggering internal errors.Any now preserve dynamic attribute access instead of converting to object, fixing false missing-attribute errors.list[T]() where T is unbound) now emit errors at the call site.metaclass=type declarations are now allowed.import statements automatically.Unknown as typing.Any to produce valid Python source.from foo import X style imports by default when possible, falling back to import foo only when the module is already imported that way.case _ wildcard now resolves to the match subject expression's type, not just the first token of the subject.**kwargs: Unpack[TypedDict] parameters, exposing each TypedDict field as a completable keyword argument.__call__ signature.__new__ to a callable, fixing constructor argument inference.df.with_columns(...) now infers each added or overwritten column's dtype from its Polars expression instead of leaving it Unknown.df.select(...) produces a precise column schema when its arguments are Polars expressions, not only plain column-name strings.df.group_by(...).agg(...) calls now infer a precise column schema, including grouping keys and aggregation outputs.pl.Series("a", [1]) now reveals Series[Int64] instead of the opaque Series class, carrying element dtypes forward.df.get_column(name) and df.to_series(index) now return typed Series[dtype] instead of an opaque Series.schema= whose column set doesn't match the data now report a clear column-schema-mismatch error.Final or Literal[str]) instead of requiring bare literals.TypedDict-typed value now infer columns from the TypedDict fields.df.lazy() and df.collect() now preserve the column schema across the conversion.pl.DataFrame[Schema] annotations now read the schema class's columns, so annotated parameters carry their schema into the function body.pl.read_csv and pl.scan_csv with inline schema= dictionaries now infer complete CSV schemas, and reader options like projections and overrides are applied.df.fill_null now models integer and float widening according to Polars runtime behavior.df[[]] (empty list subscript) now preserves the original schema instead of producing an empty schema.duplicate-column error.columns= now project the data onto the given column set and order.ForeignKey, with the default <source>_set attribute or a custom related_name.OneToOneField relationships now expose the source model directly on the reverse side.ManyToManyField relationships now add a manager with the correct model type.related_name placeholders (class and app-label) are filled in, and disabled or malformed names create no attribute.dataclass_transform now rejects unsupported keyword parameters, as required by the typing specification.mock.patch string targets are now validated, reporting missing imports or attributes at the string literal location.mock.patch targets are reported as warnings under a new missing-attribute-patch-target error kind.# character, ensuring a valid UTF-8 boundary even after multibyte characters.ALL_CAPS variables as Final by enabling the treat-all-caps-as-final configuration option, which reports reassignment errors.--typeshed-path option now works correctly when checking typeshed's own stubs, deriving module names from <typeshed_path>/stdlib.We closed 14 bug issues this release 👏
__getattr__ or __getattribute__ were incorrectly rejected in protocol subtyping. Pyrefly now allows these fallback methods to satisfy protocol members, with special handling for class objects and certain dunders.Sequence or other abstract base classes now correctly report unimplemented abstract methods, even when the class doesn't directly extend ABC.__new__ method. Pyrefly now detects direct recursive __new__ targets.Key Anon already exists) when a NamedTuple was defined inline inside a match statement. A dedicated MatchSubject binding key now prevents collisions.raise inside a context manager that returns True from __exit__ no longer incorrectly narrows the type.classproperty or cached_classproperty had no type arguments. The match arm now checks for type arguments before unwrapping.A and True) no longer introduce placeholder narrowing operations, preserving the original narrowing behavior.# type: ignore comments. Unused-ignore diagnostics now underline the ASCII # character.__call__ signature.@total_ordering now recognizes non-synthesized rich comparison methods inherited through the class MRO, fixing false positives when __lt__ is defined in a base class.Type once up front, collapsing shared subtrees.Any now preserve dynamic attribute access instead of converting to object, fixing false missing-attribute errors.__new__ to a callable, fixing constructor argument inference.And more! #4430, #4417, #4387, #4315, #3678, #3334, #4380, #2313, #1130, #4388, #4386, #4390, #4399, #4443, #4455, #4457, #4464, #4447, #4436, #4441, #4442, #4451, #4452, #4456, #4458, #4460, #317, #1576, #4331, #4304, #4393, #4361
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.3.0-dev.1
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.
@shobhitmehro, @rchen152, @asukaminato0721, generatedunixname2066905484085733, @yangdanny97, @grievejia, @kinto0, generatedunixname949130641157030, @lyydsheep, @ndmitchell, @stroxler, generatedunixname89002005232357, @connernilsen, @jcarreiro, @patrickswedish, @randolf-scholz, @vincevannoort, @renz011tzar, @ak4-sh, @tobyh-canva, @KotlinIsland, @Sanjays2402, @alexander-beedie
Please note: These release notes summarize major updates and features. For brevity, not all individual commits are listed.