What's New in astroid 4.1.2?
Release date: 2026-03-22
-
Fix crash accessing property
fsetin generic classes with type annotations.
Closes #2996 -
Fix infinite recursion caused by cyclic inference in
Constraint. -
Fix
RecursionErrorin_compute_mro()when circular class hierarchies
are created through runtime name rebinding. Circular bases are now resolved
to the original class instead of recursing.Closes #2967
Closes pylint-dev/pylint#10821 -
Fix
DuplicateBasesErrorcrash in dataclass transform when a class has
duplicate bases in its MRO (e.g.,Protocolappearing both directly and
indirectly). CatchMroErrorat.mro()call sites in
brain_dataclasses.py, consistent with the existing pattern elsewhere.Closes #2628
-
Fix
FunctionModelreturning descriptor attributes for builtin functions.Closes #2743
-
Catch
MemoryErrorwhen inferring f-strings with extremely large format
widths (e.g.f'{0:11111111111}') so that inference yieldsUninferable
instead of crashing.Closes #2762
-
Fix
ValueErrorin__str__/reprand error messages when nodes have
extreme values (very long identifiers or large integers). Clamp pprint width
to a minimum of 1 and truncate oversized values in error messages.Closes #2764