Hello community,

here is the log from the commit of package python-rope for openSUSE:Leap:15.2 
checked in at 2020-03-02 13:22:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-rope (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-rope.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-rope"

Mon Mar  2 13:22:21 2020 rev:11 rq:777100 version:0.14.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-rope/python-rope.changes        
2020-01-15 15:52:42.731572758 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-rope.new.26092/python-rope.changes     
2020-03-02 13:22:22.442281055 +0100
@@ -1,0 +2,48 @@
+Tue Jan 14 15:29:21 CET 2020 - Matej Cepl <[email protected]>
+
+- Add isAlive_failed_test.patch as a fix for gh#python-rope/rope#283
+
+-------------------------------------------------------------------
+Thu Jan  2 10:23:54 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Run the pytest call only once
+
+-------------------------------------------------------------------
+Sat Mar 23 00:17:25 CET 2019 - Matej Cepl <[email protected]>
+
+- Upgrade to 0.14.0:
+  - relicensing to LGPLv3+
+  - bugfixes
+
+-------------------------------------------------------------------
+Thu Mar  7 11:16:41 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Fix expansion of test removal
+
+-------------------------------------------------------------------
+Mon Feb 11 11:01:31 UTC 2019 - Matej Cepl <[email protected]>
+
+- Upgrade to 0.12.0:
+    * gh#python-rope/rope#218: support for all of the new
+      async-related nodes.
+    * gh#python-rope/rope#259: fix installation issues on Windows
+
+-------------------------------------------------------------------
+Wed Jan 16 17:41:43 CET 2019 - [email protected]
+
+- Workaround gh#python-rope/rope#247 (some tests fail on Python 3.7)
+
+-------------------------------------------------------------------
+Wed Aug 29 11:52:04 UTC 2018 - [email protected]
+
+- Fix buildrequires to not require devel
+- Run tests without conditional
+
+-------------------------------------------------------------------
+Thu Aug  9 07:55:22 UTC 2018 - [email protected]
+
+- update to 0.11.0
+  + Upstream provides no changelog
+- Remove patch CVE-2014-3539-disable-doa.patch (included upstream)
+
+-------------------------------------------------------------------

Old:
----
  CVE-2014-3539-disable-doa.patch
  rope-0.10.7.tar.gz

New:
----
  isAlive_failed_test.patch
  rope-0.14.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-rope.spec ++++++
--- /var/tmp/diff_new_pack.19ufti/_old  2020-03-02 13:22:23.102282368 +0100
+++ /var/tmp/diff_new_pack.19ufti/_new  2020-03-02 13:22:23.102282368 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-rope
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,27 +12,28 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
+%define upname rope
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without test
 Name:           python-rope
-Version:        0.10.7
+Version:        0.14.0
 Release:        0
 Summary:        A python refactoring library
-License:        GPL-2.0+
+License:        LGPL-3.0-or-later
 Group:          Development/Languages/Python
-Url:            https://github.com/python-rope/rope
+URL:            https://github.com/python-rope/rope
 Source:         
https://files.pythonhosted.org/packages/source/r/rope/rope-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM - CVE-2014-3539-disable-doa.patch - 
https://github.com/python-rope/rope/issues/105
-Patch0:         CVE-2014-3539-disable-doa.patch
-BuildRequires:  %{python_module devel}
+# PATCH-FIX-UPSTREAM isAlive_failed_test.patch gh#python-rope/rope#283 
[email protected]
+# Fix problems with aliased collections -> collections.abc
+Patch0:         isAlive_failed_test.patch
+BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 BuildArch:      noarch
-
 %python_subpackages
 
 %description
@@ -40,27 +41,26 @@
 
 %prep
 %setup -q -n rope-%{version}
-%patch0 -p1
+%autopatch -p1
 
 %build
 export LANG=en_US.UTF-8
-%{python_build}
+%python_build
 
 %install
 export LANG=en_US.UTF-8
-%{python_install}
-%{python_expand rm -rf %{buildroot}/%{%python_sitelib}/python-rope/ropetest/
+%python_install
+%{python_expand rm -rf %{buildroot}/%{$python_sitelib}/python-rope/ropetest/
 %fdupes %{buildroot}/%{$python_sitelib}
 }
 
-%if %{with test}
 %check
 export LANG=en_US.UTF-8
-%python_exec setup.py test
-%endif
+%pytest
 
 %files %{python_files}
-%doc COPYING README.rst 
+%license COPYING
+%doc README.rst
 %doc docs/
 %{python_sitelib}/
 

++++++ isAlive_failed_test.patch ++++++
diff --git a/rope/base/ast.py b/rope/base/ast.py
index d43c83c5..d24524e7 100644
--- a/rope/base/ast.py
+++ b/rope/base/ast.py
@@ -1,5 +1,6 @@
-import _ast
-from _ast import *
+from __future__ import absolute_import
+import ast
+from ast import *
 
 from rope.base import fscommands
 
@@ -18,7 +19,7 @@ def parse(source, filename='<string>'):
     if not source.endswith(b'\n'):
         source += b'\n'
     try:
-        return compile(source, filename, 'exec', _ast.PyCF_ONLY_AST)
+        return ast.parse(source, filename='<unknown>')
     except (TypeError, ValueError) as e:
         error = SyntaxError()
         error.lineno = 1
@@ -32,7 +33,7 @@ def walk(node, walker):
     method_name = '_' + node.__class__.__name__
     method = getattr(walker, method_name, None)
     if method is not None:
-        if isinstance(node, _ast.ImportFrom) and node.module is None:
+        if isinstance(node, ast.ImportFrom) and node.module is None:
             # In python < 2.7 ``node.module == ''`` for relative imports
             # but for python 2.7 it is None. Generalizing it to ''.
             node.module = ''
@@ -42,7 +43,7 @@ def walk(node, walker):
 
 
 def get_child_nodes(node):
-    if isinstance(node, _ast.Module):
+    if isinstance(node, ast.Module):
         return node.body
     result = []
     if node._fields is not None:
@@ -50,9 +51,9 @@ def get_child_nodes(node):
             child = getattr(node, name)
             if isinstance(child, list):
                 for entry in child:
-                    if isinstance(entry, _ast.AST):
+                    if isinstance(entry, ast.AST):
                         result.append(entry)
-            if isinstance(child, _ast.AST):
+            if isinstance(child, ast.AST):
                 result.append(child)
     return result
 
diff --git a/rope/base/oi/type_hinting/utils.py 
b/rope/base/oi/type_hinting/utils.py
index aec82ac0..ce90dfeb 100644
--- a/rope/base/oi/type_hinting/utils.py
+++ b/rope/base/oi/type_hinting/utils.py
@@ -1,8 +1,12 @@
-import rope.base.builtins
+import logging
+try:
+    from typing import Union, Optional
+except ImportError:
+    pass
 import rope.base.utils as base_utils
 from rope.base.evaluate import ScopeNameFinder
 from rope.base.exceptions import AttributeNotFoundError
-from rope.base.pyobjects import PyClass, PyFunction
+from rope.base.pyobjects import PyClass, PyDefinedObject, PyFunction, PyObject
 from rope.base.utils import pycompat
 
 
@@ -66,33 +70,47 @@ def get_lineno_for_node(assign_node):
 
 def get_mro(pyclass):
     # FIXME: to use real mro() result
-    l = [pyclass]
-    for cls in l:
+    class_list = [pyclass]
+    for cls in class_list:
         for super_cls in cls.get_superclasses():
-            if isinstance(super_cls, PyClass) and super_cls not in l:
-                l.append(super_cls)
-    return l
+            if isinstance(super_cls, PyClass) and super_cls not in class_list:
+                class_list.append(super_cls)
+    return class_list
 
 
 def resolve_type(type_name, pyobject):
+    # type: (str, Union[PyDefinedObject, PyObject]) -> 
Optional[PyDefinedObject, PyObject]
     """
-    :type type_name: str
-    :type pyobject: rope.base.pyobjects.PyDefinedObject | 
rope.base.pyobjects.PyObject
-    :rtype: rope.base.pyobjects.PyDefinedObject | rope.base.pyobjects.PyObject 
or None
+    Find proper type object from its name.
     """
+    deprecated_aliases = {'collections': 'collections.abc'}
+    ret_type = None
+    logging.debug('Looking for %s', type_name)
     if '.' not in type_name:
         try:
-            return 
pyobject.get_module().get_scope().get_name(type_name).get_object()
-        except Exception:
-            pass
+            ret_type = pyobject.get_module().get_scope().get_name(
+                type_name).get_object()
+        except AttributeNotFoundError:
+            logging.exception('Cannot resolve type %s', type_name)
     else:
         mod_name, attr_name = type_name.rsplit('.', 1)
         try:
             mod_finder = ScopeNameFinder(pyobject.get_module())
             mod = mod_finder._find_module(mod_name).get_object()
-            return mod.get_attribute(attr_name).get_object()
-        except Exception:
-            pass
+            ret_type = mod.get_attribute(attr_name).get_object()
+        except AttributeNotFoundError:
+            if mod_name in deprecated_aliases:
+                try:
+                    logging.debug('Looking for %s in %s',
+                                  attr_name, deprecated_aliases[mod_name])
+                    mod = mod_finder._find_module(
+                        deprecated_aliases[mod_name]).get_object()
+                    ret_type = mod.get_attribute(attr_name).get_object()
+                except AttributeNotFoundError:
+                    logging.exception('Cannot resolve type %s in %s',
+                                      attr_name, dir(mod))
+    logging.debug('ret_type = %s', ret_type)
+    return ret_type
 
 
 class ParametrizeType(object):
diff --git a/rope/base/utils/datastructures.py 
b/rope/base/utils/datastructures.py
index 0cb16cf2..3790a6e1 100644
--- a/rope/base/utils/datastructures.py
+++ b/rope/base/utils/datastructures.py
@@ -1,10 +1,13 @@
 # this snippet was taken from this link
 # http://code.activestate.com/recipes/576694/
 
-import collections
+try:
+    from collections import MutableSet
+except ImportError:
+    from collections.abc import MutableSet
 
 
-class OrderedSet(collections.MutableSet):
+class OrderedSet(MutableSet):
 
     def __init__(self, iterable=None):
         self.end = end = []
diff --git a/rope/base/utils/pycompat.py b/rope/base/utils/pycompat.py
index 1214658f..de7cf2e4 100644
--- a/rope/base/utils/pycompat.py
+++ b/rope/base/utils/pycompat.py
@@ -1,5 +1,5 @@
 import sys
-import _ast
+import ast
 # from rope.base import ast
 
 PY2 = sys.version_info[0] == 2
@@ -15,7 +15,7 @@ except NameError:  # PY3
     str = str
     string_types = (str,)
     import builtins
-    ast_arg_type = _ast.arg
+    ast_arg_type = ast.arg
 
     def execfile(fn, global_vars=None, local_vars=None):
         with open(fn) as f:
@@ -34,7 +34,7 @@ else:  # PY2
 
     string_types = (basestring,)
     builtins = __import__('__builtin__')
-    ast_arg_type = _ast.Name
+    ast_arg_type = ast.Name
     execfile = execfile
 
     def get_ast_arg_arg(node):
diff --git a/ropetest/type_hinting_test.py b/ropetest/type_hinting_test.py
index 7cc02bb1..afb98e19 100644
--- a/ropetest/type_hinting_test.py
+++ b/ropetest/type_hinting_test.py
@@ -198,18 +198,18 @@ class AbstractAssignmentHintingTest(AbstractHintingTest):
                + 
self._make_class_hint('collections.Iterable[threading.Thread]') + \
                '    def a_method(self):\n' \
                '        for i in self.a_attr:\n' \
-               '            i.isA'
+               '            i.is_a'
         result = self._assist(code)
-        self.assert_completion_in_result('isAlive', 'attribute', result)
+        self.assert_completion_in_result('is_alive', 'attribute', result)
 
     def test_hint_parametrized_iterator(self):
         code = 'class Sample(object):\n' \
                + 
self._make_class_hint('collections.Iterator[threading.Thread]') + \
                '    def a_method(self):\n' \
                '        for i in self.a_attr:\n' \
-               '            i.isA'
+               '            i.is_a'
         result = self._assist(code)
-        self.assert_completion_in_result('isAlive', 'attribute', result)
+        self.assert_completion_in_result('is_alive', 'attribute', result)
 
     def test_hint_parametrized_dict_key(self):
         code = 'class Sample(object):\n' \
++++++ rope-0.10.7.tar.gz -> rope-0.14.0.tar.gz ++++++
++++ 1879 lines of diff (skipped)


Reply via email to