|
4 | 4 |
|
5 | 5 | .. towncrier release notes start |
6 | 6 |
|
| 7 | +What's new in astroid 4.3.2? |
| 8 | +---------------------------- |
| 9 | +Release date: 2026-09-25 |
| 10 | + |
| 11 | + |
| 12 | +Bug Fixes |
| 13 | +--------- |
| 14 | + |
| 15 | +- Fix a crash when a ``namedtuple`` or ``Enum`` type name or field name |
| 16 | + contains ``str.format`` markup, as in ``namedtuple("{0}", "abc")``. The name |
| 17 | + is interpolated into an error message that astroid then reformats, so |
| 18 | + building the message raised ``IndexError``. Inference now falls back to its |
| 19 | + default. |
| 20 | + |
| 21 | + Closes #3199 (`#3199 <https://github.com/pylint-dev/astroid/issues/3199>`_) |
| 22 | + |
| 23 | +- Infer a functional ``TypeVar`` or ``NewType`` whose name is not an identifier |
| 24 | + without splicing that name into the synthesized class source. A crafted value |
| 25 | + such as ``TypeVar("T(Base): #")`` no longer breaks out of the identifier |
| 26 | + position to inject bases or a body; the name is assigned to the class verbatim. |
| 27 | + |
| 28 | + Refs #3217 (`#3217 <https://github.com/pylint-dev/astroid/issues/3217>`_) |
| 29 | + |
| 30 | +- Raise ``InferenceError`` instead of crashing with ``IndexError`` when a class |
| 31 | + uses ``six.with_metaclass()`` with no positional metaclass argument, both while |
| 32 | + building the module and when the call is inferred. |
| 33 | + |
| 34 | + Refs #3248 (`#3248 <https://github.com/pylint-dev/astroid/issues/3248>`_) |
| 35 | + |
| 36 | +- ``ClassDef.slots()`` no longer crashes on a class that declares a PEP 695 |
| 37 | + type parameter literally named ``__slots__`` (e.g. ``class C[__slots__]:``). |
| 38 | + The type parameter's ``TypeVar`` node was mistaken for the class's actual |
| 39 | + ``__slots__`` value; ``slots()`` now returns ``None`` for such classes |
| 40 | + instead of raising ``AttributeError``. |
| 41 | + |
| 42 | + Refs #3258 (`#3258 <https://github.com/pylint-dev/astroid/issues/3258>`_) |
| 43 | + |
| 44 | +- Fix a crash when inferring an f-string or ``str.format()`` call whose ``c`` format |
| 45 | + spec gets an out-of-range code point, such as ``f"{-1:c}"``. These now infer to |
| 46 | + ``Uninferable``, like the ``%c`` case fixed in #3254. |
| 47 | + |
| 48 | + Closes #3301 (`#3301 <https://github.com/pylint-dev/astroid/issues/3301>`_) |
| 49 | + |
| 50 | +- The ``args`` attribute of an exception instance is now inferred as a ``tuple`` |
| 51 | + instance of unknown contents instead of a known empty tuple, so unpacking |
| 52 | + ``exc.args`` no longer looks unbalanced. |
| 53 | + |
| 54 | + Closes pylint-dev/pylint#11312 (`#11312 <https://github.com/pylint-dev/astroid/issues/11312>`_) |
| 55 | + |
| 56 | + |
| 57 | + |
7 | 58 | What's new in astroid 4.3.1? |
8 | 59 | ---------------------------- |
9 | 60 | Release date: 2026-08-17 |
|
0 commit comments