commit python-astroid for openSUSE:Factory
Hello community, here is the log from the commit of package python-astroid for openSUSE:Factory checked in at 2016-04-22 16:22:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-astroid (Old) and /work/SRC/openSUSE:Factory/.python-astroid.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-astroid" Changes: -------- --- /work/SRC/openSUSE:Factory/python-astroid/python-astroid.changes 2016-01-13 22:46:15.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-astroid.new/python-astroid.changes 2016-04-22 16:22:49.000000000 +0200 @@ -1,0 +2,11 @@ +Wed Feb 10 12:58:40 UTC 2016 - michael@stroeder.com + +- Added missing dependencies on python-lazy_object_proxy + and python-wrapt +- Update to version 1.4.4 + * unpack_infer raises InferenceError if it can't operate + with the given sequences of nodes. + * Support accessing properties with super(). + * Enforce strong updates per frames. + +------------------------------------------------------------------- Old: ---- astroid-1.4.3.tar.gz New: ---- astroid-1.4.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-astroid.spec ++++++ --- /var/tmp/diff_new_pack.PPEVrU/_old 2016-04-22 16:22:50.000000000 +0200 +++ /var/tmp/diff_new_pack.PPEVrU/_new 2016-04-22 16:22:50.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-astroid -Version: 1.4.3 +Version: 1.4.4 Release: 0 Url: https://github.com/pycqa/astroid Summary: Rebuild a new abstract syntax tree from Python's ast @@ -29,6 +29,8 @@ BuildRequires: python-setuptools BuildRequires: python-six Requires: python-six +Requires: python-lazy_object_proxy +Requires: python-wrapt %if 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else ++++++ astroid-1.4.3.tar.gz -> astroid-1.4.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/ChangeLog new/astroid-1.4.4/ChangeLog --- old/astroid-1.4.3/ChangeLog 2015-12-24 16:03:30.000000000 +0100 +++ new/astroid-1.4.4/ChangeLog 2016-01-15 18:00:46.000000000 +0100 @@ -1,6 +1,25 @@ Change log for the astroid package (used to be astng) ===================================================== +2016-01-15 -- 1.4.4 + + * unpack_infer raises InferenceError if it can't operate + with the given sequences of nodes. + + * Support accessing properties with super(). + + * Enforce strong updates per frames. + + When looking up a name in a scope, Scope.lookup will return + only the values which will be reachable after execution, as seen + in the following code: + + a = 1 + a = 2 + + In this case it doesn't make sense to return two values, but + only the last one. + 2015-12-24 -- 1.4.3 * pkg_resources brain tips are a bit more specific, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/PKG-INFO new/astroid-1.4.4/PKG-INFO --- old/astroid-1.4.3/PKG-INFO 2015-12-24 16:13:30.000000000 +0100 +++ new/astroid-1.4.4/PKG-INFO 2016-01-15 18:12:28.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: astroid -Version: 1.4.3 +Version: 1.4.4 Summary: A abstract syntax tree for Python with inference support. Home-page: http://bitbucket.org/logilab/astroid Author: Logilab diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/__pkginfo__.py new/astroid-1.4.4/astroid/__pkginfo__.py --- old/astroid-1.4.3/astroid/__pkginfo__.py 2015-12-24 16:03:37.000000000 +0100 +++ new/astroid-1.4.4/astroid/__pkginfo__.py 2016-01-15 18:00:51.000000000 +0100 @@ -20,7 +20,7 @@ modname = 'astroid' -numversion = (1, 4, 3) +numversion = (1, 4, 4) version = '.'.join([str(num) for num in numversion]) install_requires = ['six', 'lazy_object_proxy', 'wrapt'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/brain/brain_stdlib.py new/astroid-1.4.4/astroid/brain/brain_stdlib.py --- old/astroid-1.4.3/astroid/brain/brain_stdlib.py 2015-12-24 16:02:22.000000000 +0100 +++ new/astroid-1.4.4/astroid/brain/brain_stdlib.py 2016-01-15 18:00:20.000000000 +0100 @@ -156,6 +156,15 @@ def pkg_resources_transform(): return AstroidBuilder(MANAGER).string_build(''' +def require(*requirements): + return pkg_resources.working_set.require(*requirements) + +def run_script(requires, script_name): + return pkg_resources.working_set.run_script(requires, script_name) + +def iter_entry_points(group, name=None): + return pkg_resources.working_set.iter_entry_points(group, name) + def resource_exists(package_or_requirement, resource_name): return get_provider(package_or_requirement).has_resource(resource_name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/node_classes.py new/astroid-1.4.4/astroid/node_classes.py --- old/astroid-1.4.3/astroid/node_classes.py 2015-12-24 16:02:22.000000000 +0100 +++ new/astroid-1.4.4/astroid/node_classes.py 2016-01-15 18:00:20.000000000 +0100 @@ -35,6 +35,7 @@ BUILTINS = six.moves.builtins.__name__ +@bases.raise_if_nothing_inferred def unpack_infer(stmt, context=None): """recursively generate nodes inferred by the given statement. If the inferred value is a list or a tuple, recurse on the elements @@ -196,8 +197,7 @@ if self.statement() is myframe and myframe.parent: myframe = myframe.parent.frame() - if not myframe is frame or self is frame: - return stmts + mystmt = self.statement() # line filtering if we are in the same frame # @@ -217,9 +217,8 @@ if mylineno > 0 and stmt.fromlineno > mylineno: break assert hasattr(node, 'assign_type'), (node, node.scope(), - node.scope()._locals) + node.scope().locals) assign_type = node.assign_type() - if node.has_base(self): break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/objects.py new/astroid-1.4.4/astroid/objects.py --- old/astroid-1.4.3/astroid/objects.py 2015-12-24 16:02:22.000000000 +0100 +++ new/astroid-1.4.4/astroid/objects.py 2016-01-15 18:00:20.000000000 +0100 @@ -31,7 +31,7 @@ from astroid import MANAGER from astroid.bases import ( BUILTINS, NodeNG, Instance, _infer_stmts, - BoundMethod, + BoundMethod, _is_property ) from astroid.decorators import cachedproperty from astroid.exceptions import ( @@ -172,6 +172,10 @@ yield infered elif self._class_based or infered.type == 'staticmethod': yield infered + elif _is_property(infered): + # TODO: support other descriptors as well. + for value in infered.infer_call_result(self, context): + yield value else: yield BoundMethod(infered, cls) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/tests/unittest_lookup.py new/astroid-1.4.4/astroid/tests/unittest_lookup.py --- old/astroid-1.4.3/astroid/tests/unittest_lookup.py 2015-12-24 16:02:22.000000000 +0100 +++ new/astroid-1.4.4/astroid/tests/unittest_lookup.py 2016-01-15 18:00:20.000000000 +0100 @@ -55,13 +55,14 @@ a = next(astroid.nodes_of_class(nodes.Name)) self.assertEqual(a.lineno, 2) if sys.version_info < (3, 0): - self.assertEqual(len(astroid.lookup('b')[1]), 2) - self.assertEqual(len(astroid.lookup('a')[1]), 3) + self.assertEqual(len(astroid.lookup('b')[1]), 1) + self.assertEqual(len(astroid.lookup('a')[1]), 1) b = astroid._locals['b'][1] else: self.assertEqual(len(astroid.lookup('b')[1]), 1) - self.assertEqual(len(astroid.lookup('a')[1]), 2) + self.assertEqual(len(astroid.lookup('a')[1]), 1) b = astroid._locals['b'][0] + stmts = a.lookup('a')[1] self.assertEqual(len(stmts), 1) self.assertEqual(b.lineno, 6) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/tests/unittest_objects.py new/astroid-1.4.4/astroid/tests/unittest_objects.py --- old/astroid-1.4.3/astroid/tests/unittest_objects.py 2015-12-24 16:02:22.000000000 +0100 +++ new/astroid-1.4.4/astroid/tests/unittest_objects.py 2016-01-15 18:00:20.000000000 +0100 @@ -495,7 +495,7 @@ inferred.super_mro() with self.assertRaises(exceptions.SuperArgumentTypeError): inferred.super_mro() - + def test_super_pytype_display_type_name(self): node = test_utils.extract_node(''' class A(object): @@ -506,6 +506,24 @@ self.assertEqual(inferred.pytype(), "%s.super" % bases.BUILTINS) self.assertEqual(inferred.display_type(), 'Super of') self.assertEqual(inferred.name, 'A') + + def test_super_properties(self): + node = test_utils.extract_node(''' + class Foo(object): + @property + def dict(self): + return 42 + + class Bar(Foo): + @property + def dict(self): + return super(Bar, self).dict + + Bar().dict + ''') + inferred = next(node.infer()) + self.assertIsInstance(inferred, nodes.Const) + self.assertEqual(inferred.value, 42) if __name__ == '__main__': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid/tests/unittest_utils.py new/astroid-1.4.4/astroid/tests/unittest_utils.py --- old/astroid-1.4.3/astroid/tests/unittest_utils.py 2015-12-24 16:02:22.000000000 +0100 +++ new/astroid-1.4.4/astroid/tests/unittest_utils.py 2016-01-15 18:04:29.000000000 +0100 @@ -18,6 +18,7 @@ import unittest from astroid import builder +from astroid import InferenceError from astroid import nodes from astroid import node_classes from astroid import test_utils @@ -110,7 +111,14 @@ self.assertTrue(all(elt is astroid_util.YES for elt in unpacked)) + def test_unpack_infer_empty_tuple(self): + node = test_utils.extract_node(''' + () + ''') + inferred = next(node.infer()) + with self.assertRaises(InferenceError): + list(node_classes.unpack_infer(inferred)) + if __name__ == '__main__': unittest.main() - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/astroid.egg-info/PKG-INFO new/astroid-1.4.4/astroid.egg-info/PKG-INFO --- old/astroid-1.4.3/astroid.egg-info/PKG-INFO 2015-12-24 16:13:17.000000000 +0100 +++ new/astroid-1.4.4/astroid.egg-info/PKG-INFO 2016-01-15 18:12:05.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: astroid -Version: 1.4.3 +Version: 1.4.4 Summary: A abstract syntax tree for Python with inference support. Home-page: http://bitbucket.org/logilab/astroid Author: Logilab diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/astroid-1.4.3/setup.cfg new/astroid-1.4.4/setup.cfg --- old/astroid-1.4.3/setup.cfg 2015-12-24 16:13:30.000000000 +0100 +++ new/astroid-1.4.4/setup.cfg 2016-01-15 18:12:28.000000000 +0100 @@ -2,7 +2,7 @@ universal = 1 [egg_info] -tag_date = 0 -tag_svn_revision = 0 tag_build = +tag_svn_revision = 0 +tag_date = 0
participants (1)
-
root@hilbert.suse.de