From d225e0580230febfbd8abac3e91d8d782114cf2b9de3ee52f8e97ba3bcaca185 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 7 May 2020 04:39:47 +0000 Subject: [PATCH] - Update to 2.4.1: * Handle the case where the raw builder fails to retrieve the ``__all__`` attribute * Restructure the AST parsing heuristic to always pick the same module * Changed setup.py to work with [distlib](https://pypi.org/project/distlib) * Do not crash with SyntaxError when parsing namedtuples with invalid label * Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()` * Expose a ast_from_string method in AstroidManager, which will accept * ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__`` * Allow slots added dynamically to a class to still be inferred * Allow `FunctionDef.getattr` to look into both instance attrs and special attributes * Infer qualified ``classmethod`` as a classmethod. * Prevent a recursion error to happen when inferring the declared metaclass of a class * Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name * Prevent a recursion error for self reference variables and `type()` calls. * Do not infer the first argument of a staticmethod in a metaclass as the class itself * ``NodeNG.bool_value()`` gained an optional ``context`` parameter * Pass a context argument to ``astroid.Arguments`` to prevent recursion errors * Better inference of class and static methods decorated with custom methods * Reverse the order of decorators for `infer_subscript` * Prevent a recursion error when inferring self-referential variables without definition * Numpy `datetime64.astype` return value is inferred as a `ndarray`. * Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation * Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``. * Added a call to ``register_transform`` for all functions of the ``brain_numpy_core_multiarray`` * Use the parent of the node when inferring aug assign nodes instead of the statement * Added some functions to the ``brain_numpy_core_umath`` module * Added some functions of the ``numpy.core.multiarray`` module * All the ``numpy ufunc`` functions derived now from a common class that * ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings * The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray`` OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=50 --- astroid-2.3.3.tar.gz | 3 --- astroid-2.4.1.tar.gz | 3 +++ python-astroid.changes | 50 ++++++++++++++++++++++++++++++++++++++++++ python-astroid.spec | 4 ++-- unpin-deps.patch | 17 ++++++-------- 5 files changed, 62 insertions(+), 15 deletions(-) delete mode 100644 astroid-2.3.3.tar.gz create mode 100644 astroid-2.4.1.tar.gz diff --git a/astroid-2.3.3.tar.gz b/astroid-2.3.3.tar.gz deleted file mode 100644 index b5d487e..0000000 --- a/astroid-2.3.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:71ea07f44df9568a75d0f354c49143a4575d90645e9fead6dfb52c26a85ed13a -size 297350 diff --git a/astroid-2.4.1.tar.gz b/astroid-2.4.1.tar.gz new file mode 100644 index 0000000..7b408dd --- /dev/null +++ b/astroid-2.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4c17cea3e592c21b6e222f673868961bad77e1f985cb1694ed077475a89229c1 +size 310789 diff --git a/python-astroid.changes b/python-astroid.changes index a3b8201..a6289e7 100644 --- a/python-astroid.changes +++ b/python-astroid.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Thu May 7 04:36:24 UTC 2020 - Steve Kowalik + +- Update to 2.4.1: + * Handle the case where the raw builder fails to retrieve the ``__all__`` attribute + * Restructure the AST parsing heuristic to always pick the same module + * Changed setup.py to work with [distlib](https://pypi.org/project/distlib) + * Do not crash with SyntaxError when parsing namedtuples with invalid label + * Protect against ``infer_call_result`` failing with `InferenceError` in `Super.getattr()` + * Expose a ast_from_string method in AstroidManager, which will accept + * ``BoundMethod.implicit_parameters`` returns a proper value for ``__new__`` + * Allow slots added dynamically to a class to still be inferred + * Allow `FunctionDef.getattr` to look into both instance attrs and special attributes + * Infer qualified ``classmethod`` as a classmethod. + * Prevent a recursion error to happen when inferring the declared metaclass of a class + * Raise ``AttributeInferenceError`` when ``getattr()`` receives an empty name + * Prevent a recursion error for self reference variables and `type()` calls. + * Do not infer the first argument of a staticmethod in a metaclass as the class itself + * ``NodeNG.bool_value()`` gained an optional ``context`` parameter + * Pass a context argument to ``astroid.Arguments`` to prevent recursion errors + * Better inference of class and static methods decorated with custom methods + * Reverse the order of decorators for `infer_subscript` + * Prevent a recursion error when inferring self-referential variables without definition + * Numpy `datetime64.astype` return value is inferred as a `ndarray`. + * Skip non ``Assign`` and ``AnnAssign`` nodes from enum reinterpretation + * Numpy ``ndarray`` attributes ``imag`` and ``real`` are now inferred as ``ndarray``. + * Added a call to ``register_transform`` for all functions of the ``brain_numpy_core_multiarray`` + * Use the parent of the node when inferring aug assign nodes instead of the statement + * Added some functions to the ``brain_numpy_core_umath`` module + * Added some functions of the ``numpy.core.multiarray`` module + * All the ``numpy ufunc`` functions derived now from a common class that + * ``nodes.Const.itered`` returns a list of ``Const`` nodes, not strings + * The ``shape`` attribute of a ``numpy ndarray`` is now a ``ndarray`` + * Don't ignore special methods when inspecting gi classes + * 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 + * Scope the inference to the current bound node when inferring instances of classes + * Add support for inferring exception instances in all contexts + * Add more supported parameters to ``subprocess.check_output`` + * Infer args unpacking of ``self`` + * Clean up setup.py + * Handle StopIteration error in infer_int. + * Can access per argument type comments for positional only and keyword only arguments. + * Relax upper bound on `wrapt` + * Properly analyze CFFI compiled extensions. +- Refresh unpin-deps.patch + ------------------------------------------------------------------- Thu Nov 14 11:24:24 CET 2019 - Matej Cepl diff --git a/python-astroid.spec b/python-astroid.spec index d061ed4..22b5831 100644 --- a/python-astroid.spec +++ b/python-astroid.spec @@ -1,7 +1,7 @@ # # spec file for package python-astroid # -# Copyright (c) 2019 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-astroid -Version: 2.3.3 +Version: 2.4.1 Release: 0 Summary: Representation of Python source as an AST for pylint License: LGPL-2.1-or-later diff --git a/unpin-deps.patch b/unpin-deps.patch index 63abaca..81618ea 100644 --- a/unpin-deps.patch +++ b/unpin-deps.patch @@ -1,16 +1,13 @@ ---- a/astroid/__pkginfo__.py -+++ b/astroid/__pkginfo__.py -@@ -22,10 +22,10 @@ numversion = tuple(int(elem) for elem in +Index: astroid-2.4.1/astroid/__pkginfo__.py +=================================================================== +--- astroid-2.4.1.orig/astroid/__pkginfo__.py ++++ astroid-2.4.1/astroid/__pkginfo__.py +@@ -26,7 +26,7 @@ numversion = tuple(int(elem) for elem in extras_require = {} install_requires = [ - "lazy_object_proxy==1.4.*", + "lazy_object_proxy>=1.4", "six~=1.12", -- "wrapt==1.11.*", -- 'typed-ast>=1.4.0,<1.5;implementation_name== "cpython" and python_version<"3.8"', -+ "wrapt>=1.11", -+ 'typed-ast>=1.4.0;implementation_name== "cpython" and python_version<"3.7"', - ] - - # pylint: disable=redefined-builtin; why license is a builtin anyway? + "wrapt~=1.11", + 'typed-ast>=1.4.0,<1.5;implementation_name== "cpython" and python_version<"3.8"',