diff --git a/.gitignore b/.gitignore index ab46506..c749e1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /astroid-version-1.0.0.tar.bz2 /astroid-version-1.0.1.tar.bz2 /astroid-1.1.tar.bz2 +/astroid-1.2.1.tar.bz2 diff --git a/0001-Fix-metaclass-recursion.patch b/0001-Fix-metaclass-recursion.patch deleted file mode 100644 index 934b667..0000000 --- a/0001-Fix-metaclass-recursion.patch +++ /dev/null @@ -1,60 +0,0 @@ -# HG changeset patch -# User cpopa -# Date 1398150797 -10800 -# Branch ancestors -# Node ID 7a9a377ae3f02f23354fdea6b6c1a34e3d6b75b1 -# Parent eaa48b724e37578236a9c996d292fc135d7ead6e -Skip the same infered nodes as the base class in _is_metaclass. Closes issue #25. - -diff --git a/scoped_nodes.py b/scoped_nodes.py ---- a/scoped_nodes.py -+++ b/scoped_nodes.py -@@ -681,6 +681,8 @@ - return False - if baseobj is YES: - continue -+ if baseobj is klass: -+ continue - if baseobj._type == 'metaclass': - return True - if _is_metaclass(baseobj): -diff --git a/test/regrtest_data/recursion.py b/test/regrtest_data/recursion.py -new file mode 100644 ---- /dev/null -+++ b/test/regrtest_data/recursion.py -@@ -0,0 +1,3 @@ -+""" For issue #25 """ -+class Base(object): -+ pass -\ No newline at end of file -diff --git a/test/unittest_regrtest.py b/test/unittest_regrtest.py ---- a/test/unittest_regrtest.py -+++ b/test/unittest_regrtest.py -@@ -156,6 +156,27 @@ - # context manager didn't use an assignment name. - list(astroid.nodes_of_class(nodes.CallFunc))[-1].infered() - -+ def test_recursion_regression_issue25(self): -+ builder = AstroidBuilder() -+ data = """ -+import recursion as base -+ -+_real_Base = base.Base -+ -+class Derived(_real_Base): -+ pass -+ -+def run(): -+ base.Base = Derived -+""" -+ astroid = builder.string_build(data, __name__, __file__) -+ # Used to crash in _is_metaclass, due to wrong -+ # ancestors chain -+ classes = astroid.nodes_of_class(nodes.Class) -+ for klass in classes: -+ # triggers the _is_metaclass call -+ klass.type -+ - class Whatever(object): - a = property(lambda x: x, lambda x: x) - diff --git a/python-astroid.spec b/python-astroid.spec index 786b86f..2871add 100644 --- a/python-astroid.spec +++ b/python-astroid.spec @@ -5,29 +5,28 @@ %endif # This needs to be pulled from the source tarball -%global commit e003574ae51b +%global commit 315668c10333 Name: python-astroid -Version: 1.1 -Release: 5%{?dist} +Version: 1.2.1 +Release: 1%{?dist} Summary: Python Abstract Syntax Tree New Generation Group: Development/Languages License: GPLv2+ URL: http://www.astroid.org Source0: https://bitbucket.org/logilab/astroid/get/astroid-%{version}.tar.bz2 -Patch0: 0001-Fix-metaclass-recursion.patch Provides: python-astroid = %{version}-%{release} Obsoletes: python-logilab-astng <= 0.24.1 BuildArch: noarch BuildRequires: python-devel python-setuptools python-tools -BuildRequires: python-logilab-common >= 0.61.0 -Requires: python-logilab-common >= 0.61.0 +BuildRequires: python-logilab-common >= 0.62.1 +Requires: python-logilab-common >= 0.62.1 %if 0%{?with_python3} BuildRequires: python3-devel python3-setuptools python3-tools -BuildRequires: python3-logilab-common >= 0.61.0 +BuildRequires: python3-logilab-common >= 0.62.1 %endif # if with_python3 %description @@ -40,7 +39,7 @@ python module with some additional methods and attributes. %package -n python3-astroid Summary: Python Abstract Syntax Tree New Generation Group: Development/Languages -Requires: python3-logilab-common >= 0.61.0 +Requires: python3-logilab-common >= 0.62.1 %description -n python3-astroid The aim of this module is to provide a common base representation of @@ -51,7 +50,6 @@ python module with some additional methods and attributes. %prep %setup -q -n logilab-astroid-%{commit} -%patch0 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -114,6 +112,10 @@ popd %endif # with_python3 %changelog +* Fri Oct 03 2014 Brian C. Lane 1.2.1-1 +- Upstream v1.2.1 + Drop patches now included in upstream + * Sat Jun 07 2014 Fedora Release Engineering - 1.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild diff --git a/sources b/sources index 6f0a4d5..241ecde 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0301357d68c27894da5f6270e570b504 astroid-1.1.tar.bz2 +87deca0be1099cd1771f6792499b5772 astroid-1.2.1.tar.bz2