-
-
Notifications
You must be signed in to change notification settings - Fork 278
/
ChangeLog
2989 lines (1760 loc) · 90.1 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 2.9.0?
============================
Release date: TBA
What's New in astroid 2.8.1?
============================
Release date: TBA
* Adds support of type hints inside numpy's brains.
Closes PyCQA/pylint#4326
* Enable inference of dataclass import from pydantic.dataclasses.
This allows the dataclasses brain to recognize pydantic dataclasses.
Closes PyCQA/pylint#4899
* Fix regression on ClassDef inference
Closes PyCQA/pylint#5030
Closes PyCQA/pylint#5036
* Fix regression on Compare node inference
Closes PyCQA/pylint#5048
* Extended attrs brain to support the provisional APIs
* Astroid does not trigger it's own deprecation warning anymore.
* Improve brain for ``typing.Callable`` and ``typing.Type``.
* Fix bug with importing namespace packages with relative imports
Closes PyCQA/pylint#5059
* The ``is_typing_guard`` and ``is_sys_guard`` functions are deprecated and will
be removed in 3.0.0. They are complex meta-inference functions that are better
suited for pylint. Import them from ``pylint.checkers.utils`` instead
(requires pylint ``2.12``).
What's New in astroid 2.8.0?
============================
Release date: 2021-09-14
* Add additional deprecation warnings in preparation for astroid 3.0
* Require attributes for some node classes with ``__init__`` call.
* ``name`` (``str``) for ``Name``, ``AssignName``, ``DelName``
* ``attrname`` (``str``) for ``Attribute``, ``AssignAttr``, ``DelAttr``
* ``op`` (``str``) for ``AugAssign``, ``BinOp``, ``BoolOp``, ``UnaryOp``
* ``names`` (``list[tuple[str, str | None]]``) for ``Import``
* Support pyz imports
Closes PyCQA/pylint#3887
* Add ``node_ancestors`` method to ``NodeNG`` for obtaining the ancestors of nodes.
* It's now possible to infer the value of comparison nodes
Closes #846
* Fixed bug in inference of dataclass field calls.
Closes PyCQA/pylint#4963
* Suppress the conditional between applied brains and dynamic import authorized
modules. (Revert the "The transforms related to a module are applied only if this
module has not been explicitly authorized to be imported" of version 2.7.3)
* Adds a brain to infer the ``numpy.ma.masked_where`` function.
Closes PyCQA/pylint#3342
What's New in astroid 2.7.3?
============================
Release date: 2021-08-30
* The transforms related to a module are applied only if this module has not been explicitly authorized to be imported
(i.e is not in AstroidManager.extension_package_whitelist). Solves the following issues if numpy is authorized to be imported
through the `extension-pkg-allow-list` option.
Closes PyCQA/pylint#3342
Closes PyCQA/pylint#4326
* Fixed bug in attribute inference from inside method calls.
Closes PyCQA/pylint#400
* Fixed bug in inference for superclass instance methods called
from the class rather than an instance.
Closes #1008
Closes PyCQA/pylint#4377
* Fixed bug in inference of chained attributes where a subclass
had an attribute that was an instance of its superclass.
Closes PyCQA/pylint#4220
* Adds a brain for the ctypes module.
Closes PyCQA/pylint#4896
* When processing dataclass attributes, exclude the same type hints from abc.collections
as from typing.
Closes PyCQA/pylint#4895
* Apply dataclass inference to pydantic's dataclasses.
Closes PyCQA/pylint#4899
What's New in astroid 2.7.2?
============================
Release date: 2021-08-20
* ``BaseContainer`` is now public, and will replace ``_BaseContainer`` completely in astroid 3.0.
* The call cache used by inference functions produced by ``inference_tip``
can now be cleared via ``clear_inference_tip_cache``.
* ``astroid.const.BUILTINS`` and ``astroid.bases.BUILTINS`` are not used internally anymore
and will be removed in astroid 3.0. Simply replace this by the string 'builtins' for better
performances and clarity.
* Add inference for dataclass initializer method.
Closes PyCQA/pylint#3201
What's New in astroid 2.7.1?
============================
Release date: 2021-08-16
* When processing dataclass attributes, only do typing inference on collection types.
Support for instantiating other typing types is left for the future, if desired.
Closes #1129
* Fixed LookupMixIn missing from ``astroid.node_classes``.
What's New in astroid 2.7.0?
============================
Release date: 2021-08-15
* Import from ``astroid.node_classes`` and ``astroid.scoped_nodes`` has been deprecated in favor of
``astroid.nodes``. Only the imports from ``astroid.nodes`` will work in astroid 3.0.0.
* Add support for arbitrary Enum subclass hierachies
Closes PyCQA/pylint#533
Closes PyCQA/pylint#2224
Closes PyCQA/pylint#2626
* Add inference tips for dataclass attributes, including dataclasses.field calls.
Also add support for InitVar.
Closes PyCQA/pylint#2600
Closes PyCQA/pylint#2698
Closes PyCQA/pylint#3405
Closes PyCQA/pylint#3794
* Adds a brain that deals with dynamic import of `IsolatedAsyncioTestCase` class of the `unittest` module.
Closes PyCQA/pylint#4060
What's New in astroid 2.6.6?
============================
Release date: 2021-08-03
* Added support to infer return type of ``typing.cast()``
* Fix variable lookup's handling of exclusive statements
Closes PyCQA/pylint#3711
* Fix variable lookup's handling of function parameters
Closes PyCQA/astroid#180
* Fix variable lookup's handling of except clause variables
* Fix handling of classes with duplicated bases with the same name
Closes PyCQA/astroid#1088
What's New in astroid 2.6.5?
============================
Release date: 2021-07-21
* Fix a crash when there would be a 'TypeError object does not support
item assignment' in the code we parse.
Closes PyCQA/pylint#4439
* Fix a crash when a AttributeInferenceError was raised when
failing to find the real name in infer_import_from.
Closes PyCQA/pylint#4692
What's New in astroid 2.6.4?
============================
Release date: 2021-07-19
* Fix a crash when a StopIteration was raised when inferring
a faulty function in a context manager.
Closes PyCQA/pylint#4723
What's New in astroid 2.6.3?
============================
Release date: 2021-07-19
* Added ``If.is_sys_guard`` and ``If.is_typing_guard`` helper methods
* Fix a bad inferenece type for yield values inside of a derived class.
Closes PyCQA/astroid#1090
* Fix a crash when the node is a 'Module' in the brain builtin inference
Closes PyCQA/pylint#4671
* Fix issues when inferring match variables
Closes PyCQA/pylint#4685
* Fix lookup for nested non-function scopes
* Fix issue that ``TypedDict`` instance wasn't callable.
Closes PyCQA/pylint#4715
* Add dependency on setuptools and a guard to prevent related exceptions.
What's New in astroid 2.6.2?
============================
Release date: 2021-06-30
* Fix a crash when the inference of the length of a node failed
Closes PyCQA/pylint#4633
* Fix unhandled StopIteration during inference, following the implementation
of PEP479 in python 3.7+
Closes PyCQA/pylint#4631
Closes #1080
What's New in astroid 2.6.1?
============================
Release date: 2021-06-29
* Fix issue with ``TypedDict`` for Python 3.9+
Closes PyCQA/pylint#4610
What's New in astroid 2.6.0?
============================
Release date: 2021-06-22
* Appveyor and travis are no longer used in the continuous integration
* ``setuptools_scm`` has been removed and replaced by ``tbump`` in order to not
have hidden runtime dependencies to setuptools
* ``NodeNg``, the base node class, is now accessible from ``astroid`` or
``astroid.nodes`` as it can be used for typing.
* Update enum brain to improve inference of .name and .value dynamic class
attributes
Closes PyCQA/pylint#1932
Closes PyCQA/pylint#2062
Closes PyCQA/pylint#2306
* Removed ``Repr``, ``Exec``, and ``Print`` nodes as the ``ast`` nodes
they represented have been removed with the change to Python 3
* Deprecate ``Ellipsis`` node. It will be removed with the next minor release.
Checkers that already support Python 3.8+ work without issues. It's only
necessary to remove all references to the ``astroid.Ellipsis`` node.
This changes will make development of checkers easier as the resulting tree for Ellipsis
will no longer depend on the python version. **Background**: With Python 3.8 the
``ast.Ellipsis`` node, along with ``ast.Str``, ``ast.Bytes``, ``ast.Num``,
and ``ast.NamedConstant`` were merged into ``ast.Constant``.
* Deprecated ``Index`` and ``ExtSlice`` nodes. They will be removed with the
next minor release. Both are now part of the ``Subscript`` node.
Checkers that already support Python 3.9+ work without issues.
It's only necessary to remove all references to the ``astroid.Index`` and
``astroid.ExtSlice`` nodes. This change will make development of checkers
easier as the resulting tree for ``ast.Subscript`` nodes will no longer
depend on the python version. **Background**: With Python 3.9 ``ast.Index``
and ``ast.ExtSlice`` were merged into the ``ast.Subscript`` node.
* Updated all Match nodes to be internally consistent.
* Add ``Pattern`` base class.
What's New in astroid 2.5.8?
============================
Release date: 2021-06-07
* Improve support for Pattern Matching
* Add lineno and col_offset for ``Keyword`` nodes and Python 3.9+
* Add global inference cache to speed up inference of long statement blocks
* Add a limit to the total number of nodes inferred indirectly as a result
of inferring some node
What's New in astroid 2.5.7?
============================
Release date: 2021-05-09
* Fix six.with_metaclass transformation so it doesn't break user defined transformations.
* Fix detection of relative imports.
Closes #930
Closes PyCQA/pylint#4186
* Fix inference of instance attributes defined in base classes
Closes #932
* Update `infer_named_tuple` brain to reject namedtuple definitions
that would raise ValueError
Closes #920
* Do not set instance attributes on builtin object()
Closes #945
Closes PyCQA/pylint#4232
Closes PyCQA/pylint#4221
Closes PyCQA/pylint#3970
Closes PyCQA/pylint#3595
* Fix some spurious cycles detected in ``context.path`` leading to more cases
that can now be inferred
Closes #926
* Add ``kind`` field to ``Const`` nodes, matching the structure of the built-in ast Const.
The kind field is "u" if the literal is a u-prefixed string, and ``None`` otherwise.
Closes #898
* Fix property inference in class contexts for properties defined on the metaclass
Closes #940
* Update enum brain to fix definition of __members__ for subclass-defined Enums
Closes PyCQA/pylint#3535
Closes PyCQA/pylint#4358
* Update random brain to fix a crash with inference of some sequence elements
Closes #922
* Fix inference of attributes defined in a base class that is an inner class
Closes #904
* Allow inferring a return value of None for non-abstract empty functions and
functions with no return statements (implicitly returning None)
Closes #485
* scm_setuptools has been added to the packaging.
* Astroid's tags are now the standard form ``vX.Y.Z`` and not ``astroid-X.Y.Z`` anymore.
* Add initial support for Pattern Matching in Python 3.10
What's New in astroid 2.5.6?
============================
Release date: 2021-04-25
* Fix retro-compatibility issues with old version of pylint
Closes PyCQA/pylint#4402
What's New in astroid 2.5.5?
============================
Release date: 2021-04-24
* Fixes the discord link in the project urls of the package.
Closes PyCQA/pylint#4393
What's New in astroid 2.5.4?
============================
Release date: 2021-04-24
* The packaging is now done via setuptools exclusively. ``doc``, ``tests``, and ``Changelog`` are
not packaged anymore - reducing the size of the package greatly.
* Debian packaging is now (officially) done in https://salsa.debian.org/python-team/packages/astroid.
* ``__pkginfo__`` now only contain ``__version__`` (also accessible with ``astroid.__version__``),
other meta-information are still accessible with ``import importlib;metadata.metadata('astroid')``.
* Added inference tip for ``typing.Tuple`` alias
* Fix crash when evaluating ``typing.NamedTuple``
Closes PyCQA/pylint#4383
* COPYING was removed in favor of COPYING.LESSER and the latter was renamed to LICENSE to make more apparent
that the code is licensed under LGPLv2 or later.
* Moved from appveyor and travis to Github Actions for continuous integration.
What's New in astroid 2.5.3?
============================
Release date: 2021-04-10
* Takes into account the fact that subscript inferring for a ClassDef may involve __class_getitem__ method
* Reworks the ``collections`` and ``typing`` brain so that pylint`s acceptance tests are fine.
Closes PyCQA/pylint#4206
* Use ``inference_tip`` for ``typing.TypedDict`` brain.
* Fix mro for classes that inherit from typing.Generic
* Add inference tip for typing.Generic and typing.Annotated with ``__class_getitem__``
Closes PyCQA/pylint#2822
What's New in astroid 2.5.2?
============================
Release date: 2021-03-28
* Detects `import numpy` as a valid `numpy` import.
Closes PyCQA/pylint#3974
* Iterate over ``Keywords`` when using ``ClassDef.get_children``
Closes PyCQA/pylint#3202
What's New in astroid 2.5.1?
============================
Release date: 2021-02-28
* The ``context.path`` is reverted to a set because otherwise it leads to false positives
for non `numpy` functions.
Closes #895 #899
* Don't transform dataclass ClassVars
* Improve typing.TypedDict inference
* Fix the `Duplicates found in MROs` false positive.
Closes #905
Closes PyCQA/pylint#2717
Closes PyCQA/pylint#3247
Closes PyCQA/pylint#4093
Closes PyCQA/pylint#4131
Closes PyCQA/pylint#4145
What's New in astroid 2.5?
============================
Release date: 2021-02-15
* Adds `attr_fset` in the `PropertyModel` class.
Fixes PyCQA/pylint#3480
* Remove support for Python 3.5.
* Remove the runtime dependency on ``six``. The ``six`` brain remains in
astroid.
Fixes PyCQA/astroid#863
* Enrich the ``brain_collection`` module so that ``__class_getitem__`` method is added to `deque` for
``python`` version above 3.9.
* The ``context.path`` is now a ``dict`` and the ``context.push`` method
returns ``True`` if the node has been visited a certain amount of times.
Close #669
* Adds a brain for type object so that it is possible to write `type[int]` in annotation.
Fixes PyCQA/pylint#4001
* Add ``__class_getitem__`` method to ``subprocess.Popen`` brain under Python 3.9 so that it is seen as subscriptable by pylint.
Fixes PyCQA/pylint#4034
* Adds `degrees`, `radians`, which are `numpy ufunc` functions, in the `numpy` brain. Adds `random` function in the `numpy.random` brain.
Fixes PyCQA/pylint#3856
* Fix deprecated importlib methods
Closes #703
* Fix a crash in inference caused by `Uninferable` container elements
Close #866
* Add `python 3.9` support.
* The flat attribute of ``numpy.ndarray`` is now inferred as an ``numpy.ndarray`` itself.
It should be a ``numpy.flatiter`` instance, but this class is not yet available in the numpy brain.
Fixes PyCQA/pylint#3640
* Fix a bug for dunder methods inference of function objects
Fixes #819
* Fixes a bug in the signature of the ``ndarray.__or__`` method,
in the ``brain_numpy_ndarray.py`` module.
Fixes #815
* Fixes a to-list cast bug in ``starred_assigned_stmts`` method, in the
``protocols.py`` module.
* Added a brain for ``hypothesis.strategies.composite``
* The transpose of a ``numpy.ndarray`` is also a ``numpy.ndarray``
Fixes PyCQA/pylint#3387
* Added a brain for ``sqlalchemy.orm.session``
* Separate string and bytes classes patching
Fixes PyCQA/pylint#3599
* Prevent recursion error for self referential length calls
Close #777
* Added missing methods to the brain for ``mechanize``, to fix pylint false positives
Close #793
* Added more supported parameters to ``subprocess.check_output``
* Fix recursion errors with pandas
Fixes PyCQA/pylint#2843
Fixes PyCQA/pylint#2811
* Added exception inference for `UnicodeDecodeError`
Close PyCQA/pylint#3639
* `FunctionDef.is_generator` properly handles `yield` nodes in `If` tests
Close PyCQA/pylint#3583
* Fixed exception-chaining error messages.
* Fix failure to infer base class type with multiple inheritance and qualified names
Fixes #843
* Fix interpretation of ``six.with_metaclass`` class definitions.
Fixes #713
* Reduce memory usage of astroid's module cache.
* Remove dependency on `imp`.
Close #594
Close #681
* Do not crash when encountering starred assignments in enums.
Close #835
* Fix a crash in functools.partial inference when the arguments cannot be determined
Close PyCQA/pylint#3776
* Fix a crash caused by a lookup of a monkey-patched method
Close PyCQA/pylint#3686
* ``is_generator`` correctly considers `Yield` nodes in `AugAssign` nodes
This fixes a false positive with the `assignment-from-no-return` pylint check.
Close PyCQA/pylint#3904
* Corrected the parent of function type comment nodes.
These nodes used to be parented to their original ast.FunctionDef parent
but are now correctly parented to their astroid.FunctionDef parent.
Close PyCQA/astroid#851
What's New in astroid 2.4.2?
============================
Release date: 2020-06-08
* `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests
Close PyCQA/pylint#3519
* Properly construct the arguments of infered property descriptors
Close PyCQA/pylint#3648
What's New in astroid 2.4.1?
============================
Release date: 2020-05-05
* Handle the case where the raw builder fails to retrieve the ``__all__`` attribute
Close #772
* Restructure the AST parsing heuristic to always pick the same module
Close PyCQA/pylint#3540
Close #773
* Changed setup.py to work with [distlib](https://pypi.org/project/distlib)
Close #779
* Do not crash with SyntaxError when parsing namedtuples with invalid label
Close PyCQA/pylint#3549
* Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()`
Close PyCQA/pylint#3529
What's New in astroid 2.4.0?
============================
Release date: 2020-04-27
* Expose a ast_from_string method in AstroidManager, which will accept
source code as a string and return the corresponding astroid object
Closes PyCQA/astroid#725
* ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__``
Close PyCQA/pylint#2335
* Allow slots added dynamically to a class to still be inferred
Close PyCQA/pylint#2334
* Allow `FunctionDef.getattr` to look into both instance attrs and special attributes
Close PyCQA/pylint#1078
* Infer qualified ``classmethod`` as a classmethod.
Close PyCQA/pylint#3417
* Prevent a recursion error to happen when inferring the declared metaclass of a class
Close #749
* Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name
Close PyCQA/pylint#2991
* Prevent a recursion error for self reference variables and `type()` calls.
Close #199
* Do not infer the first argument of a staticmethod in a metaclass as the class itself
Close PyCQA/pylint#3032
* ``NodeNG.bool_value()`` gained an optional ``context`` parameter
We need to pass an inference context downstream when inferring the boolean
value of a node in order to prevent recursion errors and double inference.
This fix prevents a recursion error with dask library.
Close PyCQA/pylint#2985
* Pass a context argument to ``astroid.Arguments`` to prevent recursion errors
Close PyCQA/pylint#3414
* Better inference of class and static methods decorated with custom methods
Close PyCQA/pylint#3209
* Reverse the order of decorators for `infer_subscript`
`path_wrapper` needs to come first, followed by `raise_if_nothing_inferred`,
otherwise we won't handle `StopIteration` correctly.
Close #762
* Prevent a recursion error when inferring self-referential variables without definition
Close PyCQA/pylint#1285
* Numpy `datetime64.astype` return value is inferred as a `ndarray`.
Close PyCQA/pylint#3332
* Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation
Closes PyCQA/pylint#3365
* Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``.
Close PyCQA/pylint#3322
* Added a call to ``register_transform`` for all functions of the ``brain_numpy_core_multiarray``
module in case the current node is an instance of ``astroid.Name``
Close #666
* Use the parent of the node when inferring aug assign nodes instead of the statement
Close PyCQA/pylint#2911
Close PyCQA/pylint#3214
* Added some functions to the ``brain_numpy_core_umath`` module
Close PyCQA/pylint#3319
* Added some functions of the ``numpy.core.multiarray`` module
Close PyCQA/pylint#3208
* All the ``numpy ufunc`` functions derived now from a common class that
implements the specific ``reduce``, ``accumulate``, ``reduceat``,
``outer`` and ``at`` methods.
Close PyCQA/pylint#2885
* ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings
Close PyCQA/pylint#3306
* The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray``
Close PyCQA/pylint#3139
* Don't ignore special methods when inspecting gi classes
Close #728
* Added transform for ``scipy.gaussian``
* Add suport for inferring properties.
* Added a brain for ``responses``
* Allow inferring positional only arguments.
* Retry parsing a module that has invalid type comments
It is possible for a module to use comments that might be interpreted
as type comments by the `ast` library. We do not want to completely crash on those
invalid type comments.
Close #708
* Scope the inference to the current bound node when inferring instances of classes
When inferring instances of classes from arguments, such as ``self``
in a bound method, we could use as a hint the context's ``boundnode``,
which indicates the instance from which the inference originated.
As an example, a subclass that uses a parent's method which returns
``self``, will override the ``self`` to point to it instead of pointing
to the parent class.
Close PyCQA/pylint#3157
* Add support for inferring exception instances in all contexts
We were able to infer exception instances as ``ExceptionInstance``
only for a handful of cases, but not all. ``ExceptionInstance`` has
support for better inference of `.args` and other exception related
attributes that normal instances do not have.
This additional support should remove certain false positives related
to ``.args`` and other exception attributes in ``pylint``.
Close PyCQA/pylint#2333
* Add more supported parameters to ``subprocess.check_output``
Close #722
* Infer args unpacking of ``self``
Certain stdlib modules use ``*args`` to encapsulate
the ``self`` parameter, which results in uninferable
instances given we rely on the presence of the ``self``
argument to figure out the instance where we should be
setting attributes.
Close PyCQA/pylint#3216
* Clean up setup.py
Make pytest-runner a requirement only if running tests, similar to what was
done with McCabe.
Clean up the setup.py file, resolving a handful of minor warnings with it.
* Handle StopIteration error in infer_int.
Close PyCQA/pylint#3274
* Can access per argument type comments for positional only and keyword only arguments.
The comments are accessed through through the new
``Arguments.type_comment_posonlyargs`` and
``Arguments.type_comment_kwonlyargs`` attributes respectively.
* Relax upper bound on `wrapt`
Close #755
* Properly analyze CFFI compiled extensions.
What's New in astroid 2.3.2?
============================
Release date: 2019-10-18
* All type comments have as parent the corresponding `astroid` node
Until now they had as parent the builtin `ast` node which meant
we were operating with primitive objects instead of our own.
Close PyCQA/pylint#3174
* Pass an inference context to `metaclass()` when inferring an object type
This should prevent a bunch of recursion errors happening in pylint.
Also refactor the inference of `IfExp` nodes to use separate contexts
for each potential branch.
Close PyCQA/pylint#3152
Close PyCQA/pylint#3159
What's New in astroid 2.3.1?
============================
Release date: 2019-09-30
* A transform for the builtin `dataclasses` module was added.
This should address various `dataclasses` issues that were surfaced
even more after the release of pylint 2.4.0.
In the previous versions of `astroid`, annotated assign nodes were
allowed to be retrieved via `getattr()` but that no longer happens
with the latest `astroid` release, as those attribute are not actual
attributes, but rather virtual ones, thus an operation such as `getattr()`
does not make sense for them.
* Update attr brain to partly understand annotated attributes
Close #656
What's New in astroid 2.3.0?
============================
Release date: 2019-09-24
* Add a brain tip for ``subprocess.check_output``
Close #689
* Remove NodeNG.nearest method because of lack of usage in astroid and pylint.
Close #691
* Allow importing wheel files. Close #541
* Annotated AST follows PEP8 coding style when converted to string.
* Fix a bug where defining a class using type() could cause a DuplicateBasesError.
Close #644
* Dropped support for Python 3.4.
* Numpy brain support is improved.
Numpy's fundamental type ``numpy.ndarray`` has its own brain : ``brain_numpy_ndarray`` and
each numpy module that necessitates brain action has now its own numpy brain :
- ``numpy.core.numeric``
- ``numpy.core.function_base``
- ``numpy.core.multiarray``
- ``numpy.core.numeric``
- ``numpy.core.numerictypes``
- ``numpy.core.umath``
- ``numpy.random.mtrand``
Close PyCQA/pylint#2865
Close PyCQA/pylint#2747
Close PyCQA/pylint#2721
Close PyCQA/pylint#2326
Close PyCQA/pylint#2021
* ``assert`` only functions are properly inferred as returning ``None``
Close #668
* Add support for Python 3.8's `NamedExpr` nodes, which is part of assignment expressions.
Close #674
* Added support for inferring `IfExp` nodes.
* Instances of exceptions are inferred as such when inferring in non-exception context
This allows special inference support for exception attributes such as `.args`.
Close PyCQA/pylint#2333
* Drop a superfluous and wrong callcontext when inferring the result of a context manager
Close PyCQA/pylint#2859
* ``igetattr`` raises ``InferenceError`` on re-inference of the same object
This prevents ``StopIteration`` from leaking when we encounter the same
object in the current context, which could result in various ``RuntimeErrors``
leaking in other parts of the inference.
Until we get a global context per inference, the solution is sort of a hack,
as with the suggested global context improvement, we could theoretically
reuse the same inference object.
Close #663
* Variable annotations can no longer be retrieved with `ClassDef.getattr`
Unless they have an attached value, class variable annotations can no longer
be retrieved with `ClassDef.getattr.`
* Improved builtin inference for ``tuple``, ``set``, ``frozenset``, ``list`` and ``dict``
We were properly inferring these callables *only* if they had consts as
values, but that is not the case most of the time. Instead we try to infer
the values that their arguments can be and use them instead of assuming
Const nodes all the time.
Close PyCQA/pylint#2841
* The last except handler wins when inferring variables bound in an except handler.
Close PyCQA/pylint#2777
* ``threading.Lock.locked()`` is properly recognized as a member of ``threading.Lock``
Close PyCQA/pylint#2791
* Fix recursion error involving ``len`` and self referential attributes
Close PyCQA/pylint#2736
Close PyCQA/pylint#2734
Close PyCQA/pylint#2740