forked from pool/python-astroid
Markéta Machová
027ea79a63
- 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 @cached and @cachedproperty decorator (just use @cached_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. OBS-URL: https://build.opensuse.org/request/show/1118344 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-astroid?expand=0&rev=95
76 lines
2.5 KiB
RPMSpec
76 lines
2.5 KiB
RPMSpec
#
|
|
# spec file for package python-astroid
|
|
#
|
|
# Copyright (c) 2023 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/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-astroid
|
|
Version: 3.0.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://github.com/PyCQA/astroid/archive/refs/tags/v%{version}.tar.gz#/astroid-%{version}-gh.tar.gz
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
# typing-extensions for python310 required for tests only: gh#PyCQA/astroid#1585
|
|
BuildRequires: %{python_module typing-extensions >= 3.10}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildArch: noarch
|
|
%if 0%{?python_version_nodots} < 311
|
|
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
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_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
|