unstale

pypi / astroid

astroid

What changed in astroid 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.

1 breaking16 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.6 on npm

astroid 417 changes

Breaking changes 1

  • A function whose body is only ... is inferred to return Uninferable instead of None, matching a function whose body is only pass.

    4.3.4release notes

Fixes and other changes 16

  • No longer raises IndexError when a keyword-only argument repeats the name of *args or **kwargs.

    4.3.4release notes

  • ValueError during comparison inference is caught and returns Uninferable instead of raising an uncaught exception.

    4.3.4release notes

  • Introspecting a live class that exposes itself or a sibling class as one of its own attributes no longer loops infinitely.

    4.3.4release notes

  • Building a module from a live object that holds a container containing itself no longer raises RecursionError.

    4.3.4release notes

  • Inferring random.sample() on a sequence whose elements are inferred as Instance no longer crashes with TypeError.

    4.3.4release notes

  • Fixes a TypeError when __class_getitem__ is uninferable.

    4.3.3release notes

  • Inferred concatenations preserve their length when an element has multiple possible values; ambiguous or uninferable elements are represented as unknown instead of expanded into multiple items.

    4.3.3release notes

  • Fixes an AssertionError when inferring Class.__bases__, which previously returned a parentless Tuple.

    4.3.3release notes

  • An exception instance's args attribute is inferred as a tuple instance of unknown contents rather than a known empty tuple, so unpacking no longer looks unbalanced.

    4.3.2release notes

  • Returns None instead of raising AttributeError for a class whose PEP 695 type parameter is literally named __slots__.

    4.3.2release notes

  • Inference falls back to its default instead of crashing when a type name or field name contains str.format markup.

    4.3.2release notes

  • Inference of an f-string or str.format call with an out-of-range c format-spec code point now yields Uninferable instead of crashing.

    4.3.2release notes

  • Inference falls back to its default instead of crashing when a type name or field name contains str.format markup.

    4.3.2release notes

  • Functional NewType names that are not identifiers are assigned verbatim to the synthesized class, rather than spliced into its source.

    4.3.2release notes

  • Raises InferenceError instead of crashing with IndexError when called without a positional metaclass argument, during module building and call inference.

    4.3.2release notes

  • Functional TypeVar names that are not identifiers are assigned verbatim to the synthesized class, rather than spliced into its source.

    4.3.2release notes