|
|
|
|
Changelog for python311-astroid-3.3.4-lp156.111.1.noarch.rpm :
* Tue Sep 24 2024 Dirk Müller - update to 3.3.4: * Fix regression with f-string inference. * Fix bug with ``manager.clear_cache()`` not fully clearing cache * Fix a crash from inferring empty format specs. * Fix inference regression with property setters. * Add annotation-only instance attributes to attrs classes to fix `no-member` false positives. * Restore support for soft-deprecated members of the ``typing`` module with python 3.13. * Fix a crash introduced in 3.3.0 involving invalid format strings. * Tue Aug 06 2024 John Paul Adrian Glaubitz - Update to 3.3.0 * Add support for Python 3.13. * Remove support for Python 3.8 (and constants `PY38`, `PY39_PLUS`, and `PYPY_7_3_11_PLUS`). * Add the ``__annotations__`` attribute to the ``ClassDef`` object model. * Implement inference for JoinedStr and FormattedValue * Add support for ``ssl.OP_LEGACY_SERVER_CONNECT`` (new in Python 3.12). * Mon Jul 22 2024 John Paul Adrian Glaubitz - Update to 3.2.4 * Avoid reporting unary/binary op type errors when inference is ambiguous.- from version 3.2.3 * Fix ``AssertionError`` when inferring a property consisting of a partial function. * Sun Jun 30 2024 Dirk Müller - update to 3.2.2: * Improve inference for generic classes using the PEP 695 syntax (Python 3.12). * Fix ``RecursionError`` in ``infer_call_result()`` for certain ``__call__`` methods. * Add ``AstroidManager.prefer_stubs`` attribute to control the astroid 3.2.0 feature that prefers stubs. * ``igetattr()`` returns the last same-named function in a class (instead of the first). This avoids false positives in pylint with ``AATToverload``. * Adds ``module_denylist`` to ``AstroidManager`` for modules to be skipped during AST generation. Modules in this list will cause an ``AstroidImportError`` to be raised when an AST for them is requested. * Make ``astroid.interpreter._import.util.is_namespace`` only consider modules using a loader set to ``NamespaceLoader`` or ``None`` as namespaces. * Fri Mar 22 2024 Dirk Müller - update to 3.1.0: * Include PEP 695 (Python 3.12) generic type syntax nodes in ``get_children()``, allowing checkers to visit them. * Add ``__main__`` as a possible inferred value for ``__name__`` to improve control flow inference around ``if __name__ == \"__main__\":`` guards. * Following a deprecation period, the ``names`` arg to the ``Import`` constructor and the ``op`` arg to the ``BoolOp`` constructor are now required, and the ``doc`` args to the ``PartialFunction`` and ``Property`` constructors have been removed (call ``postinit(doc_node=...)`` instead.) * Following a deprecation announced in astroid 1.5.0, the alias ``AstroidBuildingException`` is removed in favor of ``AstroidBuildingError``. * Include modname in AST warnings. Useful for ``invalid escape sequence`` warnings with Python 3.12. * ``RecursionError`` is now trapped and logged out as ``UserWarning`` during astroid node transformations with instructions about raising the system recursion limit. * Suppress ``SyntaxWarning`` for invalid escape sequences on Python 3.12 when parsing modules. * Wed Dec 27 2023 Dirk Müller - update to 3.0.2: * Avoid duplicate inference results for some uses of ``typing.X`` constructs like ``Tuple[Optional[int], ...]``. This was causing pylint to occasionally omit messages like ``deprecated-typing-alias``. * Tue Oct 17 2023 Markéta Calábková - Update to 3.0.1 * Add support for Python 3.12, including PEP 695 type parameter syntax. * Remove support for Python 3.7. * Use the global inference cache when inferring, even without an explicit InferenceContext. * Following a deprecation period starting in astroid 2.7.0, the astroid.node_classes and astroid.scoped_nodes modules have been removed in favor of astroid.nodes.node_classes and astroid.nodes.scoped_nodes. * Following a deprecation period starting in astroid 2.12.0, the astroid.mixins module has been removed in favor of astroid.nodes._base_nodes (private). * Remove AATTcached and AATTcachedproperty decorator (just use AATTcached_property from the stdlib). * Remove the inference module. Node inference methods are now in the module defining the node, rather than being associated to the node afterward. * Move LookupMixIn to astroid.nodes._base_nodes and make it private. * Remove the shims for OperationError, BinaryOperationError, and UnaryOperationError in exceptions. They were moved to util in astroid 1.5.0. * Reduce file system access in ast_from_file(). * nodes.FunctionDef no longer inherits from nodes.Lambda. * infer_call_result now shares the same interface across all implementations. * Remove unused and / or deprecated constants. * The future argument to each method is deprecated and will be removed in astroid 4.0. * So many more changes, see https://github.com/pylint-dev/astroid/blob/main/ChangeLog for a complete list. * Sun Jul 16 2023 Dirk Müller - update to 2.15.6: * Harden ``get_module_part()`` against ``\".\"``. * Avoid expensive list/tuple multiplication operations that would result in ``MemoryError``. * Mon May 15 2023 Dirk Müller - update to 2.15.5: * Handle ``objects.Super`` in ``helpers.object_type()``. * Fri Apr 28 2023 Steve Kowalik - Correct Requires for typing_extensions. * Tue Apr 25 2023 Dirk Müller - update to 2.15.4: * Add visitor function for ``TryStar`` to ``AsStringVisitor`` and add ``TryStar`` to ``astroid.nodes.ALL_NODE_CLASSES``. * Fri Apr 21 2023 Dirk Müller - add sle15_python_module_pythons (jsc#PED-68) * Mon Apr 17 2023 Dirk Müller - update to 2.15.3: * Fix ``infer_call_result()`` crash on methods called ``with_metaclass()`` * Suppress ``UserWarning`` when finding module specs. * Sun Apr 16 2023 Dirk Müller - update to 2.15.2: * Support more possible usages of ``attrs`` decorators. * Restore behavior of setting a Call as a base for classes created using ``six.with_metaclass()``, and harden support for using enums as metaclasses in this case. * astroid now supports ``TryStar`` nodes from python 3.11 and should be fully compatible with python 3.11. * ``Formattedvalue.postinit`` is now keyword only. This is to allow correct typing of the ``Formattedvalue`` class. * ``Astroid`` now supports custom import hooks. * ``astroid`` now infers return values from match cases. * ``AstroidManager.clear_cache`` now also clears the inference context cache. * ``Astroid`` now retrieves the default values of keyword only arguments and sets them on ``Arguments.kw_defaults``. * ``Uninferable`` now has the type ``UninferableBase``. This is to facilitate correctly type annotating code that uses this singleton. * Deprecate ``modutils.is_standard_module()``. It will be removed in the next minor release. * Fix ``are_exclusive`` function when a walrus operator is used inside ``IfExp.test`` field. * Thu Apr 13 2023 Matej Cepl - Make calling of %{sle15modernpython} optional. * Sat Jan 07 2023 Dirk Müller - update to v2.12.14: * Handle the effect of properties on the __init__ of a dataclass correctly. * Handle the effect of kw_only=True in dataclass fields correctly. * Handle the effect of init=False in dataclass fields correctly. * Fix crash if numpy module doesn\'t have version attribute. * Handle AttributeError during str.format template inference tip evaluation * Sat Dec 03 2022 Yogalakshmi Arunachalam - Update to 2.12.13: * Prevent returning an empty list for ``ClassDef.slots()`` when the mro list contains one class & it is not ``object``. Refs PyCQA/pylint#5099 * Prevent a crash when inferring calls to ``str.format`` with inferred arguments that would be invalid. Closes #1856 * Infer the `length` argument of the ``random.sample`` function. Refs PyCQA/pylint#7706 * Catch ``ValueError`` when indexing some builtin containers and sequences during inference. Closes #1843 * Thu Oct 27 2022 Yogalakshmi Arunachalam - Update to 2.12.12: * Add the ``length`` parameter to ``hash.digest`` & ``hash.hexdigest`` in the ``hashlib`` brain. Refs PyCQA/pylint#4039 * Prevent a crash when a module\'s ``__path__`` attribute is unexpectedly missing. Refs PyCQA/pylint#7592 * Fix inferring attributes with empty annotation assignments if parent class contains valid assignment. Refs PyCQA/pylint#7631 * Thu Oct 13 2022 Dirk Müller - update to 2.12.11: * Improve detection of namespace packages for the modules with ``__spec__`` set to None. * Fri Sep 23 2022 Ben Greiner - Update to v2.12.10 * Fixed a crash when introspecting modules compiled by cffi. * decorators.cached now gets its cache cleared by calling AstroidManager.clear_cache.- Release v2.12.9 * Fixed creation of the __init__ of dataclassess with multiple inheritance. * Fixed a crash on namedtuples that use typename to specify their name. * Thu Sep 22 2022 Yogalakshmi Arunachalam - Update to Version 2.12.8 * Fixed a crash in the ``dataclass`` brain for ``InitVars`` without subscript typing. Closes PyCQA/pylint#7422 * Fixed parsing of default values in ``dataclass`` attributes. Closes PyCQA/pylint#7425- Update to Version 2.12.7 * Fixed a crash in the ``dataclass`` brain for uninferable bases. Closes PyCQA/pylint#7418- Update to Version 2.12.6 * Fix a crash involving ``Uninferable`` arguments to ``namedtuple()``. Closes PyCQA/pylint#7375 * The ``dataclass`` brain now understands the ``kw_only`` keyword in dataclass decorators. Closes PyCQA/pylint#7290- Update to Version 2.12.5 * Prevent first-party imports from being resolved to `site-packages`. Refs PyCQA/pylint#7365 * Fix ``astroid.interpreter._import.util.is_namespace()`` incorrectly returning ``True`` for frozen stdlib modules on PyPy. Closes #1755 * Sat Aug 27 2022 Ben Greiner - Update to 2.12.4 * Fixed a crash involving non-standard type comments such as `# type: # any comment`.- Big changelog since 2.9.3, see file Changelog * mostly crash fixes * Python >= 3.7 is required * Sat Jan 15 2022 Dirk Müller - update to 2.9.3: * Fixed regression where packages without a ``__init__.py`` file were not recognized or imported correctly. * Fixed regression in ``astroid.scoped_nodes`` where ``_is_metaclass`` was not accessible anymore. * ``NodeNG.frame()`` and ``NodeNG.statement()`` will start raising ``ParentMissingError`` instead of ``AttributeError`` in astroid 3.0. This behaviour can already be triggered by passing ``future=True`` to a ``frame()`` or ``statement()`` call. * Prefer the module loader get_source() method in AstroidBuilder\'s module_build() when possible to avoid assumptions about source code being available on a filesystem. Otherwise the source cannot be found and application behavior changes when running within an embedded hermetic interpreter environment (pyoxidizer, etc.). * Require Python 3.6.2 to use astroid. * Removed custom ``distutils`` handling for resolving paths to submodules. * Fix ``deque.insert()`` signature in ``collections`` brain. * Fix ``Module`` nodes not having a ``col_offset``, ``end_lineno``, and ``end_col_offset`` attributes. * Fix typing and update explanation for ``Arguments.args`` being ``None``. * Fix crash if a variable named ``type`` is subscripted in a generator expression. * Enable inference of dataclass import from marshmallow_dataclass. This allows the dataclasses brain to recognize dataclasses annotated by marshmallow_dataclass. * Resolve symlinks in the import path Fixes inference error when the import path includes symlinks (e.g. Python installed on macOS via Homebrew). * Thu Dec 09 2021 pgajdosAATTsuse.com- version update to 2.9.0 * Add ``end_lineno`` and ``end_col_offset`` attributes to astroid nodes. * Always treat ``__class_getitem__`` as a classmethod. * Add missing ``as_string`` visitor method for ``Unknown`` node. * Fix crash on inference of subclasses created from ``Class().__subclasses__`` * Fix bug with Python 3.7.0 / 3.7.1 and ``typing.NoReturn``. * Sat Nov 13 2021 Dirk Müller - update to 2.8.5: * Use more permissive versions for the ``typed-ast`` dependencie (<2.0 instead of <1.5) * Fix crash on inference of ``__len__``. * Added missing ``kind`` (for ``Const``) and ``conversion`` (for ``FormattedValue``) fields to repr. * Fix crash with assignment expressions, nested if expressions and filtering of statements * Fix incorrect filtering of assignment expressions statements * Wed Oct 27 2021 Ben Greiner - Update to 2.8.4 * Fix the ``scope()`` and ``frame()`` methods of ``NamedExpr`` nodes. When these nodes occur in ``Arguments``, ``Keyword`` or ``Comprehension`` nodes these methods now correctly point to the outer-scope of the ``FunctionDef``, ``ClassDef``, or ``Comprehension``. * Fix the ``set_local`` function for ``NamedExpr`` nodes. When these nodes occur in ``Arguments``, ``Keyword``, or ``Comprehension`` nodes these nodes are now correctly added to the locals of the ``FunctionDef``, ``ClassDef``, or ``Comprehension``.- Release 2.8.3? * Add support for wrapt 1.13 * Fixes handling of nested partial functions * Fix regression with the import resolver * Fix crash with invalid dataclass field call- Release 2.8.1 * Adds support of type hints inside numpy\'s brains. * Enable inference of dataclass import from pydantic.dataclasses. This allows the dataclasses brain to recognize pydantic dataclasses. * Fix regression on ClassDef inference * Fix regression on Compare node inference * Extended attrs brain to support the provisional APIs * Astroid does not trigger it\'s own deprecation warning anymore. * Improve brain for ``typing.Callable`` and ``typing.Type``. * Fix bug with importing namespace packages with relative imports * The ``is_typing_guard`` and ``is_sys_guard`` functions are deprecated and will be removed in 3.0.0. They are complex meta-inference functions that are better suited for pylint. Import them from ``pylint.checkers.utils`` instead (requires pylint ``2.12``). * Suppress the conditional between applied brains and dynamic import authorized modules. (Revert the \"The transforms related to a module are applied only if this module has not been explicitly authorized to be imported\" of version 2.7.3) * Adds a brain to infer the ``numpy.ma.masked_where`` function. * Sun Oct 03 2021 Ben Greiner - Update to 2.8.0 * Add additional deprecation warnings in preparation for astroid 3.0 * Require attributes for some node classes with ``__init__`` call. * ``name`` (``str``) for ``Name``, ``AssignName``, ``DelName`` * ``attrname`` (``str``) for ``Attribute``, ``AssignAttr``, ``DelAttr`` * ``op`` (``str``) for ``AugAssign``, ``BinOp``, ``BoolOp``, ``UnaryOp`` * ``names`` (``list[tuple[str, str | None]]``) for ``Import`` * Support pyz imports * Add ``node_ancestors`` method to ``NodeNG`` for obtaining the ancestors of nodes. * It\'s now possible to infer the value of comparison nodes * Fixed bug in inference of dataclass field calls.- Release 2.7.3 * The transforms related to a module are applied only if this module has not been explicitly authorized to be imported (i.e is not in AstroidManager.extension_package_whitelist). Solves the following issues if numpy is authorized to be imported through the `extension-pkg-allow-list` option. * Fixed bug in attribute inference from inside method calls. * Fixed bug in inference for superclass instance methods called from the class rather than an instance. * Fixed bug in inference of chained attributes where a subclass had an attribute that was an instance of its superclass. * Adds a brain for the ctypes module. * When processing dataclass attributes, exclude the same type hints from abc.collections as from typing. * Apply dataclass inference to pydantic\'s dataclasses.- Release 2.7.2 * ``BaseContainer`` is now public, and will replace ``_BaseContainer`` completely in astroid 3.0. * The call cache used by inference functions produced by ``inference_tip`` can now be cleared via ``clear_inference_tip_cache``. * ``astroid.const.BUILTINS`` and ``astroid.bases.BUILTINS`` are not used internally anymore and will be removed in astroid 3.0. Simply replace this by the string \'builtins\' for better performances and clarity. * Add inference for dataclass initializer method. * Fri Aug 20 2021 Ben Greiner - Add typing_extensions as requirement for python36 * Thu Aug 19 2021 John Paul Adrian Glaubitz - Update to 2.7.1 * When processing dataclass attributes, only do typing inference on collection types. Support for instantiating other typing types is left for the future, if desired. Closes #1129 * Fixed LookupMixIn missing from ``astroid.node_classes``.- from version 2.7.0 * Import from ``astroid.node_classes`` and ``astroid.scoped_nodes`` has been deprecated in favor of ``astroid.nodes``. Only the imports from ``astroid.nodes`` will work in astroid 3.0.0. * Add support for arbitrary Enum subclass hierachies Closes PyCQA/pylint#533 Closes PyCQA/pylint#2224 Closes PyCQA/pylint#2626 * Add inference tips for dataclass attributes, including dataclasses.field calls. Also add support for InitVar. Closes PyCQA/pylint#2600 Closes PyCQA/pylint#2698 Closes PyCQA/pylint#3405 Closes PyCQA/pylint#3794 * Adds a brain that deals with dynamic import of `IsolatedAsyncioTestCase` class of the `unittest` module. Closes PyCQA/pylint#4060- from version 2.6.6 * Added support to infer return type of ``typing.cast()`` * Fix variable lookup\'s handling of exclusive statements Closes PyCQA/pylint#3711 * Fix variable lookup\'s handling of function parameters Closes PyCQA/astroid#180 * Fix variable lookup\'s handling of except clause variables * Fix handling of classes with duplicated bases with the same name Closes PyCQA/astroid#1088- from version 2.6.5 * Fix a crash when there would be a \'TypeError object does not support item assignment\' in the code we parse. Closes PyCQA/pylint#4439 * Fix a crash when a AttributeInferenceError was raised when failing to find the real name in infer_import_from. Closes PyCQA/pylint#4692- from version 2.6.4 * Fix a crash when a StopIteration was raised when inferring a faulty function in a context manager. Closes PyCQA/pylint#4723- from version 2.6.3 * Added ``If.is_sys_guard`` and ``If.is_typing_guard`` helper methods * Fix a bad inferenece type for yield values inside of a derived class. Closes PyCQA/astroid#1090 * Fix a crash when the node is a \'Module\' in the brain builtin inference Closes PyCQA/pylint#4671 * Fix issues when inferring match variables Closes PyCQA/pylint#4685 * Fix lookup for nested non-function scopes * Fix issue that ``TypedDict`` instance wasn\'t callable. Closes PyCQA/pylint#4715 * Add dependency on setuptools and a guard to prevent related exceptions.- from version 2.6.2 * Fix a crash when the inference of the length of a node failed Closes PyCQA/pylint#4633 * Fix unhandled StopIteration during inference, following the implementation of PEP479 in python 3.7+ Closes PyCQA/pylint#4631 Closes #1080- from version 2.6.1 * Fix issue with ``TypedDict`` for Python 3.9+ Closes PyCQA/pylint#4610- from version 2.6.0 * Appveyor and travis are no longer used in the continuous integration * ``setuptools_scm`` has been removed and replaced by ``tbump`` in order to not have hidden runtime dependencies to setuptools * ``NodeNg``, the base node class, is now accessible from ``astroid`` or ``astroid.nodes`` as it can be used for typing. * Update enum brain to improve inference of .name and .value dynamic class attributes Closes PyCQA/pylint#1932 Closes PyCQA/pylint#2062 Closes PyCQA/pylint#2306 * Removed ``Repr``, ``Exec``, and ``Print`` nodes as the ``ast`` nodes they represented have been removed with the change to Python 3 * Deprecate ``Ellipsis`` node. It will be removed with the next minor release. Checkers that already support Python 3.8+ work without issues. It\'s only necessary to remove all references to the ``astroid.Ellipsis`` node. This changes will make development of checkers easier as the resulting tree for Ellipsis will no longer depend on the python version. * *Background * *: With Python 3.8 the ``ast.Ellipsis`` node, along with ``ast.Str``, ``ast.Bytes``, ``ast.Num``, and ``ast.NamedConstant`` were merged into ``ast.Constant``. * Deprecated ``Index`` and ``ExtSlice`` nodes. They will be removed with the next minor release. Both are now part of the ``Subscript`` node. Checkers that already support Python 3.9+ work without issues. It\'s only necessary to remove all references to the ``astroid.Index`` and ``astroid.ExtSlice`` nodes. This change will make development of checkers easier as the resulting tree for ``ast.Subscript`` nodes will no longer depend on the python version. * *Background * *: With Python 3.9 ``ast.Index`` and ``ast.ExtSlice`` were merged into the ``ast.Subscript`` node. * Updated all Match nodes to be internally consistent. * Add ``Pattern`` base class.- from version 2.5.8 * Improve support for Pattern Matching * Add lineno and col_offset for ``Keyword`` nodes and Python 3.9+ * Add global inference cache to speed up inference of long statement blocks * Add a limit to the total number of nodes inferred indirectly as a result of inferring some node- from version 2.5.7 * 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 * Fri May 07 2021 Ben Greiner - Update to 2.5.6 * Fix retro-compatibility issues with old version of pylint Closes PyCQA/pylint#4402 * Fixes the discord link in the project urls of the package. Closes PyCQA/pylint#4393 * The packaging is now done via setuptools exclusively. doc, tests, and Changelog are not packaged anymore - reducing the size of the package greatly. * __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. * 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 * Detects import numpy as a valid numpy import. Closes PyCQA/pylint#3974 * Iterate over Keywords when using ClassDef.get_children Closes PyCQA/pylint#3202- Use github archive for tests * Sun Mar 21 2021 Ben Greiner - Update to 2.5.1 * The context.path is reverted to a set because otherwise it leads to false positives for non `numpy` functions. * Don\'t transform dataclass ClassVars * Improve typing.TypedDict inference * Fix the `Duplicates found in MROs` false positive.- Release 2.5.0 * Adds `attr_fset` in the `PropertyModel` class. * Remove support for Python 3.5. * Remove the runtime dependency on six. The six brain remains in astroid. * Enrich the brain_collection module so that __class_getitem__ method is added to `deque` for python version above 3.9. * The context.path is now a dict and the context.push method returns True if the node has been visited a certain amount of times. * Adds a brain for type object so that it is possible to write `type[int]` in annotation. * Add __class_getitem__ method to subprocess.Popen brain under Python 3.9 so that it is seen as subscriptable by pylint. * Adds `degrees`, `radians`, which are `numpy ufunc` functions, in the `numpy` brain. Adds `random` function in the `numpy. random` brain. * Fix deprecated importlib methods * Fix a crash in inference caused by `Uninferable` container elements * Add `python 3.9` support. * The flat attribute of numpy.ndarray is now inferred as an numpy.ndarray itself. It should be a numpy.flatiter instance, but this class is not yet available in the numpy brain. * Fix a bug for dunder methods inference of function objects * Fixes a bug in the signature of the ndarray.__or__ method, in the brain_numpy_ndarray.py module. * Fixes a to-list cast bug in starred_assigned_stmts method, in the protocols.py` module. * Added a brain for hypothesis.strategies.composite * The transpose of a numpy.ndarray is also a numpy.ndarray * Added a brain for sqlalchemy.orm.session * Separate string and bytes classes patching * Prevent recursion error for self referential length calls * Added missing methods to the brain for mechanize, to fix pylint false positives * Added more supported parameters to subprocess.check_output * Fix recursion errors with pandas * Added exception inference for `UnicodeDecodeError` * `FunctionDef.is_generator` properly handles `yield` nodes in `If` tests * Fixed exception-chaining error messages. * Fix failure to infer base class type with multiple inheritance and qualified names * Fix interpretation of six.with_metaclass class definitions. * Reduce memory usage of astroid\'s module cache. * Remove dependency on `imp`. * Do not crash when encountering starred assignments in enums. * Fix a crash in functools.partial inference when the arguments cannot be determined * Fix a crash caused by a lookup of a monkey-patched method * is_generator correctly considers `Yield` nodes in `AugAssign` nodes This fixes a false positive with the `assignment-from-no-return` pylint check. * Corrected the parent of function type comment nodes. These nodes used to be parented to their original ast. FunctionDef parent but are now correctly parented to their astroid.FunctionDef parent.- Drop part_rm_dep_imp.patch fixed upstream- Drop unpin-deps.patch unpinned upstream * Sat Dec 05 2020 Benjamin Greiner - Fix python_sitelib usage for possibly multiple python3 flavors gh#openSUSE/python-rpm-macros#66 * Tue Jun 23 2020 Matej Cepl - Add part_rm_dep_imp.patch to replace missing `imp` package (gh#PyCQA/astroid#686). * Tue Jun 16 2020 Steve Kowalik - Update to 2.4.2: * `FunctionDef.is_generator` properly handles `yield` nodes in `While` tests * Properly construct the arguments of infered property descriptors * Thu May 07 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 2019 Matej Cepl - Update to 2.3.3: * Update six version to 1.13.- Update unpin-deps.patch * Fri Nov 01 2019 Tomáš Chvátal - Update to 2.3.2: * All type comments have as parent the corresponding `astroid` node * Pass an inference context to `metaclass()` when inferring an object type * Fri Oct 04 2019 Tomáš Chvátal - Add patch to not use pinned dependencies and to work in our distro: * unpin-deps.patch * Thu Oct 03 2019 Marketa Calabkova - Update to 2.3.1 * A transform for the builtin `dataclasses` module was added. * 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. * Dropped support for Python 3.4. * Add support for Python 3.8\'s `NamedExpr` nodes, which is part of assignment expressions. * ...and more. * Mon Mar 11 2019 Tomáš Chvátal - Update to 2.2.5: * The last except handler wins when inferring variables bound in an except handler. * Wed Mar 06 2019 Tomáš Chvátal - Update to 2.2.4: * Many changes inside, see ChangeLog * Mon Dec 31 2018 Martin Pluskal - Correct conditional for older distros- Update filelist to work on SLE-12 * Thu Dec 06 2018 Tomáš Chvátal - Version update to 2.1.0: * Many changes around, see ChangeLog file * Tue Sep 18 2018 Jan Engelhardt - Trim future goals and history lesson from description. Use noun phrase in summary. * Fri Sep 14 2018 Tomáš Chvátal - Version update to 2.0.4: * only supports python3.0+ * Many many changes see ChangeLog fixes * Mon Jul 16 2018 tchvatalAATTsuse.com- Version update to 1.6.5: * Many various bugfixes making the pylint tests pass * For details see ChangeLog * Wed Jan 24 2018 tchvatalAATTsuse.com- Version update to 1.6.1: * Various fixes for python3 * Various pylint issues fixes * For detailed log see ChangeLog- Disable tests for now as they seem to fail, upstream knows * Mon Feb 27 2017 jmatejekAATTsuse.com- update for singlespec- update to 1.4.9 * classes can now know their definition-time arguments * getitem() now accepts node objects * explicit namespace package support * see more details in ChangeLog- update to 2.0-pre-release git version for python 3.6 support (boo#1026174)- enable test suite for all pythons * Wed Feb 10 2016 michaelAATTstroeder.com- Added missing dependencies on python-lazy_object_proxy and python-wrapt- Update to version 1.4.4 * unpack_infer raises InferenceError if it can\'t operate with the given sequences of nodes. * Support accessing properties with super(). * Enforce strong updates per frames. * Wed Jan 13 2016 toddrme2178AATTgmail.com- Update to version 1.4.3 * pkg_resources brain tips are a bit more specific, by specifiying proper returns. * Standard library modules are properly detected by is_standard_module. This should fix issues such as https://github.com/PyCQA/pylint/issues/725.- Update to version 1.4.2 * The slots() method conflates all the slots from the ancestors into a list of current and parent slots. We\'re doing this because this is the right semantics of slots, they get inherited, as long as each parent defines a __slots__ entry. * Revert to using printf-style formatting in as_string, in order to avoid a potential problem with encodings when using .format. Closes issue #273. * assigned_stmts methods have the same signature from now on. They used to have different signatures and each one made assumptions about what could be passed to other implementations, leading to various possible crashes when one or more arguments weren\'t given. Closes issue #277.- update to version 1.4.1: * Add support for handling Uninferable nodes when calling as_string Some object, for instance List or Tuple can have, after inference, Uninferable as their elements, happening when their components weren\'t couldn\'t be inferred properly. This means that as_string needs to cope with expecting Uninferable nodes part of the other nodes coming for a string transformation. The patch adds a visit method in AsString and \"accept\" on Yes / Uninferable nodes. Closes issue #270.- update to version 1.4.0: * Class.getattr(\'__mro__\') returns the actual MRO. Closes issue #128. * The logilab-common dependency is not needed anymore as the needed code was integrated into astroid. * Add \'assert_equals\' method in nose.tools\'s brain plugin. * Generated enum member stubs now support IntEnum and multiple base classes. * Add brain tips for multiprocessing.Manager and multiprocessing.managers.SyncManager. * Add brain tips for multiprocessing post Python 3.4+, where the module level functions are retrieved with getattr from a context object, leading to many no-member errors in Pylint. * The Generator objects inferred with `infer_call_result` from functions have as parent the function from which they are returned. * Understand partially the 3-argument form of `type`. The only change is that astroid understands members passed in as dictionaries as the third argument. * Improve the inference of Getattr nodes when dealing with abstract properties from the abc module. In astroid.bases.Instance._wrap_attr we had a detection code for properties, which basically inferred whatever a property returned, passing the results up the stack, to the igetattr() method. It handled only the builtin property but the new patch also handles a couple of other properties, such as abc.abstractproperty. * UnboundMethod.getattr calls the getattr of its _proxied object and doesn\'t call super(...) anymore. It previously crashed, since the first ancestor in its mro was bases.Proxy and bases.Proxy doesn\'t implement the .getattr method. Closes issue #91. * Don\'t hard fail when calling .mro() on a class which has combined both newstyle and old style classes. The class in question is actually newstyle (and the __mro__ can be retrieved using Python). .mro() fallbacks to using .ancestors() in that case. * Class.local_attr and Class.local_attr_ancestors uses internally a mro lookup, using .mro() method, if they can. That means for newstyle classes, when trying to lookup a member using one of these functions, the first one according to the mro will be returned. This reflects nicely the reality, but it can have as a drawback the fact that it is a behaviour change (the previous behaviour was incorrect though). Also, having bases which can return multiple values when inferred will not work with the new approach, because .mro() only retrieves the first value inferred from a base. * Expose a implicit_metaclass() method in Class. This will return a builtins.type instance for newstyle classes. * Add two new exceptions for handling MRO error cases. DuplicateBasesError is emitted when duplicate bases are found in a class, InconsistentMroError is raised when the method resolution is determined to be inconsistent. They share a common class, MroError, which is a subclass of ResolveError, meaning that this change is backwards compatible. * Classes aren\'t marked as interfaces anymore, in the `type` attribute. * Class.has_dynamic_getattr doesn\'t return True for special methods which aren\'t implemented in pure Python, as it is the case for extension modules. Since most likely the methods were coming from a live object, this implies that all of them will have __getattr__ and __getattribute__ present and it is wrong to consider that those methods were actually implemented. * Add `igetattr` method to scoped_nodes.Function. * Add support for Python 3.5\'s MatMul operation: see PEP 465 for more details. * NotImplemented is detected properly now as being part of the builtins module. Previously trying to infer the Name(NotImplemented) returned an YES object. * Add proper grammatical names for `infered` and `ass_type` methods, namely `inferred` and `assign_type`. The old methods will raise PendingDeprecationWarning, being slated for removal in astroid 2.0. * Add new AST names in order to be similar to the ones from the builtin ast module. With this change, Getattr becomes Attributes, Backquote becomes Repr, Class is ClassDef, Function is FunctionDef, Discard is Expr, CallFunc is Call, From is ImportFrom, AssName is AssignName and AssAttr is AssignAttr. The old names are maintained for backwards compatibility and they are interchangeable, in the sense that using Discard will use Expr under the hood and the implemented visit_discard in checkers will be called with Expr nodes instead. The AST does not contain the old nodes, only the interoperability between them hides this fact. Recommandations to move to the new nodes are emitted accordingly, the old names will be removed in astroid 2.0. * Star unpacking in assignments returns properly a list, not the individual components. Closes issue #138. * Lambdas found at class level, which have a `self` argument, are considered * Add annotation support for function.as_string(). Closes issue #37. * Add support for indexing bytes on Python 3. BoundMethods when accessing them from instances of their class. * Add support for inferring subscript on instances, which will use __getitem__. Closes issue #124. * Understand metaclasses added with six.add_metaclass decorator. Closes issue #129. * Add a new convenience API, `astroid.parse`, which can be used to retrieve an astroid AST from a source code string, similar to how ast.parse can be used to obtain a Python AST from a source string. This is the test_utils.build_module promoted to a public API. * do_import_module passes the proper relative_only flag if the level is higher than 1. This has the side effect that using `from .something import something` in a non-package will finally result in an import-error on Pylint\'s side. Until now relative_only was ignored, leading to the import of `something`, if it was globally available. * There\'s a new separate step for transforms. Until now, the transforms were applied at the same time the tree was being built. This was problematic if the transform functions were using inference, since the inference was executed on a partially constructed tree, which led to failures when post-building information was needed (such as setting the _from_names for the From imports). Now there\'s a separate step for transforms, which are applied using transform.TransformVisitor. There\'s a couple of other related changes: + astroid.parse and AstroidBuilder gained a new parameter `apply_transforms`, which is a boolean flag, which will control if the transforms are applied. We do this because there are uses when the vanilla tree is wanted, without any implicit modification. + the transforms are also applied for builtin modules, as a side effect of the fact that transform visiting was moved in AstroidBuilder._post_build from AstroidBuilder._data_build. Closes issue #116. * Add a new node, DictUnpack, which is used to represent the unpacking of a dictionary into another dictionary, using PEP 448 specific syntax ({1:2, * *{2:3}) This is a different approach than what the builtin ast module does, since it just uses None to represent this kind of operation, which seems conceptually wrong, due to the fact the AST contains non-AST nodes. Closes issue #206. * Add a new type of node, called *inference objects *. Inference objects are similar with AST nodes, but they can be obtained only after inference, so they can\'t be found inside the AST tree. Their purpose is to handle at astroid level some operations which can\'t be handled when using brain transforms. For instance, the first object added is FrozenSet, which can be manipulated at astroid\'s level (inferred, itered etc). Code such as this \'frozenset((1,2))\' will not return an Instance of frozenset, without having access to its content, but a new objects.FrozenSet, which can be used just as a nodes.Set. * Add a new *inference object * called Super, which also adds support for understanding super calls. astroid understands the zero-argument form of super, specific to Python 3, where the interpreter fills itself the arguments of the call. Also, we are understanding the 2-argument form of super, both for bounded lookups (super(X, instance)) as well as for unbounded lookups (super(X, Y)), having as well support for validating that the object-or-type is a subtype of the first argument. The unbounded form of super (one argument) is not understood, since it\'s useless in practice and should be removed from Python\'s specification. Closes issue #89. * astroid.utils.ASTWalker and astroid.utils.LocalsVisitor were moved to pylint.pyreverse.utils.- update to version 1.3.8: * Backport of 40e3176, which fixes issue #84.- update to version 1.3.7: * Improve the inference of six.moves, especially when using `from ... import ...` syntax. Also, we added a new fail import hook for six.moves, which fixes the import-error false positive from pylint. Closes issue #107. * Mon Mar 16 2015 mciharAATTsuse.cz- Update to 1.3.6: * Class.slots raises NotImplementedError for old style classes. Closes issue #67. * Add a new option to AstroidManager, `optimize_ast`, which controls if peephole optimizer should be enabled or not. This prevents a regression, where the visit_binop method wasn\'t called anymore with astroid 1.3.5, due to the differences in the resulting AST. Closes issue #82. * Add the ability to optimize small ast subtrees, with the first use in the optimization of multiple BinOp nodes. This removes recursivity in the rebuilder when dealing with a lot of small strings joined by the addition operator. Closes issue #59. * Obtain the methods for the nose brain tip through an unittest.TestCase instance. Closes Pylint issue #457. * Fix a crash which occurred when a class was the ancestor of itself. Closes issue #78. * Improve the scope_lookup method for Classes regarding qualified objects, with an attribute name exactly as one provided in the class itself. For example, a class containing an attribute \'first\', which was also an import and which had, as a base, a qualified name or a Gettattr node, in the form \'module.first\', then Pylint would have inferred the `first` name as the function from the Class, not the import. Closes Pylint issue #466. * Implement the assigned_stmts operation for Starred nodes, which was omitted when support for Python 3 was added in astroid. Closes issue #36. * Wed Feb 18 2015 mciharAATTsuse.cz- Update to 1.3.4: * Get the first element from the method list when obtaining the functions from nose.tools.trivial. Closes Pylint issue #448. * Restore file_stream to a property, but deprecate it in favour of the newly added method Module.stream. By using a method instead of a property, it will be easier to properly close the file right after it is used, which will ensure that no file descriptors are leaked. Until now, due to the fact that a module was cached, it was not possible to close the file_stream anywhere. file_stream will start emitting PendingDeprecationWarnings in astroid 1.4, DeprecationWarnings in astroid 1.5 and it will be finally removed in astroid 1.6. * Add inference tips for \'tuple\', \'list\', \'dict\' and \'set\' builtins. * Add brain definition for most string and unicode methods * Changed the API for Class.slots. It returns None when the class doesn\'t define any slots. Previously, for both the cases where the class didn\'t have slots defined and when it had an empty list of slots, Class.slots returned an empty list. * Add a new method to Class nodes, \'mro\', for obtaining the the method resolution order of the class. * Add brain tips for six.moves. Closes issue #63. * Improve the detection for functions decorated with decorators which returns static or class methods. * .slots() can contain unicode strings on Python 2. * Add inference tips for nose.tools. * Mon Dec 08 2014 mciharAATTsuse.cz- Update to 1.3.2: * Fixed a crash with invalid subscript index. * Implement proper base class semantics for Python 3, where every class derives from object. * Allow more fine-grained control over C extension loading in the manager. * Fixed a crash issue with the pytest brain module. * Fri Nov 21 2014 mciharAATTsuse.cz- Update to 1.3.0: * Fix a maximum recursion error occured during the inference, where statements with the same name weren\'t filtered properly. Closes pylint issue #295. * Check that EmptyNode has an underlying object in EmptyNode.has_underlying_object. * Simplify the understanding of enum members. * Fix an infinite loop with decorator call chain inference, where the decorator returns itself. Closes issue #50. * Various speed improvements. Patch by Alex Munroe. * Add pytest brain plugin. Patch by Robbie Coomber. * Support for Python versions < 2.7 has been dropped, and the source has been made compatible with Python 2 and 3. Running 2to3 on installation for Python 3 is not needed anymore. * astroid now depends on six. * modutils._module_file opens __init__.py in binary mode. Closes issues #51 and #13. * Only C extensions from trusted sources (the standard library) are loaded into the examining Python process to build an AST from the live module. * Path names on case-insensitive filesystems are now properly handled. This fixes the stdlib detection code on Windows. * Metaclass-generating functions like six.with_metaclass are now supported via some explicit detection code. * astroid.register_module_extender has been added to generalize the support for module extenders as used by many brain plugins. * brain plugins can now register hooks to handle failed imports, as done by the gobject-introspection plugin. * The modules have been moved to a separate package directory, `setup.py develop` now works correctly. * Tue Nov 04 2014 mciharAATTsuse.cz- Update to 1.2.1: * Fix a crash occurred when inferring decorator call chain. Closes issue #42. * Set the parent of vararg and kwarg nodes when inferring them. Closes issue #43. * namedtuple inference knows about \'_fields\' attribute. * enum members knows about the methods from the enum class. * Name inference will lookup in the parent function of the current scope, in case searching in the current scope fails. * Inference of the functional form of the enums takes into consideration the various inputs that enums accepts. * The inference engine handles binary operations (add, mul etc.) between instances. * Fix an infinite loop in the inference, by returning a copy of instance attributes, when calling \'instance_attr\'. Closes issue #34 (patch by Emile Anclin). * Don\'t crash when trying to infer unbound object.__new__ call. Closes issue #11.- Use upstream zip for packaging as .tar.gz is no longer provided
|
|
|