From 59f0be790b75ed6cc5efd40a68b1ae16ab0a1b57 Mon Sep 17 00:00:00 2001 From: hippo91 Date: Sun, 5 Jan 2020 11:40:20 +0100 Subject: Add a call to register_transform for each numpy function in case the current node is an astroid.Name instance The problem was that astroid could not infer the result of a call to `numpy.append` because this function calls the `concatenate` function. This last function is inferred thanks to the `brain_numpy_core_multiarray` module but only when the corresponding node is an `astroid.Attribute` (for example numpy.concatenate). It turns out that in the source of the append function the node that realises the call to concatenate is a `astroid.Name`. Thus the correction proposed here is to register the concatenate inference tip function in order to apply it, also, to `astroid.Name`. Close #666 --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ea5a838d..e1419a79 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,12 @@ What's New in astroid 2.4.0? ============================ Release Date: TBA + +* 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 + * Added some functions to the ``brain_numpy_core_umath`` module Close PyCQA/pylint#3319 -- cgit v1.2.1 From 631539e8ca8cbdb73b1c8655214de10bdd51e466 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Sun, 5 Jan 2020 13:35:28 +0100 Subject: Use the parent of the node when inferring aug assign nodes instead of the statement In 19b5af02304e3339fdd2a26cfafc337960eeebce we added a check for `AugAssign` nodes when inferring `Assign` values. Unfortunately the `infer_assign` function was also used by `infer_assignname`, which meant that when trying to infer an `AssignName` node, we were inferring its value as the result of the `AugAssign` inference, leading to spurious false positives. Close PyCQA/pylint#2911 Close PyCQA/pylint#3214 --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index e1419a79..c54d321a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,6 +12,11 @@ Release Date: TBA 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 -- cgit v1.2.1 From 061aaebea2be2d21831ef687cc4ba4a25d953c65 Mon Sep 17 00:00:00 2001 From: Ashley Whetter Date: Sat, 11 Jan 2020 14:23:30 -0800 Subject: Can access positional only and keyword only argument type comments --- ChangeLog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index c54d321a..3949fe26 100644 --- a/ChangeLog +++ b/ChangeLog @@ -106,6 +106,12 @@ Release Date: TBA 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. + What's New in astroid 2.3.2? ============================ Release Date: TBA -- cgit v1.2.1 From f8b779752327879536173eec33bdac347a465c34 Mon Sep 17 00:00:00 2001 From: hippo91 Date: Mon, 10 Feb 2020 08:38:06 +0100 Subject: Make imag and real attributes numpy.ndarray Close PyCQA/pylint#3322 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 3949fe26..873b0a3f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,10 @@ What's New in astroid 2.4.0? Release Date: TBA +* 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`` -- cgit v1.2.1 From 78e56c64cb016e372a5ae017798ebd7cf83e1f26 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Mon, 10 Feb 2020 09:33:35 +0100 Subject: Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation Closes PyCQA/pylint#3365 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 873b0a3f..ebb90a5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,10 @@ What's New in astroid 2.4.0? Release Date: TBA +* 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 -- cgit v1.2.1 From 027300da624f16a37717c379d1831b44ee7586f6 Mon Sep 17 00:00:00 2001 From: hippo91 Date: Mon, 10 Feb 2020 12:09:34 +0100 Subject: numpy.astype now returns a ndarray object This fixes PyCQA/pylint#3332. The bug was due to the fact that datetime64 class inherited from generic one and in this last class the astype method was returning uninferable. Now it returns ndarray object. This fix should be generalized to all other methods of the generic class as the numpy doc specifies that the generic object API should be the same as the ndarray one. --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ebb90a5d..c42d122e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ What's New in astroid 2.4.0? ============================ Release Date: TBA +* Numpy `datetime64.astype` return value is inferred as a `ndarray`. + + Close PyCQA/pylint#3332 * Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation -- cgit v1.2.1 From 597c044378bdcac0e02205e151f180f85a40a729 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 27 Feb 2020 08:33:48 +0000 Subject: Relax upper bound on `wrapt` (#756) Closes PyCQA/astroid#755 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index c42d122e..1ca51f73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -123,6 +123,10 @@ Release Date: TBA ``Arguments.type_comment_posonlyargs`` and ``Arguments.type_comment_kwonlyargs`` attributes respectively. +* Relax upper bound on `wrapt` + + Close #755 + What's New in astroid 2.3.2? ============================ Release Date: TBA -- cgit v1.2.1 From 5bde219644af11bc44458b95443974fa50958e95 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 27 Feb 2020 10:24:42 +0100 Subject: Infer qualified ``classmethod`` as a classmethod. (#759) Close PyCQA/pylint#3417 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 1ca51f73..0580a146 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ What's New in astroid 2.4.0? ============================ Release Date: TBA +* Infer qualified ``classmethod`` as a classmethod. + + Close PyCQA/pylint#3417 + * Numpy `datetime64.astype` return value is inferred as a `ndarray`. Close PyCQA/pylint#3332 -- cgit v1.2.1 From 9543362a3cf0a034c5d2c9e78149c7bf84c89c17 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Mon, 2 Mar 2020 10:38:34 +0100 Subject: Pass a context argument to ``astroid.Arguments`` to prevent recursion errors Close PyCQA/pylint#3414 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 0580a146..9cef7b94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ Release Date: TBA Close PyCQA/pylint#3417 +* Pass a context argument to ``astroid.Arguments`` to prevent recursion errors + + Close PyCQA/pylint#3414 + * Numpy `datetime64.astype` return value is inferred as a `ndarray`. Close PyCQA/pylint#3332 -- cgit v1.2.1 From 627886c1c8b770d04648bab3ea2168c10f39d816 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 3 Mar 2020 09:13:14 +0100 Subject: Better inference of class and static methods decorated with custom methods Close PyCQA/pylint#3209 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 9cef7b94..117f7a08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ Release Date: TBA Close PyCQA/pylint#3414 +* Better inference of class and static methods decorated with custom methods + + Close PyCQA/pylint#3209 + * Numpy `datetime64.astype` return value is inferred as a `ndarray`. Close PyCQA/pylint#3332 -- cgit v1.2.1 From 0a8a75db30da060a24922e05048bc270230f5bad Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 5 Mar 2020 09:08:14 +0100 Subject: 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 --- ChangeLog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 117f7a08..cf25e0d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,13 @@ Release Date: TBA 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 + * Numpy `datetime64.astype` return value is inferred as a `ndarray`. Close PyCQA/pylint#3332 -- cgit v1.2.1 From 5f0675c41ff8c463ab0d657fb6756aa9679cffbf Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 5 Mar 2020 10:03:35 +0100 Subject: ``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 --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index cf25e0d7..75a9b99b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,15 @@ Release Date: TBA Close PyCQA/pylint#3417 +* ``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 -- cgit v1.2.1 From 555085e0bd850c5381e29d15294cd37287f79bd6 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 5 Mar 2020 10:28:34 +0100 Subject: Prevent a recursion error when inferring self-referential variables without definition Close PyCQA/pylint#1285 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 75a9b99b..2e712db2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,10 @@ Release Date: TBA 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 -- cgit v1.2.1 From 7120d894635662d49b05c0cc5d664b5a25544605 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 6 Mar 2020 13:21:12 +0100 Subject: Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name If `Module.getattr` received an empty string (as a result of inference for example), `astroid` would have returned the same Module again, which leads to false positives in pylint, since the expected output was of a different type. Rather than allowing empty names to pass through `getattr()`, we simply raise an error earlier. Close PyCQA/pylint#2991 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 2e712db2..7485f123 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ Release Date: TBA Close PyCQA/pylint#3417 +* Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name + + Close PyCQA/pylint#2991 + * ``NodeNG.bool_value()`` gained an optional ``context`` parameter We need to pass an inference context downstream when inferring the boolean -- cgit v1.2.1 From 04f5853b42f3c886fc7a3b553e32f1d1bf21419b Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Sat, 7 Mar 2020 16:54:59 +0100 Subject: Do not infer the first argument of a staticmethod in a metaclass as the class itself Close PyCQA/pylint#3032 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 7485f123..d9708b07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ Release Date: TBA Close PyCQA/pylint#2991 +* 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 -- cgit v1.2.1 From 00bcf7b817ed459ee617b8af8843aca18d72fe04 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Sat, 7 Mar 2020 17:22:47 +0100 Subject: Prevent a recursion error to happen when inferring the declared metaclass of a class Close #749 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d9708b07..884e83b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,10 @@ Release Date: TBA 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 -- cgit v1.2.1 From 8b80e9b07e0c3f9b34c5a99fba3286ee78c1fb75 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 10 Mar 2020 10:51:25 +0100 Subject: Prevent a recursion error for self reference variables and `type()` calls. The recursion error was caused by inferring the bases of the generated `B` class multiple times. The solution uses the new `EvaluatedObject` class to stop the inference by inferring the base classes in the `type` inference function. Close #199 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 884e83b2..ce1753a0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,10 @@ Release Date: TBA 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 -- cgit v1.2.1 From 3a075c0205a717bbd68562da5017992c430549d3 Mon Sep 17 00:00:00 2001 From: Anubhav <35621759+anubh-v@users.noreply.github.com> Date: Wed, 11 Mar 2020 21:04:40 +0800 Subject: Add a new ast_from_string method to AstroidManager Close #725 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ce1753a0..409d9c68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,10 @@ What's New in astroid 2.4.0? ============================ Release Date: TBA +* 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 * Infer qualified ``classmethod`` as a classmethod. Close PyCQA/pylint#3417 -- cgit v1.2.1 From ab9d147d71c3dff39972b7d2173aa66a616ff5b7 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 13 Mar 2020 11:52:11 +0100 Subject: Allow slots added dynamically to a class to still be inferred In 2aa27e9aed6ffcba4a61655e291e852ecd001549 `ClassDef.igetattr` was modified to only grab the first item from the result of `getattr`, in order to avoid looking up attributes in the ancestors path when inferring attributes for a given class. This had the side effect that we'd omit attribute definitions happening in the same scope, such as augmented assignments, which in turn might have affected other capabilities, such as slots inference. This commit changes the approach a bit and keeps all attributes as long as all of them are from the same class (be it current or an ancestor) Close PyCQA/pylint#2334 --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 409d9c68..e2eaa9e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,11 @@ Release Date: TBA source code as a string and return the corresponding astroid object Closes PyCQA/astroid#725 + +* Allow slots added dynamically to a class to still be inferred + + Close PyCQA/pylint#2334 + * Infer qualified ``classmethod`` as a classmethod. Close PyCQA/pylint#3417 -- cgit v1.2.1 From 76fd7aa73cfbe650c97bf6828adb7e39490c3e99 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 26 Mar 2020 09:26:00 +0100 Subject: Allow `FunctionDef.getattr` to look into both instance attrs and special attributes Modifying an attribute of a function with an augmented assignment resulted in `FunctionDef.getattr` to prioritize the instance attributes fetching. This means that only the augmented assignment modification would have been visible. Close PyCQA/pylint#1078 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index e2eaa9e0..78af48d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,10 @@ Release Date: TBA 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 -- cgit v1.2.1 From f62be0a2d52b2ba01010cecc372fceb821528091 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 26 Mar 2020 10:05:56 +0100 Subject: ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__`` Close PyCQA/pylint#2335 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 78af48d9..515fd656 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,10 @@ Release Date: TBA 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 -- cgit v1.2.1 From 2da60a08de6f146f5dff78db3d01bee10ed375dc Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Tue, 31 Mar 2020 15:00:14 +0200 Subject: Inspect compiled CFFI extension members To use a CFFI extension, its "lib" symbol gives access to the exported C symbols and its "ffi" symbol gives access to low-level utilities. An import such as the following is required: from _compiled_extension_module import ffi from _compiled_extension_module import lib Then in the code, these objects are used to access the C symbols: pp = ffi.cast('struct mystruct *', p) lib.exported_c_function(pp) Even if "_compiled_extension_module" is added to AstroidManager.extension_package_whitelist, the "ffi" and "lib" objects are not analyzed properly since they do not fall into any of the supported categories of objects. A dummy "builtin.module" node is inserted in their place preventing tools like pylint to properly detect object membership. Thus producing invalid errors: Instance of 'module' has no 'cast' member [no-member] Instance of 'module' has no 'exported_c_function' member [no-member] Both these objects define __all__ attributes which lists their exported symbols. The presence of __all__ means that dir(member) will work and that object_build may be called recursively on that member. Insert a Module node to represent these objects and add their members to the built AST. Link: https://cffi.readthedocs.io/en/latest/overview.html#main-mode-of-usage Signed-off-by: Robin Jarry --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 515fd656..9b400d5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -192,6 +192,8 @@ Release Date: TBA Close #755 +* Properly analyze CFFI compiled extensions. + What's New in astroid 2.3.2? ============================ Release Date: TBA -- cgit v1.2.1 From 6c8bfb4b7fb5366a3facfc08020c68ac426b9a8d Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Mon, 27 Apr 2020 10:49:40 +0200 Subject: Prepare 2.4.0 release of astroid --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 9b400d5f..272fd8f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ astroid's ChangeLog What's New in astroid 2.4.0? ============================ -Release Date: TBA +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 -- cgit v1.2.1 From 7e171621e624f1bee5bd93b361d29b443c6a5820 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 28 Apr 2020 08:52:41 +0200 Subject: master is now 2.5.0 --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 272fd8f1..93beac0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ astroid's ChangeLog =================== +What's New in astroid 2.5.0? +============================ +Release Date: TBA + + What's New in astroid 2.4.0? ============================ Release Date: 2020-04-27 -- cgit v1.2.1 From 5e7aed79bf8104f53849b9126cb3ec1329634ce4 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 28 Apr 2020 08:35:15 +0200 Subject: Handle the case where the raw builder fails to retrieve the ``__all__`` attribute PyQT does something special with their objects and retrieving some of them (such as `__all__`) at runtime results in a RuntimeError. This patch simply swallows all the exceptions that accessing `__all__` might raise. Close #772 --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 93beac0b..d85874b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,11 +2,21 @@ astroid's ChangeLog =================== + What's New in astroid 2.5.0? ============================ Release Date: TBA +What's New in astroid 2.4.1? +============================ +Release Date: TBA + +* Handle the case where the raw builder fails to retrieve the ``__all__`` attribute + + Close #772 + + What's New in astroid 2.4.0? ============================ Release Date: 2020-04-27 -- cgit v1.2.1 From f3d4139a0375149f09a5672420e9a34347ff4bd8 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Wed, 29 Apr 2020 08:51:27 +0200 Subject: Restructure the AST parsing heuristic to always pick the same module When a file contained a misplaced type annotation, we were retrying the parsing without type comments support. That second parsing was using the builtin ast module, but the rest of the tree utilities (the builder and rebuilder) were not aware of the new parsing module that was used to build the AST nodes a second time. This commit moves the logic of picking the parsing module and the corresponding AST node mapping in a single place, which can be used by both the builder and the rebuilder. Close PyCQA/pylint#3540 Close #773 --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d85874b6..9f428adc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,6 +16,11 @@ Release Date: TBA Close #772 +* Restructure the AST parsing heuristic to always pick the same module + + Close PyCQA/pylint#3540 + Close #773 + What's New in astroid 2.4.0? ============================ -- cgit v1.2.1 From b02f70a25ca89a3a43686b872831660d49bff84e Mon Sep 17 00:00:00 2001 From: Colin Kennedy Date: Thu, 30 Apr 2020 23:03:51 -0700 Subject: Changed `python_requires` to use ">=" syntax (#780) Closes #779 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 9f428adc..e604b601 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,10 @@ Release Date: TBA Close PyCQA/pylint#3540 Close #773 +* Changed setup.py to work with [distlib](https://pypi.org/project/distlib) + + Close #779 + What's New in astroid 2.4.0? ============================ -- cgit v1.2.1 From e40ac59e470d7166369732f84b8ae7ce9164b0a3 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 1 May 2020 08:22:28 +0200 Subject: Do not crash with SyntaxError when parsing namedtuples with invalid label Close PyCQA/pylint#3549 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index e604b601..3d6cca22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,10 @@ Release Date: TBA Close #779 +* Do not crash with SyntaxError when parsing namedtuples with invalid label + + Close PyCQA/pylint#3549 + What's New in astroid 2.4.0? ============================ -- cgit v1.2.1 From 6aae91559d29acd3042e1fd26e0d111261521010 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 1 May 2020 17:59:20 +0200 Subject: Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()` (#782) ``infer_call_result`` can raise InferenceError but we were not handling that when retrieving objects from the Super instance. Close PyCQA/pylint#3529 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 3d6cca22..31f77da7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,10 @@ Release Date: TBA 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? ============================ -- cgit v1.2.1 From 681336416aeea229d6bfdf32f70e781049c92065 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 5 May 2020 09:36:38 +0200 Subject: Released 2.4.1 --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 31f77da7..0214e36b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,7 @@ Release Date: TBA What's New in astroid 2.4.1? ============================ -Release Date: TBA +Release Date: 2020-05-05 * Handle the case where the raw builder fails to retrieve the ``__all__`` attribute -- cgit v1.2.1 From e53bfcb602114179bc3b0d4e1db7a5d155152d25 Mon Sep 17 00:00:00 2001 From: Stefan Scherfke Date: Sun, 10 May 2020 21:42:12 +0200 Subject: Add brain for sqlalchemy.orm.session --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 0214e36b..63edff03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ What's New in astroid 2.5.0? ============================ Release Date: TBA +* Added a brain for ``sqlalchemy.orm.session`` + What's New in astroid 2.4.1? ============================ -- cgit v1.2.1 From 6484b53c73b68969113acd502e091f935f29af07 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 12 May 2020 08:31:49 +0200 Subject: `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests Close PyCQA/pylint#3519 --- ChangeLog | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 63edff03..0c790f5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,16 @@ Release Date: TBA * Added a brain for ``sqlalchemy.orm.session`` + +What's New in astroid 2.4.2? +============================ +Release Date: TBA + +* `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests + + Close PyCQA/pylint#3519 + + What's New in astroid 2.4.1? ============================ Release Date: 2020-05-05 -- cgit v1.2.1 From 6318bf32ebd25e21f1f88a338d3e0284fff34c5d Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Tue, 26 May 2020 10:49:16 +0300 Subject: Note the added parameters for subprocess.check_output(). --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 0c790f5c..ece72761 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ Release Date: TBA * Added a brain for ``sqlalchemy.orm.session`` +* Added more supported parameters to ``subprocess.check_output`` + What's New in astroid 2.4.2? -- cgit v1.2.1 From b339a0ee17c15f7be23dee0c981edf64f0e65f33 Mon Sep 17 00:00:00 2001 From: Peter Kolbus Date: Thu, 28 May 2020 01:18:35 -0500 Subject: brain_mechanize: Add missing methods to transform (#794) The brain transform for mechanize was missing most methods for the Browser class, leading to false positives in pylint, such as: E1101: Instance of 'Browser' has no 'select_form' member (no-member) E1137: 'browser' does not support item assignment (unsupported-assignment-operation) Add missing methods to align with mechanize 0.4.5. Fixes #793. Co-authored-by: Claudiu Popa --- ChangeLog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index ece72761..65d5732a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,8 +9,11 @@ Release Date: TBA * Added a brain for ``sqlalchemy.orm.session`` -* Added more supported parameters to ``subprocess.check_output`` +* Added missing methods to the brain for ``mechanize``, to fix pylint false positives + + Close #793 +* Added more supported parameters to ``subprocess.check_output`` What's New in astroid 2.4.2? -- cgit v1.2.1 From 340649c52488c858c592a17f680992efe16dc41b Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Thu, 28 May 2020 08:49:13 +0200 Subject: Properly construct the arguments of infered property descriptors (#796) Close PyCQA/pylint#3648 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 65d5732a..d9e6b980 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,10 @@ Release Date: TBA Close PyCQA/pylint#3519 +* Properly construct the arguments of infered property descriptors + + Close PyCQA/pylint#3648 + What's New in astroid 2.4.1? ============================ -- cgit v1.2.1 From 765c67ff019eb5f3e91e308bcd102ce0b52e6c6a Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Fri, 29 May 2020 08:18:09 +0200 Subject: Add exception inference for `UnicodeDecodeError` (#797) Close PyCQA/pylint#3639 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d9e6b980..858c1195 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,10 @@ Release Date: TBA * Added more supported parameters to ``subprocess.check_output`` +* Added exception inference for `UnicodeDecodeError` + + Close PyCQA/pylint#3639 + What's New in astroid 2.4.2? ============================ -- cgit v1.2.1 From ca821aacd3d27b118781de77463238aa58f1f3ca Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Mon, 8 Jun 2020 08:47:45 +0200 Subject: Prepare 2.4.2 --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 858c1195..b407e6ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,7 +22,7 @@ Release Date: TBA What's New in astroid 2.4.2? ============================ -Release Date: TBA +Release Date: 2020-06-08 * `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests -- cgit v1.2.1 From 1cf413ff986cf464202a07df60e7bd54695ed0e0 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 9 Jun 2020 22:02:48 +0200 Subject: `FunctionDef.is_generator` properly handles `yield` nodes in `If` tests (#799) Close PyCQA/pylint#3583 --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index b407e6ed..5e6a8a03 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,10 @@ Release Date: TBA Close PyCQA/pylint#3639 +* `FunctionDef.is_generator` properly handles `yield` nodes in `If` tests + + Close PyCQA/pylint#3583 + What's New in astroid 2.4.2? ============================ -- cgit v1.2.1 From 66df7641a8ebce0da8b0023b7053b1c53e916372 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Tue, 16 Jun 2020 09:12:43 +0200 Subject: Fix a crash caused by a lookup of a monkey-patched method (#803) Close PyCQA/pylint#3686 --- ChangeLog | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 5e6a8a03..cb92a70d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,15 @@ Release Date: TBA Close PyCQA/pylint#3583 +What's New in astroid 2.4.3? +============================ +Release Date: TBA + +* Fix a crash caused by a lookup of a monkey-patched method + + Close PyCQA/pylint#3686 + + What's New in astroid 2.4.2? ============================ Release Date: 2020-06-08 -- cgit v1.2.1