[Python-modules-commits] [astroid] 02/05: Import astroid_1.4.7.orig.tar.gz
Sandro Tosi
morph at moszumanska.debian.org
Mon Jul 18 18:28:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository astroid.
commit 7c7ec7989a7e6aceb692b784cde169012f69e270
Author: Sandro Tosi <morph at debian.org>
Date: Mon Jul 18 19:24:49 2016 +0100
Import astroid_1.4.7.orig.tar.gz
---
ChangeLog | 9 +++++++++
PKG-INFO | 8 ++++----
astroid.egg-info/PKG-INFO | 8 ++++----
astroid/__pkginfo__.py | 8 ++++----
astroid/rebuilder.py | 4 +++-
astroid/tests/unittest_regrtest.py | 13 +++++++++++++
6 files changed, 37 insertions(+), 13 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2fd0a96..e46a8fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
Change log for the astroid package (used to be astng)
=====================================================
+2016-07-07 -- 1.4.7
+
+ * Stop saving assignment locals in ExceptHandlers, when the context is a store.
+
+ This fixes a tripping case, where the RHS of a ExceptHandler can be redefined
+ by the LHS, leading to a local save. For instance, ``except KeyError, exceptions.IndexError``
+ could result in a local save for IndexError as KeyError, resulting in potential unexpected
+ inferences. Since we don't lose a lot, this syntax gets prohibited.
+
2016-06-06 -- 1.4.6
* Fix a crash which occurred when the class of a namedtuple could not be inferred.
diff --git a/PKG-INFO b/PKG-INFO
index 6ff1833..76272c3 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,10 +1,10 @@
Metadata-Version: 1.1
Name: astroid
-Version: 1.4.6
+Version: 1.4.7
Summary: A abstract syntax tree for Python with inference support.
-Home-page: http://bitbucket.org/logilab/astroid
-Author: Logilab
-Author-email: pylint-dev at lists.logilab.org
+Home-page: https://github.com/PyCQA/astroid
+Author: Python Code Quality Authority
+Author-email: code-quality at python.org
License: LGPL
Description: .. image:: https://drone.io/bitbucket.org/logilab/astroid/status.png
:alt: drone.io Build Status
diff --git a/astroid.egg-info/PKG-INFO b/astroid.egg-info/PKG-INFO
index 6ff1833..76272c3 100644
--- a/astroid.egg-info/PKG-INFO
+++ b/astroid.egg-info/PKG-INFO
@@ -1,10 +1,10 @@
Metadata-Version: 1.1
Name: astroid
-Version: 1.4.6
+Version: 1.4.7
Summary: A abstract syntax tree for Python with inference support.
-Home-page: http://bitbucket.org/logilab/astroid
-Author: Logilab
-Author-email: pylint-dev at lists.logilab.org
+Home-page: https://github.com/PyCQA/astroid
+Author: Python Code Quality Authority
+Author-email: code-quality at python.org
License: LGPL
Description: .. image:: https://drone.io/bitbucket.org/logilab/astroid/status.png
:alt: drone.io Build Status
diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py
index d197cda..18a9e97 100644
--- a/astroid/__pkginfo__.py
+++ b/astroid/__pkginfo__.py
@@ -20,17 +20,17 @@ distname = 'astroid'
modname = 'astroid'
-numversion = (1, 4, 6)
+numversion = (1, 4, 7)
version = '.'.join([str(num) for num in numversion])
install_requires = ['six', 'lazy_object_proxy', 'wrapt']
license = 'LGPL'
-author = 'Logilab'
-author_email = 'pylint-dev at lists.logilab.org'
+author = 'Python Code Quality Authority'
+author_email = 'code-quality at python.org'
mailinglist = "mailto://%s" % author_email
-web = 'http://bitbucket.org/logilab/astroid'
+web = 'https://github.com/PyCQA/astroid'
description = "A abstract syntax tree for Python with inference support."
diff --git a/astroid/rebuilder.py b/astroid/rebuilder.py
index eee401c..859b828 100644
--- a/astroid/rebuilder.py
+++ b/astroid/rebuilder.py
@@ -560,8 +560,10 @@ class TreeRebuilder(object):
newnode = new.DelAttr()
elif assign_ctx == "Assign":
# FIXME : maybe we should call visit_assattr ?
+ # Prohibit a local save if we are in an ExceptHandler.
newnode = new.AssignAttr()
- self._delayed_assattr.append(newnode)
+ if not isinstance(parent, new.ExceptHandler):
+ self._delayed_assattr.append(newnode)
else:
newnode = new.Attribute()
_lineno_parent(node, newnode, parent)
diff --git a/astroid/tests/unittest_regrtest.py b/astroid/tests/unittest_regrtest.py
index 6a0f762..a5116bb 100644
--- a/astroid/tests/unittest_regrtest.py
+++ b/astroid/tests/unittest_regrtest.py
@@ -343,6 +343,19 @@ def test():
''')
next(node.infer())
+ @require_version(maxver='3.0')
+ def test_reassignment_in_except_handler(self):
+ node = extract_node('''
+ import exceptions
+ try:
+ {}["a"]
+ except KeyError, exceptions.IndexError:
+ pass
+
+ IndexError #@
+ ''')
+ self.assertEqual(len(node.inferred()), 1)
+
class Whatever(object):
a = property(lambda x: x, lambda x: x)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/astroid.git
More information about the Python-modules-commits
mailing list