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 dependency astroid to v2.5.7 #16

Merged
merged 1 commit into from
Jun 4, 2021
Merged

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jun 4, 2021

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
astroid ==2.0.4 -> ==2.5.7 age adoption passing confidence

Release Notes

PyCQA/astroid

v2.5.7

Compare Source

============================
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

v2.5.6

Compare Source

============================
Release Date: 2021-04-25

v2.5.5

Compare Source

============================
Release Date: 2021-04-24

v2.5.4

Compare Source

============================
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.

v2.5.3

Compare Source

============================
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

v2.5.2

Compare Source

============================
Release Date: 2021-03-28

v2.5.1

Compare Source

============================
Release Date: 2021-02-28

v2.5

Compare Source

============================
Release Date: TBA

v2.4.2

Compare Source

============================
Release Date: 2020-06-08

v2.4.1

Compare Source

============================
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

    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

v2.4.0

Compare Source

============================
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 #​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.

v2.3.3

Compare Source

v2.3.2

Compare Source

============================
Release Date: TBA

  • 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

v2.3.1

Compare Source

============================
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

v2.3.0

Compare Source

============================
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

  • Can access per argument type comments through new Arguments.type_comment_args attribute.

    Close #​665

  • Fix being unable to access class attributes on a NamedTuple.

    Close PyCQA/pylint#​1628

  • Fixed being unable to find distutils submodules by name when in a virtualenv.

    Close PyCQA/pylint#​73

v2.2.5

Compare Source

v2.2.4

Compare Source

v2.2.1

Compare Source

v2.2.0

Compare Source

============================
Release Date: 2019-02-27

  • Fix a bug concerning inference of calls to numpy function that should not return Tuple or List instances.

Close PyCQA/pylint#​2436

  • Fix a bug where a method, which is a lambda built from a function, is not inferred as BoundMethod

    Close PyCQA/pylint#​2594

  • typed_ast gets installed for Python 3.7, meaning type comments can now work on 3.7.

  • Fix a bug concerning inference of unary operators on numpy types.

    Close PyCQA/pylint#​2436 (first part)

  • Fix a crash with typing.NamedTuple and empty fields. Close PyCQA/pylint#​2745

  • Add a proper strerror inference to the OSError exceptions.

    Close PyCQA/pylint#​2553

  • Support non-const nodes as values of Enum attributes.

    Close #​612

  • Fix a crash in the enum brain tip caused by non-assign members in class definitions.

    Close PyCQA/pylint#​2719

  • brain_numpy returns an undefined type for numpy methods to avoid assignment-from-no-return

    Close PyCQA/pylint#​2694

  • Fix a bug where a call to a function that has been previously called via
    functools.partial was wrongly inferred

    Close PyCQA/pylint#​2588

  • Fix a recursion error caused by inferring the slice builtin.

    Close PyCQA/pylint#​2667

  • Remove the restriction that "old style classes" cannot have a MRO.

    This does not make sense any longer given that we run against Python 3
    code.
    Close PyCQA/pylint#​2701

  • Added more builtin exceptions attributes. Close #​580

  • Add a registry for builtin exception models. Close PyCQA/pylint#​1432

  • Add brain tips for http.client. Close PyCQA/pylint#​2687

  • Prevent crashing when processing enums with mixed single and double quotes.

    Close PyCQA/pylint#​2676

  • typing types have the __args__ property. Close PyCQA/pylint#​2419

  • Fix a bug where an Attribute used as a base class was triggering a crash

    Close #​626

  • Added special support for enum.IntFlag

    Close PyCQA/pylint#​2534

  • Extend detection of data classes defined with attr

    Close #​628

  • Fix typo in description for brain_attrs

v2.1.0

Compare Source

============================
Release Date: 2018-11-25

  • threading.Lock.acquire has the timeout parameter now.

    Close PyCQA/pylint#​2457

  • Pass parameters by keyword name when inferring sequences.

    Close PyCQA/pylint#​2526

  • Correct line numbering for f-strings for complex embedded expressions

    When a f-string contained a complex expression, such as an attribute access,
    we weren't cloning all the subtree of the f-string expression for attaching the correct
    line number. This problem is coming from the builtin AST parser which gives for the f-string
    and for its underlying elements the line number 1, but this is causing all sorts of bugs and
    problems in pylint, which expects correct line numbering.

    Close PyCQA/pylint#​2449

  • Add support for argparse.Namespace

    Close PyCQA/pylint#​2413

  • async functions are now inferred as AsyncGenerator when inferring their call result.

  • Filter out Uninferable when inferring the call result result of a class with an uninferable __call__ method.

    Close PyCQA/pylint#​2434

  • Make compatible with AST changes in Python 3.8.

  • Subscript inference (e.g. "a[i]") now pays attention to multiple inferred values for value
    (e.g. "a") and slice (e.g. "i")

    Close #​614


Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@bgoonz bgoonz merged commit 914f2a9 into master Jun 4, 2021
@renovate renovate bot deleted the renovate/astroid-2.x branch June 4, 2021 23:03
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.

2 participants