-
-
Notifications
You must be signed in to change notification settings - Fork 276
/
ChangeLog
4101 lines (2436 loc) · 121 KB
/
ChangeLog
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 3.0.0?
=============================
Release date: TBA
* Add support for Python 3.12, including PEP 695 type parameter syntax.
Closes #2201
* Remove support for Python 3.7.
Refs #2137
* 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.TryExcept``
- ``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
* Publicize ``NodeNG.repr_name()`` to facilitate finding a node's nice name.
Refs pylint-dev/pylint#8598
* 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.6?
=============================
Release date: TBA
* Harden ``get_module_part()`` against ``"."``.
Closes pylint-dev/pylint#8749
* Avoid expensive list/tuple multiplication operations that would result in ``MemoryError``.
Closes pylint-dev/pylint#8748
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
* ``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``.
* Fix ``ClassDef.fromlino`` for PyPy 3.8 (v7.3.11) if class is wrapped by a decorator.
* Preserve parent CallContext when inferring nested functions.
Closes pylint-dev/pylint#8074
* Add ``Lock`` to the ``multiprocessing`` brain.
Closes pylint-dev/pylint#3313
What's New in astroid 2.13.3?
=============================
Release date: 2023-01-20
* Fix a regression in 2.13.2 where a RunTimeError could be raised unexpectedly.
Closes #1958
* Fix overwritten attributes in inherited dataclasses not being ordered correctly.
Closes pylint-dev/pylint#7881
* Fix a false positive when an attribute named ``Enum`` was confused with ``enum.Enum``.
Calls to ``Enum`` are now inferred & the qualified name is checked.
Refs pylint-dev/pylint#5719
* Remove unnecessary typing_extensions dependency on Python 3.11 and newer
What's New in astroid 2.13.2?
=============================
Release date: 2023-01-08
* Removed version conditions on typing_extensions dependency. Removed typing_extensions from
our tests requirements as it was preventing issues to appear in our continuous integration.
Closes #1945
What's New in astroid 2.13.1?
=============================
Release date: 2023-01-08
* Bumping typing_extensions to 4.0.0 that is required when using ``Self``
Closes #1942
What's New in astroid 2.13.0?
=============================
Release date: 2023-01-07
* Fixed importing of modules that have the same name as the file that is importing.
``astroid`` will now correctly handle an ``import math`` statement in a file called ``math.py``
by relying on the import system.
Refs pylint-dev/pylint#5151
* Create ``ContextManagerModel`` and let ``GeneratorModel`` inherit from it.
Refs pylint-dev/pylint#2567
* Added a ``regex`` brain.
Refs pylint-dev/pylint#1911
* Support "is None" constraints from if statements during inference.
Ref #791
Ref pylint-dev/pylint#157
Ref pylint-dev/pylint#1472
Ref pylint-dev/pylint#2016
Ref pylint-dev/pylint#2631
Ref pylint-dev/pylint#2880
What's New in astroid 2.12.14?
==============================
Release date: 2023-01-06
* Handle the effect of properties on the ``__init__`` of a dataclass correctly.
Closes pylint-dev/pylint#5225
* Handle the effect of ``kw_only=True`` in dataclass fields correctly.
Closes pylint-dev/pylint#7623
* Handle the effect of ``init=False`` in dataclass fields correctly.
Closes pylint-dev/pylint#7291
* Fix crash if ``numpy`` module doesn't have ``version`` attribute.
Refs pylint-dev/pylint#7868
* Handle ``AttributeError`` during ``str.format`` template inference tip evaluation
Closes pylint-dev/pylint#1902
* Add the ``masked_invalid`` function in the ``numpy.ma`` brain.
Closes pylint-dev/pylint#5715
What's New in astroid 2.12.13?
==============================
Release date: 2022-11-19
* Prevent returning an empty list for ``ClassDef.slots()`` when the mro list contains one class & it is not ``object``.
Refs pylint-dev/pylint#5099
* Prevent a crash when inferring calls to ``str.format`` with inferred arguments
that would be invalid.
Closes #1856
* Infer the `length` argument of the ``random.sample`` function.
Refs pylint-dev/pylint#7706
* Catch ``ValueError`` when indexing some builtin containers and sequences during inference.
Closes #1843
What's New in astroid 2.12.12?
==============================
Release date: 2022-10-19
* Add the ``length`` parameter to ``hash.digest`` & ``hash.hexdigest`` in the ``hashlib`` brain.
Refs pylint-dev/pylint#4039
* Prevent a crash when a module's ``__path__`` attribute is unexpectedly missing.
Refs pylint-dev/pylint#7592
* Fix inferring attributes with empty annotation assignments if parent
class contains valid assignment.
Refs pylint-dev/pylint#7631
What's New in astroid 2.12.11?
==============================
Release date: 2022-10-10
* Add ``_value2member_map_`` member to the ``enum`` brain.
Refs pylint-dev/pylint#3941
* Improve detection of namespace packages for the modules with ``__spec__`` set to None.
Closes pylint-dev/pylint#7488.
* Fixed a regression in the creation of the ``__init__`` of dataclasses with
multiple inheritance.
Closes pylint-dev/pylint#7434
What's New in astroid 2.12.10?
==============================
Release date: 2022-09-17
* Fixed a crash when introspecting modules compiled by `cffi`.
Closes #1776
Closes pylint-dev/pylint#7399
* ``decorators.cached`` now gets its cache cleared by calling ``AstroidManager.clear_cache``.
Refs #1780
What's New in astroid 2.12.9?
=============================
Release date: 2022-09-07
* Fixed creation of the ``__init__`` of ``dataclassess`` with multiple inheritance.
Closes pylint-dev/pylint#7427
* Fixed a crash on ``namedtuples`` that use ``typename`` to specify their name.
Closes pylint-dev/pylint#7429
What's New in astroid 2.12.8?
=============================
Release date: 2022-09-06
* Fixed a crash in the ``dataclass`` brain for ``InitVars`` without subscript typing.
Closes pylint-dev/pylint#7422
* Fixed parsing of default values in ``dataclass`` attributes.
Closes pylint-dev/pylint#7425
What's New in astroid 2.12.7?
=============================
Release date: 2022-09-06
* Fixed a crash in the ``dataclass`` brain for uninferable bases.
Closes pylint-dev/pylint#7418
What's New in astroid 2.12.6?
=============================
Release date: 2022-09-05
* Fix a crash involving ``Uninferable`` arguments to ``namedtuple()``.
Closes pylint-dev/pylint#7375
* The ``dataclass`` brain now understands the ``kw_only`` keyword in dataclass decorators.
Closes pylint-dev/pylint#7290
What's New in astroid 2.12.5?
=============================
Release date: 2022-08-29
* Prevent first-party imports from being resolved to `site-packages`.
Refs pylint-dev/pylint#7365
* Fix ``astroid.interpreter._import.util.is_namespace()`` incorrectly
returning ``True`` for frozen stdlib modules on PyPy.
Closes #1755
What's New in astroid 2.12.4?
=============================
Release date: 2022-08-25
* Fixed a crash involving non-standard type comments such as ``# type: # any comment``.
Refs pylint-dev/pylint#7347
What's New in astroid 2.12.3?
=============================
Release date: 2022-08-23
* Fixed crash in ``ExplicitNamespacePackageFinder`` involving ``_SixMetaPathImporter``.
Closes #1708
* Fix unhandled `FutureWarning` from pandas import in cython modules
Closes #1717
* Fix false positive with inference of type-annotated Enum classes.
Refs pylint-dev/pylint#7265
* Fix crash with inference of type-annotated Enum classes where the member has no value.
* Fix a crash inferring invalid old-style string formatting with `%`.
Closes #1737
* Fix false positive with inference of ``http`` module when iterating ``HTTPStatus``.
Refs pylint-dev/pylint#7307
* Bumped minimum requirement of ``wrapt`` to 1.14 on Python 3.11.
* Don't add dataclass fields annotated with ``KW_ONLY`` to the list of fields.
Refs pylint-dev/pylint#5767
What's New in astroid 2.12.2?
=============================
Release date: 2022-07-12
* Fixed crash in modulo operations for divisions by zero.
Closes #1700
* Fixed crash with recursion limits during inference.
Closes #1646
What's New in astroid 2.12.1?
=============================
Release date: 2022-07-10
* Fix a crash when inferring old-style string formatting (``%``) using tuples.
* Fix a crash when ``None`` (or a value inferred as ``None``) participates in a
``**`` expression.
* Fix a crash involving properties within ``if`` blocks.
What's New in astroid 2.12.0?
=============================
Release date: 2022-07-09
* Fix signal has no ``connect`` member for PySide2 5.15.2+ and PySide6
Closes #4040, #5378
* ``astroid`` now requires Python 3.7.2 to run.
* Avoid setting a Call as a base for classes created using ``six.with_metaclass()``.
Refs pylint-dev/pylint#5935
* Fix detection of builtins on ``PyPy`` 3.9.
* Fix ``re`` brain on Python ``3.11``. The flags now come from ``re._compile``.
* Build ``nodes.Module`` for frozen modules which have location information in their
``ModuleSpec``.
Closes #1512
* The ``astroid.mixins`` module has been deprecated and marked for removal in 3.0.0.
Closes #1633
* Capture and log messages emitted by C extensions when importing them.
This prevents contaminating programmatic output, e.g. pylint's JSON reporter.
Closes pylint-dev/pylint#3518
* Calls to ``str.format`` are now correctly inferred.
Closes #104, Closes #1611
* ``__new__`` and ``__init__`` have been added to the ``ObjectModel`` and are now
inferred as ``BoundMethods``.
* Old style string formatting (using ``%`` operators) is now correctly inferred.
Closes #151
* Adds missing enums from ``ssl`` module.
Closes pylint-dev/pylint#3691
* Remove dependency on ``pkg_resources`` from ``setuptools``.
Closes #1103
* Allowed ``AstroidManager.clear_cache`` to reload necessary brain plugins.
* Fixed incorrect inferences after rebuilding the builtins module, e.g. by calling
``AstroidManager.clear_cache``.
Closes #1559
* ``Arguments.defaults`` is now ``None`` for uninferable signatures.
* On Python versions >= 3.9, ``astroid`` now understands subscripting
builtin classes such as ``enumerate`` or ``staticmethod``.
* Fixed inference of ``Enums`` when they are imported under an alias.
Closes pylint-dev/pylint#5776
* Rename ``ModuleSpec`` -> ``module_type`` constructor parameter to match attribute
name and improve typing. Use ``type`` instead.
* ``ObjectModel`` and ``ClassModel`` now know about their ``__new__`` and ``__call__`` attributes.
* Fixed pylint ``not-callable`` false positive with nested-tuple assignment in a for-loop.
Refs pylint-dev/pylint#5113
* Instances of builtins created with ``__new__(cls, value)`` are now inferred.
* Infer the return value of the ``.copy()`` method on ``dict``, ``list``, ``set``,
and ``frozenset``.
Closes #1403
* Fixed inference of elements of living container objects such as tuples and sets in the
``sys`` and ``ssl`` modules.
* Add ``pathlib`` brain to handle ``pathlib.PurePath.parents`` inference.
Closes pylint-dev/pylint#5783
* Avoid inferring the results of ``**`` operations involving values greater than ``1e5``
to avoid expensive computation.
Closes pylint-dev/pylint#6745
* Fix test for Python ``3.11``. In some instances ``err.__traceback__`` will
be uninferable now.
* Add brain for numpy core module ``einsumfunc``.
Closes pylint-dev/pylint#5821
* Infer the ``DictUnpack`` value for ``Dict.getitem`` calls.
Closes #1195
* Fix a crash involving properties within ``try ... except`` blocks.
Closes pylint-dev/pylint#6592
* Prevent creating ``Instance`` objects that proxy other ``Instance``s when there is
ambiguity (or user error) in calling ``__new__(cls)``.
Refs pylint-dev/pylint#7109
What's New in astroid 2.11.7?
=============================
Release date: 2022-07-09
* Added support for ``usedforsecurity`` keyword to ``hashlib`` constructors.
Closes pylint-dev/pylint#6017
* Updated the stdlib brain for ``subprocess.Popen`` to accommodate Python 3.9+.
Closes pylint-dev/pylint#7092
What's New in astroid 2.11.6?
=============================
Release date: 2022-06-13
* The Qt brain now correctly treats calling ``.disconnect()`` (with no
arguments) on a slot as valid.
* The argparse brain no longer incorrectly adds ``"Namespace"`` to the locals
of functions that return an ``argparse.Namespace`` object.
Refs pylint-dev/pylint#6895
What's New in astroid 2.11.5?
=============================
Release date: 2022-05-09
* Fix crash while obtaining ``object_type()`` of an ``Unknown`` node.
Refs pylint-dev/pylint#6539
* Fix a bug where in attempting to handle the patching of ``distutils`` by ``virtualenv``,
library submodules called ``distutils`` (e.g. ``numpy.distutils``) were included also.
Refs pylint-dev/pylint#6497
What's New in astroid 2.11.4?
=============================
Release date: 2022-05-02
* Fix ``col_offset`` attribute for nodes involving ``with`` on ``PyPy``.
* Fixed a crash involving two starred expressions: one inside a comprehension,
both inside a call.
Refs pylint-dev/pylint#6372
* Made ``FunctionDef.implicit_parameters`` return 1 for methods by making
``FunctionDef.is_bound`` return ``True``, as it does for class methods.
Closes pylint-dev/pylint#6464
* Fixed a crash when ``_filter_stmts`` encounters an ``EmptyNode``.
Closes pylint-dev/pylint#6438
What's New in astroid 2.11.3?
=============================
Release date: 2022-04-19
* Fixed an error in the Qt brain when building ``instance_attrs``.
Closes pylint-dev/pylint#6221
* Fixed a crash in the ``gi`` brain.
Closes pylint-dev/pylint#6371
What's New in astroid 2.11.2?
=============================
Release date: 2022-03-26
* Avoided adding the name of a parent namedtuple to its child's locals.
Refs pylint-dev/pylint#5982
What's New in astroid 2.11.1?
=============================
Release date: 2022-03-22
* Promoted ``getattr()`` from ``astroid.scoped_nodes.FunctionDef`` to its parent
``astroid.scoped_nodes.Lambda``.
* Fixed crash on direct inference via ``nodes.FunctionDef._infer``.
Closes #817
What's New in astroid 2.11.0?
=============================
Release date: 2022-03-12
* Add new (optional) ``doc_node`` attribute to ``nodes.Module``, ``nodes.ClassDef``,
and ``nodes.FunctionDef``.
* Accessing the ``doc`` attribute of ``nodes.Module``, ``nodes.ClassDef``, and
``nodes.FunctionDef`` has been deprecated in favour of the ``doc_node`` attribute.
Note: ``doc_node`` is an (optional) ``nodes.Const`` whereas ``doc`` was an (optional) ``str``.
* Passing the ``doc`` argument to the ``__init__`` of ``nodes.Module``, ``nodes.ClassDef``,
and ``nodes.FunctionDef`` has been deprecated in favour of the ``postinit`` ``doc_node`` attribute.
Note: ``doc_node`` is an (optional) ``nodes.Const`` whereas ``doc`` was an (optional) ``str``.
* Replace custom ``cachedproperty`` with ``functools.cached_property`` and deprecate it
for Python 3.8+.
Closes #1410
* Set ``end_lineno`` and ``end_col_offset`` attributes to ``None`` for all nodes
with PyPy 3.8. PyPy 3.8 assigns these attributes inconsistently which could lead
to unexpected errors. Overwriting them with ``None`` will cause a fallback
to the already supported way of PyPy 3.7.
* Add missing ``shape`` parameter to numpy ``zeros_like``, ``ones_like``,
and ``full_like`` methods.
Closes pylint-dev/pylint#5871
* Only pin ``wrapt`` on the major version.
What's New in astroid 2.10.0?
=============================
Release date: 2022-02-27
* Fixed inference of ``self`` in binary operations in which ``self``
is part of a list or tuple.
Closes pylint-dev/pylint#4826
* Fixed builtin inference on `property` calls not calling the `postinit` of the new node, which
resulted in instance arguments missing on these nodes.
* Fixed a crash on ``Super.getattr`` when the attribute was previously uninferable due to a cache
limit size. This limit can be hit when the inheritance pattern of a class (and therefore of the
``__init__`` attribute) is very large.
Closes pylint-dev/pylint#5679
* Include names of keyword-only arguments in ``astroid.scoped_nodes.Lambda.argnames``.
Closes pylint-dev/pylint#5771
* Fixed a crash inferring on a ``NewType`` named with an f-string.
Closes pylint-dev/pylint#5770
* Add support for [attrs v21.3.0](https://github.com/python-attrs/attrs/releases/tag/21.3.0) which
added a new `attrs` module alongside the existing `attr`.
Closes #1330
* Use the ``end_lineno`` attribute for the ``NodeNG.tolineno`` property
when it is available.
Closes #1350
* Add ``is_dataclass`` attribute to ``ClassDef`` nodes.
* Use ``sysconfig`` instead of ``distutils`` to determine the location of
python stdlib files and packages.
Related pull requests: #1322, #1323, #1324
Closes #1282
Ref #1103
* Fixed crash with recursion error for inference of class attributes that referenced
the class itself.
Closes pylint-dev/pylint#5408
* Fixed crash when trying to infer ``items()`` on the ``__dict__``
attribute of an imported module.
Closes #1085
* Add optional ``NodeNG.position`` attribute.
Used for block nodes to highlight position of keyword(s) and name
in cases where the AST doesn't provide good enough positional information.
E.g. ``nodes.ClassDef``, ``nodes.FunctionDef``.
* Fix ``ClassDef.fromlineno``. For Python < 3.8 the ``lineno`` attribute includes decorators.
``fromlineno`` should return the line of the ``class`` statement itself.
* Performance improvements. Only run expensive decorator functions when
non-default Deprecation warnings are enabled, eg. during a Pytest run.
Closes #1383
What's New in astroid 2.9.3?
============================
Release date: 2022-01-09
* Fixed regression where packages without a ``__init__.py`` file were
not recognized or imported correctly.
Closes #1327
What's New in astroid 2.9.2?
============================
Release date: 2022-01-04
* Fixed regression in ``astroid.scoped_nodes`` where ``_is_metaclass``
was not accessible anymore.
Closes #1325
What's New in astroid 2.9.1?
============================
Release date: 2021-12-31
* ``NodeNG.frame()`` and ``NodeNG.statement()`` will start raising ``ParentMissingError``
instead of ``AttributeError`` in astroid 3.0. This behaviour can already be triggered
by passing ``future=True`` to a ``frame()`` or ``statement()`` call.
* Prefer the module loader get_source() method in AstroidBuilder's
module_build() when possible to avoid assumptions about source
code being available on a filesystem. Otherwise the source cannot
be found and application behavior changes when running within an
embedded hermetic interpreter environment (pyoxidizer, etc.).
* Require Python 3.6.2 to use astroid.
* Removed custom ``distutils`` handling for resolving paths to submodules.
Ref #1321