Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update astroid to 2.4.1 #137

Merged
merged 1 commit into from
May 28, 2020
Merged

Update astroid to 2.4.1 #137

merged 1 commit into from
May 28, 2020

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented May 5, 2020

This PR updates astroid from 2.3.3 to 2.4.1.

Changelog

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/pylint3540
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/pylint3549

* Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()`

Close PyCQA/pylint3529

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/astroid725

* ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__``

Close PyCQA/pylint2335

* Allow slots added dynamically to a class to still be inferred

Close PyCQA/pylint2334

* Allow `FunctionDef.getattr` to look into both instance attrs and special attributes

Close PyCQA/pylint1078

* Infer qualified ``classmethod`` as a classmethod.

Close PyCQA/pylint3417

* 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/pylint2991

* 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/pylint3032

* ``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/pylint2985

* Pass a context argument to ``astroid.Arguments`` to prevent recursion errors

Close PyCQA/pylint3414

* Better inference of class and static methods decorated with custom methods

Close PyCQA/pylint3209

* 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/pylint1285

* Numpy `datetime64.astype` return value is inferred as a `ndarray`.

Close PyCQA/pylint3332

* Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation

Closes PyCQA/pylint3365

* Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``.

Close PyCQA/pylint3322

* 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/pylint2911
Close PyCQA/pylint3214

* Added some functions to the ``brain_numpy_core_umath`` module

Close PyCQA/pylint3319

* Added some functions of the ``numpy.core.multiarray`` module

Close PyCQA/pylint3208

* All the ``numpy ufunc`` functions derived now from a common class that
implements the specific ``reduce``, ``accumulate``, ``reduceat``,
 ``outer`` and ``at`` methods.

Close PyCQA/pylint2885

* ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings

Close PyCQA/pylint3306

* The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray``

Close PyCQA/pylint3139

* 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/pylint3157

* 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/pylint2333

* 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/pylint3216

* 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/pylint3274

* 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.
Links

@pyup-bot pyup-bot mentioned this pull request May 5, 2020
@codecov
Copy link

codecov bot commented May 5, 2020

Codecov Report

Merging #137 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #137   +/-   ##
=======================================
  Coverage   26.07%   26.07%           
=======================================
  Files          15       15           
  Lines        4430     4430           
=======================================
  Hits         1155     1155           
  Misses       3275     3275           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fa315d1...b49ffaf. Read the comment docs.

@YourLocalBlake
Copy link
Member

bors r+

@YourLocalBlake
Copy link
Member

circleci will fail because of synphot not being able to be built from wheels.

@bors
Copy link
Contributor

bors bot commented May 28, 2020

Build succeeded:

@bors bors bot merged commit 80d8fed into master May 28, 2020
@YourLocalBlake YourLocalBlake deleted the pyup-update-astroid-2.3.3-to-2.4.1 branch June 6, 2020 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants