Skip to content

Releases: pylint-dev/astroid

v4.1.1

23 Feb 02:35

Choose a tag to compare

What's New in astroid 4.1.1?

Release date: 2026-02-22

  • Let UnboundMethodModel inherit from FunctionModel to improve inference of
    dunder methods for unbound methods.

    Refs #2741

  • Filter Unknown from UnboundMethod and Super special attribute
    lookup to prevent placeholder nodes from leaking during inference.

    Refs #2741

v4.1.0

09 Feb 02:19

Choose a tag to compare

What's New in astroid 4.1.0?

Release date: 2026-02-08

  • Add support for equality constraints (==, !=) in inference.
    Closes pylint-dev/pylint#3632
    Closes pylint-dev/pylint#3633

  • Ensure ast.JoinedStr nodes are Uninferable when the ast.FormattedValue is
    Uninferable. This prevents unexpected-keyword-arg messages in Pylint
    where the Uninferable string appeared in function arguments that were
    constructed dynamically.

    Closes pylint-dev/pylint#10822

  • Add support for type constraints (isinstance(x, y)) in inference.

    Closes pylint-dev/pylint#1162
    Closes pylint-dev/pylint#4635
    Closes pylint-dev/pylint#10469

  • Make type.__new__() raise clear errors instead of returning None

  • Move object dunder methods from FunctionModel to ObjectModel to make them
    available on all object types, not just functions.

    Closes #2742
    Closes #2741
    Closes pylint-dev/pylint#6094

  • lineno and end_lineno are now available on Arguments.

  • Add helper to iterate over all annotations nodes of function arguments,
    Arguments.get_annotations().

    Refs #2860

  • Skip direct parent when determining the Decorator frame.

    Refs pylint-dev/pylint#8425

  • Add simple command line interface for astroid to output generated AST.
    Use with python -m astroid.

  • Fix incorrect type inference for super().method() calls that return Self.
    Previously, astroid would infer the parent class type instead of the child class type,
    causing pylint E1101 false positives in method chaining scenarios.

    Closes #457

  • Add missing dtype and casting parameters to numpy.concatenate brain.

    Closes #2870

  • Fix ability to detect .py modules inside PATH directories on Windows
    described by a UNC path with a trailing backslash (\)

    • Example: modutils.modpath_from_file(filename=r"\Mac\Code\tests\test_resources.py", path=["\mac\code"]) == ['tests', 'test_resources']
  • Fix random.sample inference crash when sequence contains uninferable elements.

    Closes #2518

  • Fix random.sample crash when cloning ClassDef or FunctionDef nodes.

    Closes #2923

v4.0.4

07 Feb 23:34

Choose a tag to compare

What's New in astroid 4.0.4?

Release date: 2026-02-07

  • Fix is_namespace() crash when search locations contain pathlib.Path objects.

    Closes #2942

v4.0.3

03 Jan 22:13

Choose a tag to compare

What's New in astroid 4.0.3?

Release date: 2026-01-03

  • Fix inference of IfExp (ternary expression) nodes to avoid prematurely narrowing
    results in the face of inference ambiguity.

    Closes #2899

  • Fix base class inference for dataclasses using the PEP 695 typing syntax.

    Refs pylint-dev/pylint#10788

v4.0.2

09 Nov 21:20

Choose a tag to compare

What's New in astroid 4.0.2?

Release date: 2025-11-09

  • Handle FunctionDef blockstart_tolineno edge cases correctly.

    Refs #2880

  • Add HTTPMethod enum support to brain module for Python 3.11+.

    Refs pylint-dev/pylint#10624
    Closes #2877

v4.0.1

11 Oct 15:14
9f17568

Choose a tag to compare

What's New in astroid 4.0.1?

Release date: 2025-10-11

  • Suppress SyntaxWarning for invalid escape sequences and return in finally on
    Python 3.14 when parsing modules.

  • Assign Import and ImportFrom nodes to module locals if used with global.

    Closes pylint-dev/pylint#10632

v4.0.0

05 Oct 15:36

Choose a tag to compare

What's New in astroid 4.0.0?

Release date: 2025-10-05

  • Support constraints from ternary expressions in inference.

    Closes pylint-dev/pylint#9729

  • Handle deprecated bool(NotImplemented) cast in const nodes.

  • Add support for boolean truthiness constraints (x, not x) in inference.

    Closes pylint-dev/pylint#9515

  • Fix false positive invalid-name on attrs classes with ClassVar annotated variables.

    Closes pylint-dev/pylint#10525

  • Prevent crash when parsing deeply nested parentheses causing MemoryError in python's built-in ast.

    Closes #2643

  • Fix crash when inferring namedtuple with invalid field name looking like f-string formatting.

    Closes #2519

  • Fix false positive no-member in except * handler.

    Closes pylint-dev/pylint#9056

  • Fix crash when comparing invalid dict literal

    Closes #2522

  • Removed internal functions infer_numpy_member, name_looks_like_numpy_member, and
    attribute_looks_like_numpy_member from astroid.brain.brain_numpy_utils.

  • To alleviate circular imports, the manager argument to AstroidBuilder() is now required.

  • Constants now have a parent of nodes.SYNTHETIC_ROOT.

  • Fix crashes with large positive and negative list multipliers.

    Closes #2521
    Closes #2523

  • Fix precedence of path arg in modpath_from_file_with_callback to be higher than sys.path

  • Following a deprecation period, the future argument was removed from statement() and frame().

  • Improve consistency of JoinedStr inference by not raising InferenceError and
    returning either Uninferable or a fully resolved Const.

    Closes #2621

  • Fix crash when typing._alias() call is missing arguments.

    Closes #2513

  • Remove support for Python 3.9 (and constant PY310_PLUS).

  • Include subclasses of standard property classes as property decorators

    Closes #10377

  • Modify astroid.bases and tests.test_nodes to reflect that enum.property was added in Python 3.11, not 3.10

  • Fix incorrect result in _get_relative_base_path when the target directory name starts with the base path

    Closes #2608

  • The brain for nose was dropped. nose has been deprecated for 10 years and the brain required some maintenance.

    Refs #2765

  • Fix a crash when the root of a node is not a module but is unknown.

    Closes #2672

  • Add basic support for ast.TemplateStr and ast.Interpolationadded in Python 3.14.

    Refs #2789

  • Add support for type parameter defaults added in Python 3.13.

  • Improve as_string() representation for TypeVar, ParamSpec and TypeVarTuple nodes, as well as
    type parameter in ClassDef, FuncDef and TypeAlias nodes (PEP 695).

  • Astroid now correctly supports the exceptions attribute of ExceptionGroup.

    Closes pylint-dev/pylint#8985
    Closes pylint-dev/pylint#10558

  • Deprecate importing node classes from astroid directly. This will be removed in v5.
    It's recommended to import them from astroid.nodes instead.

    Refs #2837

v4.0.0rc0

29 Sep 13:18

Choose a tag to compare

v4.0.0rc0 Pre-release
Pre-release
Bump astroid to 4.0.0rc0

v4.0.0b3

22 Sep 19:41

Choose a tag to compare

v4.0.0b3 Pre-release
Pre-release

v4.0.0b3

v4.0.0b2

07 Aug 09:48
0f60c1f

Choose a tag to compare

v4.0.0b2 Pre-release
Pre-release
v4.0.0b2