1
0
python-astroid/python-astroid.spec
Matej Cepl 05d0f1bac9 Accepting request 922892 from home:bnavigator:branches:devel:languages:python
- 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

OBS-URL: https://build.opensuse.org/request/show/922892
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=64
2021-10-04 07:07:59 +00:00

82 lines
2.8 KiB
RPMSpec

#
# spec file for package python-astroid
#
# 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
Version: 2.8.0
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://github.com/PyCQA/astroid/archive/refs/tags/v%{version}.tar.gz#/astroid-%{version}-gh.tar.gz
BuildRequires: %{python_module lazy-object-proxy >= 1.4}
BuildRequires: %{python_module pytest-runner}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module typed-ast >= 1.4 if %python-base < 3.8}
BuildRequires: %{python_module typing_extensions >= 3.10 if %python-base < 3.10}
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
%if 0%{?python_version_nodots} < 38
Requires: python-typed-ast >= 1.4
%endif
%if 0%{?python_version_nodots} < 310
Requires: python-typing_extensions >= 3.10
%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 LICENSE
%doc ChangeLog README.rst
%{python_sitelib}/astroid/
%{python_sitelib}/astroid-%{version}*-info
%changelog