./devel/py-astroid, Rebuild a new abstract syntax tree from Pythons ast

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]

Branch: CURRENT, Version: 2.4.2, Package name: py37-astroid-2.4.2, Maintainer: kamel.derouiche

The aim of this module is to provide a common base representation of Python
source code. It is currently the library powering pylint's capabilities.

It provides a compatible representation which comes from the _ast module. It
rebuilds the tree generated by the builtin _ast module by recursively walking
down the AST and building an extended ast. The new node classes have additional
methods and attributes for different usages. They include some support for
static inference and local name scopes. Furthermore, astroid can also build
partial trees by inspecting living objects.

Required to run:
[devel/py-setuptools] [lang/py-six] [devel/py-wrapt] [devel/py-lazy-object-proxy] [devel/py-typed-ast] [lang/python37]

Required to build:
[pkgtools/cwrappers] [devel/py-test-runner]

Master sites:

SHA1: 488a4ff893effa9fa8e72a38b968895a31c6b46d
RMD160: 0ea44ae5243e5e8abad79672d53b71c1521613f7
Filesize: 303.684 KB

Version history: (Expand)

CVS history: (Expand)

   2020-06-08 18:08:01 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-astroid: updated to 2.4.2

What's New in astroid 2.4.2?
* `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests
* Properly construct the arguments of infered property descriptors
   2020-05-05 20:18:55 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
py-astroid: updated to 2.4.1

What's New in astroid 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 \ 

What's New in astroid 2.4.0?
* Expose a ast_from_string method in AstroidManager, which will accept
  source code as a string and return the corresponding astroid object
* ``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 \ 
* 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 \ 
* ``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.
* 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`
  `path_wrapper` needs to come first, followed by `raise_if_nothing_inferred`,
  otherwise we won't handle `StopIteration` correctly.
* Prevent a recursion error when inferring self-referential variables without \ 
* 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 \ 
  module in case the current node is an instance of ``astroid.Name``
* 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
  implements the specific ``reduce``, ``accumulate``, ``reduceat``,
        ``outer`` and ``at`` methods.
* ``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
  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.
* 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.
* 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``.
* Add more supported parameters to ``subprocess.check_output``
* 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.
* 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.
* Can access per argument type comments for positional only and keyword only \ 
  The comments are accessed through through the new
  ``Arguments.type_comment_posonlyargs`` and
  ``Arguments.type_comment_kwonlyargs`` attributes respectively.
* Relax upper bound on `wrapt`
* Properly analyze CFFI compiled extensions.
   2020-04-23 10:44:26 by Adam Ciarcinski | Files touched by this commit (2)
Log message:
py-astroid: relax wrapt version requirement
   2019-11-07 11:56:42 by Adam Ciarcinski | Files touched by this commit (3) | Package updated
Log message:
py-astroid: updated to 2.3.3

What's New in astroid 2.3.3?
* Relaxed `six` dependency.
   2019-11-06 13:46:40 by Adam Ciarcinski | Files touched by this commit (3)
Log message:
py-astroid: allow newer version of lang/py-six
   2019-10-19 08:31:25 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-astroid: updated to 2.3.2

What's New in astroid 2.3.2?

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

* 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.
   2019-10-15 10:00:22 by Adam Ciarcinski | Files touched by this commit (1)
Log message:
py-astroid: requires newer py-lazy-object-proxy
   2019-10-01 13:34:56 by Adam Ciarcinski | Files touched by this commit (4) | Package updated
Log message:
py-astroid: updated to 2.3.1

What's New in astroid 2.3.1?
* 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

What's New in astroid 2.3.0?
* Add a brain tip for ``subprocess.check_output``
* Remove NodeNG.nearest method because of lack of usage in astroid and pylint.
* Allow importing wheel files.
* Annotated AST follows PEP8 coding style when converted to string.
* Fix a bug where defining a class using type() could cause a DuplicateBasesError.
* 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``
* ``assert`` only functions are properly inferred as returning ``None``
* Add support for Python 3.8's `NamedExpr` nodes, which is part of assignment \ 
* Added support for inferring `IfExp` nodes.
* Instances of exceptions are inferred as such when inferring in non-exception \ 
  This allows special inference support for exception attributes such as `.args`.
* Drop a superfluous and wrong callcontext when inferring the result of a \ 
context manager
* ``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.
* 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 \ 
  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.
* The last except handler wins when inferring variables bound in an except handler.
* ``threading.Lock.locked()`` is properly recognized as a member of \ 
* Fix recursion error involving ``len`` and self referential attributes
* Can access per argument type comments through new \ 
``Arguments.type_comment_args`` attribute.
* Fix being unable to access class attributes on a NamedTuple.
* Fixed being unable to find distutils submodules by name when in a virtualenv.