1
0
python-astroid/python-astroid.spec

78 lines
2.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-astroid
#
Accepting request 880419 from home:bnavigator:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/880419 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=58
2021-03-22 23:15:02 +01:00
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-astroid
Accepting request 880419 from home:bnavigator:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/880419 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=58
2021-03-22 23:15:02 +01:00
Version: 2.5.1
Release: 0
Summary: Representation of Python source as an AST for pylint
License: LGPL-2.1-or-later
URL: https://github.com/pycqa/astroid
Source: https://files.pythonhosted.org/packages/source/a/astroid/astroid-%{version}.tar.gz
BuildRequires: %{python_module lazy-object-proxy >= 1.4}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
Accepting request 880419 from home:bnavigator:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/880419 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=58
2021-03-22 23:15:02 +01:00
BuildRequires: %{python_module typed-ast >= 1.4 if %python-base < 3.8}
BuildRequires: %{python_module wrapt >= 1.11}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-lazy-object-proxy >= 1.4
Requires: python-wrapt >= 1.11
BuildArch: noarch
Accepting request 880419 from home:bnavigator:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/880419 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=58
2021-03-22 23:15:02 +01:00
%if 0%{?python_version_nodots} < 38
Requires: python-typed-ast >= 1.4
%endif
%python_subpackages
%description
This module provides a common base representation of Python source code for
projects such as pychecker, pyreverse, pylint. The development of this library
is governed by pylint's needs.
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 builds partial trees by inspecting living
objects.
%prep
%setup -q -n astroid-%{version}
%autopatch -p1
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%files %{python_files}
%license COPYING COPYING.LESSER
%doc ChangeLog README.rst
%{python_sitelib}/astroid/
Accepting request 880419 from home:bnavigator:branches:devel:languages:python - 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 OBS-URL: https://build.opensuse.org/request/show/880419 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=58
2021-03-22 23:15:02 +01:00
%{python_sitelib}/astroid-%{version}*-info
%changelog