From 0b3b288ad0165cfcf74c4f440b69109958624477 Mon Sep 17 00:00:00 2001 From: Brian C. Lane Date: Sep 03 2013 17:01:59 +0000 Subject: - Add upstream patch for TypeError bug --- diff --git a/0001-fix-error-in-namedtuple-inference-we-should-add-an-a.patch b/0001-fix-error-in-namedtuple-inference-we-should-add-an-a.patch new file mode 100644 index 0000000..b3f34b0 --- /dev/null +++ b/0001-fix-error-in-namedtuple-inference-we-should-add-an-a.patch @@ -0,0 +1,28 @@ +From 1c1248d1c18b0121d8b7d641edbb2ff7e799db17 Mon Sep 17 00:00:00 2001 +From: "Brian C. Lane" +Date: Tue, 3 Sep 2013 09:14:19 -0700 +Subject: [PATCH] fix error in namedtuple inference, we should add an astng + class node *instance* in .bases + +From upstream commit: +https://bitbucket.org/logilab/astroid/commits/5ed6266cab789bc89d882444c938f03953491496 +--- + brain/py2stdlib.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/brain/py2stdlib.py b/brain/py2stdlib.py +index 739a4ad..f43bd35 100644 +--- a/brain/py2stdlib.py ++++ b/brain/py2stdlib.py +@@ -201,7 +201,7 @@ def infer_named_tuple(node, context=None): + # we want to return a Class node instance with proper attributes set + class_node = nodes.Class(name, 'docstring') + # set base class=tuple +- class_node.bases.append(nodes.Tuple) ++ class_node.bases.append(nodes.Tuple._proxied) + # XXX add __init__(*attributes) method + for attr in attributes: + fake_node = nodes.EmptyNode() +-- +1.8.3.1 + diff --git a/python-astroid.spec b/python-astroid.spec index c6126ee..ae4530d 100644 --- a/python-astroid.spec +++ b/python-astroid.spec @@ -10,13 +10,15 @@ Name: python-astroid Version: 1.0.0 -Release: 2%{?dist} +Release: 3%{?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-%{version}.tar.bz2 +Patch0: 0001-fix-error-in-namedtuple-inference-we-should-add-an-a.patch + Provides: python-astroid = %{version}-%{release} Obsoletes: python-astng @@ -50,6 +52,7 @@ python module with some additional methods and attributes. %prep %setup -q -n logilab-astroid-%{commit} +%patch0 -p1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -112,6 +115,9 @@ popd %endif # with_python3 %changelog +* Tue Sep 03 2013 Brian C. Lane 1.0.0-3 +- Add upstream patch for TypeError bug + * Fri Aug 16 2013 Brian C. Lane 1.0.0-2 - Removed BuildRoot from spec