-
-
Notifications
You must be signed in to change notification settings - Fork 318
Expand file tree
/
Copy pathChangeLog
More file actions
4750 lines (2814 loc) · 139 KB
/
ChangeLog
File metadata and controls
4750 lines (2814 loc) · 139 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
===================
astroid's ChangeLog
===================
What's New in astroid 4.2.0?
============================
Release date: TBA
* Changed `block_range` to consider `else` its own block, allowing `pylint` to apply
disables to just the block.
References pylint-dev/pylint#872
What's New in astroid 4.1.2?
============================
Release date: 2026-03-22
* Fix crash accessing property `fset` in generic classes with type annotations.
Closes #2996
* Fix infinite recursion caused by cyclic inference in ``Constraint``.
* Fix ``RecursionError`` in ``_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 ``DuplicateBasesError`` crash in dataclass transform when a class has
duplicate bases in its MRO (e.g., ``Protocol`` appearing both directly and
indirectly). Catch ``MroError`` at ``.mro()`` call sites in
``brain_dataclasses.py``, consistent with the existing pattern elsewhere.
Closes #2628
* Fix ``FunctionModel`` returning descriptor attributes for builtin functions.
Closes #2743
* Catch ``MemoryError`` when inferring f-strings with extremely large format
widths (e.g. ``f'{0:11111111111}'``) so that inference yields ``Uninferable``
instead of crashing.
Closes #2762
* Fix ``ValueError`` in ``__str__``/``repr`` and 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
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
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
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
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
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
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
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.Interpolation`` added 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
What's New in astroid 3.3.11?
=============================
Release date: 2025-07-13
* Fix a crash when parsing an empty arbitrary expression with ``extract_node`` (``extract_node("__()")``).
Closes #2734
* Fix a crash when parsing a slice called in a decorator on a function that is also decorated with
a known ``six`` decorator.
Closes #2721
What's New in astroid 3.3.10?
=============================
Release date: 2025-05-10
* Avoid importing submodules sharing names with standard library modules.
Closes #2684
* Fix bug where ``pylint code.custom_extension`` would analyze ``code.py`` or ``code.pyi`` instead if they existed.
Closes pylint-dev/pylint#3631
What's New in astroid 3.3.9?
============================
Release date: 2025-03-09
* Fix crash when `sys.modules` contains lazy loader objects during checking.
Closes #2686
Closes pylint-dev/pylint#8589
* Upload release assets to PyPI via Trusted Publishing.
Refs pylint-dev/pylint#10256
What's New in astroid 3.3.8?
============================
Release date: 2024-12-23
* Fix inability to import `collections.abc` in python 3.13.1. The reported fixes in astroid 3.3.6
and 3.3.7 did not actually fix this issue.
Closes pylint-dev/pylint#10112
What's New in astroid 3.3.7?
============================
Release date: 2024-12-20
This release was yanked.
* Fix inability to import `collections.abc` in python 3.13.1. The reported fix in astroid 3.3.6
did not actually fix this issue.
Closes pylint-dev/pylint#10112
What's New in astroid 3.3.6?
============================
Release date: 2024-12-08
* Fix inability to import `collections.abc` in python 3.13.1.
_It was later found that this did not resolve the linked issue. It was fixed in astroid 3.3.7_
Closes pylint-dev/pylint#10112
* Fix crash when typing._alias() call is missing arguments.
Closes #2513
What's New in astroid 3.3.5?
============================
Release date: 2024-10-04
* Control setting local nodes outside of the supposed local's constructor.
Closes #1490
* Fix Python 3.13 compatibility re: `collections.abc`
Closes pylint-dev/pylint#10000
What's New in astroid 3.3.4?
============================
Release date: 2024-09-23
* Fix regression with f-string inference.
Closes pylint-dev/pylint#9947
* Fix bug with ``manager.clear_cache()`` not fully clearing cache.
Refs https://github.com/pylint-dev/pylint/pull/9932#issuecomment-2364985551
* Fix a crash from inferring empty format specs.
Closes pylint-dev/pylint#9945
What's New in astroid 3.3.3?
============================
Release date: 2024-09-20
* Fix inference regression with property setters.
Closes pylint-dev/pylint#9811
* Add annotation-only instance attributes to attrs classes to fix `no-member` false positives.
Closes #2514
What's New in astroid 3.3.2?
============================
Release date: 2024-08-11
* Restore support for soft-deprecated members of the ``typing`` module with python 3.13.
Refs pylint-dev/pylint#9852
What's New in astroid 3.3.1?
============================
Release date: 2024-08-06
* Fix a crash introduced in 3.3.0 involving invalid format strings.
Closes #2492
What's New in astroid 3.3.0?
============================
Release date: 2024-08-04
* Add support for Python 3.13.
* Remove support for Python 3.8 (and constants `PY38`, `PY39_PLUS`, and `PYPY_7_3_11_PLUS`).
Refs #2443
* Add the ``__annotations__`` attribute to the ``ClassDef`` object model.
Closes pylint-dev/pylint#7126
* Implement inference for JoinedStr and FormattedValue
* Add support for ``ssl.OP_LEGACY_SERVER_CONNECT`` (new in Python 3.12).
Closes pylint-dev/pylint#9849
What's New in astroid 3.2.4?
============================
Release date: 2024-07-20
* Avoid reporting unary/binary op type errors when inference is ambiguous.
Closes #2467
What's New in astroid 3.2.3?
============================
Release date: 2024-07-11
* Fix ``AssertionError`` when inferring a property consisting of a partial function.
Closes pylint-dev/pylint#9214
What's New in astroid 3.2.2?
============================
Release date: 2024-05-20
* Improve inference for generic classes using the PEP 695 syntax (Python 3.12).
Closes pylint-dev/pylint#9406
What's New in astroid 3.2.1?
============================
Release date: 2024-05-16
* Fix ``RecursionError`` in ``infer_call_result()`` for certain ``__call__`` methods.
Closes pylint-dev/pylint#9139
* Add ``AstroidManager.prefer_stubs`` attribute to control the astroid 3.2.0 feature that prefers stubs.
Refs pylint-dev/pylint#9626
Refs pylint-dev/pylint#9623
What's New in astroid 3.2.0?
============================
Release date: 2024-05-07
* ``.pyi`` stub files are now preferred over ``.py`` files when resolving imports, (except for numpy).
Closes pylint-dev/#9185
* ``igetattr()`` returns the last same-named function in a class (instead of
the first). This avoids false positives in pylint with ``@overload``.
Closes #1015
Refs pylint-dev/pylint#4696
* Adds ``module_denylist`` to ``AstroidManager`` for modules to be skipped during AST
generation. Modules in this list will cause an ``AstroidImportError`` to be raised
when an AST for them is requested.
Refs pylint-dev/pylint#9442
* Make ``astroid.interpreter._import.util.is_namespace`` only consider modules
using a loader set to ``NamespaceLoader`` or ``None`` as namespaces.
This fixes a problem that ``six.moves`` brain was not effective if ``six.moves``
was already imported.
Closes #1107
What's New in astroid 3.1.0?
============================
Release date: 2024-02-23
* Include PEP 695 (Python 3.12) generic type syntax nodes in ``get_children()``,
allowing checkers to visit them.
Refs pylint-dev/pylint#9193
* Add ``__main__`` as a possible inferred value for ``__name__`` to improve
control flow inference around ``if __name__ == "__main__":`` guards.
Closes #2071
* Following a deprecation period, the ``names`` arg to the ``Import`` constructor and
the ``op`` arg to the ``BoolOp`` constructor are now required, and the ``doc`` args
to the ``PartialFunction`` and ``Property`` constructors have been removed (call
``postinit(doc_node=...)`` instead.)
* Following a deprecation announced in astroid 1.5.0, the alias ``AstroidBuildingException`` is removed in favor of ``AstroidBuildingError``.
* Include modname in AST warnings. Useful for ``invalid escape sequence`` warnings
with Python 3.12.
* ``RecursionError`` is now trapped and logged out as ``UserWarning`` during astroid node transformations with instructions about raising the system recursion limit.
Closes pylint-dev/pylint#8842
* Suppress ``SyntaxWarning`` for invalid escape sequences on Python 3.12 when parsing modules.
Closes pylint-dev/pylint#9322
What's New in astroid 3.0.3?
============================
Release date: 2024-02-04
* Fix type of ``UnicodeDecodeError.object`` inferred as ``str`` instead of ``bytes``.
Closes pylint-dev/pylint#9342
* Fix ``no-member`` false positives for ``args`` and ``kwargs`` on ``ParamSpec`` under Python 3.12.
Closes pylint-dev/pylint#9401
What's New in astroid 3.0.2?
============================
Release date: 2023-12-12
* Avoid duplicate inference results for some uses of ``typing.X`` constructs like
``Tuple[Optional[int], ...]``. This was causing pylint to occasionally omit
messages like ``deprecated-typing-alias``.
Closes pylint-dev/pylint#9220
What's New in astroid 3.0.1?
============================
Release date: 2023-10-15
* Fix crashes linting code using PEP 695 (Python 3.12) generic type syntax.
Closes pylint-dev/pylint#9098
What's New in astroid 3.0.0?
=============================
Release date: 2023-09-26
* Add support for Python 3.12, including PEP 695 type parameter syntax.
Closes #2201
* Remove support for Python 3.7.
Refs #2137
* Use the global inference cache when inferring, even without an explicit
``InferenceContext``. This is a significant performance improvement given how
often methods default to ``None`` for the context argument. (Linting ``astroid``
itself now takes ~5% less time on Python 3.12; other projects requiring more
complex inference calculations will see greater speedups.)
Refs #529
* Following a deprecation period starting in astroid 2.7.0, the ``astroid.node_classes``
and ``astroid.scoped_nodes`` modules have been removed in favor of ``astroid.nodes.node_classes``
and ``astroid.nodes.scoped_nodes``.
Closes #1072
* Following a deprecation period starting in astroid 2.12.0, the ``astroid.mixins`` module
has been removed in favor of ``astroid.nodes._base_nodes`` (private).
Refs #1633
* Return all existing arguments when calling ``Arguments.arguments()``. This also means ``find_argname`` will now
use the whole list of arguments for its search.
Closes #2213
* Exclude class attributes from the ``__members__`` container of an ``Enum`` class when they are
``nodes.AnnAssign`` nodes with no assigned value.
Refs pylint-dev/pylint#7402
* Remove ``@cached`` and ``@cachedproperty`` decorator (just use ``@cached_property`` from the stdlib).
Closes #1780
Refs #2140
* Remove the ``inference`` module. Node inference methods are now in the module
defining the node, rather than being associated to the node afterward.
Closes #679
* Move ``LookupMixIn`` to ``astroid.nodes._base_nodes`` and make it private.
* Remove the shims for ``OperationError``, ``BinaryOperationError``, and ``UnaryOperationError``
in ``exceptions``. They were moved to ``util`` in astroid 1.5.0.
* Move ``safe_infer()`` from ``helpers`` to ``util``. This avoids some circular imports.
* Reduce file system access in ``ast_from_file()``.
* Reduce time to ``import astroid`` by delaying ``astroid_bootstrapping()`` until
the first instantiation of ``AstroidBuilder``.
Closes #2161
* Make ``igetattr()`` idempotent. This addresses some reports of varying results
when running pylint with ``--jobs``.
Closes pylint-dev/pylint#4356
Refs #7
* Fix incorrect cache keys for inference results, thereby correctly inferring types
for calls instantiating types dynamically.
Closes #1828
Closes pylint-dev/pylint#7464
Closes pylint-dev/pylint#8074
* Fix interrupted ``InferenceContext`` call chains, thereby addressing performance
problems when linting ``sqlalchemy``.
Closes pylint-dev/pylint#8150
* ``nodes.FunctionDef`` no longer inherits from ``nodes.Lambda``.
This is a breaking change but considered a bug fix as the nodes did not share the same
API and were not interchangeable.
We have tried to minimize the amount of breaking changes caused by this change
but some are unavoidable.
* ``infer_call_result`` now shares the same interface across all implementations. Namely:
```python
def infer_call_result(
self,
caller: SuccessfulInferenceResult | None,
context: InferenceContext | None = None,
) -> Iterator[InferenceResult]:
```
This is a breaking change for ``nodes.FunctionDef`` where previously ``caller`` had a default of
``None``. Passing ``None`` again will not create a behaviour change.
The breaking change allows us to better type and re-use the method within ``astroid``.
* Improved signature of the ``__init__`` and ``__postinit__`` methods of most nodes.
This includes making ``lineno``, ``col_offset``, ``end_lineno``, ``end_col_offset`` and ``parent``
required arguments for ``nodes.NodeNG`` and its subclasses.
For most other nodes, arguments of their ``__postinit__`` methods have been made required to better
represent how they would normally be constructed by the standard library ``ast`` module.
The following nodes were changed or updated:
- ``nodes.AnnAssign``
- ``nodes.Arguments``
- ``nodes.Assign``
- ``nodes.AssignAttr``
- ``nodes.AssignName``
- ``nodes.Attribute``
- ``nodes.AugAssign``
- ``nodes.Await``
- ``nodes.BaseContainer``
- ``nodes.BinOp``
- ``nodes.Call``
- ``nodes.ClassDef``
- ``nodes.Compare``
- ``nodes.Comprehension``
- ``nodes.Decorators``
- ``nodes.Delete``
- ``nodes.DelAttr``
- ``nodes.DelName``
- ``nodes.Dict``
- ``nodes.DictComp``
- ``nodes.ExceptHandler``
- ``nodes.Expr``
- ``nodes.For``
- ``nodes.FunctionDef``
- ``nodes.GeneratorExp``
- ``nodes.If``
- ``nodes.IfExp``
- ``nodes.Keyword``
- ``nodes.Lambda``
- ``nodes.ListComp``
- ``nodes.Module``
- ``nodes.Name``
- ``nodes.NodeNG``
- ``nodes.Raise``
- ``nodes.Return``
- ``nodes.SetComp``
- ``nodes.Slice``
- ``nodes.Starred``
- ``objects.Super``, we also added the ``call`` parameter to its ``__init__`` method.
- ``nodes.Subscript``
- ``nodes.UnaryOp``
- ``nodes.While``
- ``nodes.Yield``
These changes involve breaking changes to their API but should be considered bug fixes. We
now make arguments required when they are instead of always providing defaults.
* ``nodes.If.self.is_orelse`` has been removed as it was never set correctly and therefore
provided a false value.
* Remove dependency on ``wrapt``.
* Remove dependency on ``lazy_object_proxy``. This includes the removal
of the associated ``lazy_import``, ``lazy_descriptor`` and ``proxy_alias`` utility functions.
* ``CallSite._unpack_args`` and ``CallSite._unpack_keywords`` now use ``safe_infer()`` for
better inference and fewer false positives.
Closes pylint-dev/pylint#8544
* Add ``attr.Factory`` to the recognized class attributes for classes decorated with ``attrs``.
Closes pylint-dev/pylint#4341
* ``infer_property()`` now observes the same property-specific workaround as ``infer_functiondef``.
Refs #1490
* Remove unused and / or deprecated constants:
- ``astroid.bases.BOOL_SPECIAL_METHOD``
- ``astroid.bases.BUILTINS``
- ``astroid.const.BUILTINS``
- ``astroid.const.PY38_PLUS``
- ``astroid.const.Load``
- ``astroid.const.Store``
- ``astroid.const.Del``
Refs #2141
* ``frame()`` raises ``ParentMissingError`` and ``statement()`` raises ``StatementMissing`` for
missing parents regardless of the value of the ``future`` argument (which gave this behavior
already).
The ``future`` argument to each method is deprecated and will be removed in astroid 4.0.
Refs #1217
* Remove deprecated ``Ellipsis``, ``ExtSlice``, ``Index`` nodes.
Refs #2152
* Remove deprecated ``is_sys_guard`` and ``is_typing_guard`` methods.
Refs #2153
* Remove deprecated ``doc`` attribute for ``Module``, ``ClassDef``, and ``FunctionDef``.
Use the ``doc_node`` attribute instead.
Refs #2154
* Add new ``nodes.Try`` to better match Python AST. Replaces the ``TryExcept``
and ``TryFinally`` nodes which have been removed.
* Publicize ``NodeNG.repr_name()`` to facilitate finding a node's nice name.
Refs pylint-dev/pylint#8598
* Fix false positives for ``no-member`` and ``invalid-name`` when using the ``_name_``, ``_value_`` and ``_ignore_`` sunders in Enums.
Closes pylint-dev/pylint#9015
What's New in astroid 2.15.8?
=============================
Release date: 2023-09-26
* Fix a regression in 2.15.7 for ``unsubscriptable-object``.
Closes #2305
Closes pylint-dev/pylint#9069
What's New in astroid 2.15.7?
=============================
Release date: 2023-09-23
* Fix a crash when inferring a ``typing.TypeVar`` call.
Closes pylint-dev/pylint#8802
* Infer user-defined enum classes by checking if the class is a subtype of ``enum.Enum``.
Closes pylint-dev/pylint#8897
* Fix inference of functions with ``@functools.lru_cache`` decorators without
parentheses.
Closes pylint-dev/pylint#8868
* Make ``sys.argv`` uninferable because it never is. (It's impossible to infer
the value it will have outside of static analysis where it's our own value.)
Refs pylint-dev/pylint#7710
What's New in astroid 2.15.6?
=============================
Release date: 2023-07-08
* Harden ``get_module_part()`` against ``"."``.
Closes pylint-dev/pylint#8749
* Allow ``AsStringVisitor`` to visit ``objects.PartialFunction``.
Closes pylint-dev/pylint#8881
* Avoid expensive list/tuple multiplication operations that would result in ``MemoryError``.
Closes pylint-dev/pylint#8748
* Fix a regression in 2.12.0 where settings in AstroidManager would be ignored.
Most notably this addresses pylint-dev/pylint#7433.
Refs #2204
What's New in astroid 2.15.5?
=============================
Release date: 2023-05-14
* Handle ``objects.Super`` in ``helpers.object_type()``.
Refs pylint-dev/pylint#8554
* Recognize stub ``pyi`` Python files.
Refs pylint-dev/pylint#4987
What's New in astroid 2.15.4?
=============================
Release date: 2023-04-24
* Add visitor function for ``TryStar`` to ``AsStringVisitor`` and
add ``TryStar`` to ``astroid.nodes.ALL_NODE_CLASSES``.
Refs #2142
What's New in astroid 2.15.3?
=============================
Release date: 2023-04-16
* Fix ``infer_call_result()`` crash on methods called ``with_metaclass()``.
Closes #1735
* Suppress ``UserWarning`` when finding module specs.
Closes pylint-dev/pylint#7906
What's New in astroid 2.15.2?
=============================
Release date: 2023-04-03
* Support more possible usages of ``attrs`` decorators.
Closes pylint-dev/pylint#7884
What's New in astroid 2.15.1?
=============================
Release date: 2023-03-26
* Restore behavior of setting a Call as a base for classes created using ``six.with_metaclass()``,
and harden support for using enums as metaclasses in this case.
Reverts #1622
Refs pylint-dev/pylint#5935
Refs pylint-dev/pylint#7506
What's New in astroid 2.15.0?
=============================
Release date: 2023-03-06
* astroid now supports ``TryStar`` nodes from python 3.11 and should be fully compatible with python 3.11.
Closes #2028
* ``Formattedvalue.postinit`` is now keyword only. This is to allow correct typing of the
``Formattedvalue`` class.
Refs #1516
* ``Astroid`` now supports custom import hooks.
Refs pylint-dev/pylint#7306
* ``astroid`` now infers return values from match cases.
Refs pylint-dev/pylint#5288
* ``AstroidManager.clear_cache`` now also clears the inference context cache.
Refs #1780
* ``max_inferable_values`` can now be set on ``AstroidManager`` instances, e.g. ``astroid.MANAGER``
besides just the ``AstroidManager`` class itself.
Closes #2280
* ``Astroid`` now retrieves the default values of keyword only arguments and sets them on
``Arguments.kw_defaults``.
* ``Uninferable`` now has the type ``UninferableBase``. This is to facilitate correctly type annotating
code that uses this singleton.
Closes #1680
* Deprecate ``modutils.is_standard_module()``. It will be removed in the next minor release.
Functionality has been replaced by two new functions,
``modutils.is_stdlib_module()`` and ``modutils.module_in_path()``.
Closes #2012
* Fix ``are_exclusive`` function when a walrus operator is used inside ``IfExp.test`` field.
Closes #2022
What's New in astroid 2.14.2?
=============================
Release date: 2023-02-12
* '_infer_str_format_call' won't crash anymore when the string it analyses are uninferable.
Closes pylint-dev/pylint#8109
What's New in astroid 2.14.1?
=============================
Release date: 2023-01-31
* Revert ``CallContext`` change as it caused a ``RecursionError`` regression.
What's New in astroid 2.14.0?
=============================
Release date: 2023-01-31
* Add support for inferring binary union types added in Python 3.10.
Refs pylint-dev/pylint#8119
* Capture and log messages emitted when inspecting a module for astroid.
Closes #1904
What's New in astroid 2.13.5?
=============================
Release date: 2023-01-31
* Revert ``CallContext`` change as it caused a ``RecursionError`` regression.
What's New in astroid 2.13.4?
=============================
Release date: 2023-01-31
* Fix issues with ``typing_extensions.TypeVar``.