diff --git a/Python38-compatibility.patch b/Python38-compatibility.patch deleted file mode 100644 index 51d6ac3..0000000 --- a/Python38-compatibility.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- - ropetest/advanced_oi_test.py | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- a/ropetest/advanced_oi_test.py -+++ b/ropetest/advanced_oi_test.py -@@ -241,12 +241,12 @@ class DynamicOITest(unittest.TestCase): - for name in ('C', 'f', 'a_var', 'a_list', 'a_str', 'a_file'): - var = pymod[name].get_object() - self.assertEqual(to_textual.transform(var), -- complex_to_textual(var)) -+ complex_to_textual(var), "name {}:".format(name)) - self.assertEqual(to_textual.transform(pymod), -- complex_to_textual(pymod)) -+ complex_to_textual(pymod)) - enumerate_func = rope.base.builtins.builtins['enumerate'].get_object() - self.assertEqual(to_textual.transform(enumerate_func), -- complex_to_textual(enumerate_func)) -+ complex_to_textual(enumerate_func)) - - def test_arguments_with_keywords(self): - mod = testutils.create_module(self.project, 'mod') diff --git a/assertEquals.patch b/assertEquals.patch deleted file mode 100644 index 52e385c..0000000 --- a/assertEquals.patch +++ /dev/null @@ -1,318 +0,0 @@ ---- a/ropetest/advanced_oi_test.py -+++ b/ropetest/advanced_oi_test.py -@@ -644,7 +644,7 @@ class NewStaticOITest(unittest.TestCase) - self.pycore.analyze_module(self.mod) - pymod = self.project.get_pymodule(self.mod) - a_var = pymod['a_var'].get_object() -- self.assertEquals(Str, type(a_var.get_type())) -+ self.assertEqual(Str, type(a_var.get_type())) - - @testutils.only_for_versions_higher('3.6') - def test_soi_on_typed_assignment(self): -@@ -653,7 +653,7 @@ class NewStaticOITest(unittest.TestCase) - self.pycore.analyze_module(self.mod) - pymod = self.project.get_pymodule(self.mod) - a_var = pymod['a_var'].get_object() -- self.assertEquals(Str, type(a_var.get_type())) -+ self.assertEqual(Str, type(a_var.get_type())) - - def test_not_saving_unknown_function_returns(self): - mod2 = testutils.create_module(self.project, 'mod2') ---- a/ropetest/contrib/codeassisttest.py -+++ b/ropetest/contrib/codeassisttest.py -@@ -91,7 +91,7 @@ class CodeAssistTest(unittest.TestCase): - result = self._assist(code) - count = len([x for x in result - if x.name == 'variable' and x.scope == 'global']) -- self.assertEquals(1, count) -+ self.assertEqual(1, count) - - def test_throwing_exception_in_case_of_syntax_errors(self): - code = 'sample (sdf+)\n' -@@ -115,7 +115,7 @@ class CodeAssistTest(unittest.TestCase): - - def test_completion_result(self): - code = 'my_global = 10\nt = my' -- self.assertEquals(len(code) - 2, starting_offset(code, len(code))) -+ self.assertEqual(len(code) - 2, starting_offset(code, len(code))) - - def test_completing_imported_names(self): - code = 'import sys\na = sy' -@@ -345,12 +345,12 @@ class CodeAssistTest(unittest.TestCase): - def test_get_definition_location(self): - code = 'def a_func():\n pass\na_func()' - result = get_definition_location(self.project, code, len(code) - 3) -- self.assertEquals((None, 1), result) -+ self.assertEqual((None, 1), result) - - def test_get_definition_location_underlined_names(self): - code = 'def a_sample_func():\n pass\na_sample_func()' - result = get_definition_location(self.project, code, len(code) - 11) -- self.assertEquals((None, 1), result) -+ self.assertEqual((None, 1), result) - - def test_get_definition_location_dotted_names(self): - code = 'class AClass(object):\n' \ -@@ -359,14 +359,14 @@ class CodeAssistTest(unittest.TestCase): - ' pass\n' \ - 'AClass.a_method()' - result = get_definition_location(self.project, code, len(code) - 3) -- self.assertEquals((None, 2), result) -+ self.assertEqual((None, 2), result) - - def test_get_definition_location_dotted_module_names(self): - module_resource = testutils.create_module(self.project, 'mod') - module_resource.write('def a_func():\n pass\n') - code = 'import mod\nmod.a_func()' - result = get_definition_location(self.project, code, len(code) - 3) -- self.assertEquals((module_resource, 1), result) -+ self.assertEqual((module_resource, 1), result) - - def test_get_definition_location_for_nested_packages(self): - mod1 = testutils.create_module(self.project, 'mod1') -@@ -377,33 +377,33 @@ class CodeAssistTest(unittest.TestCase): - init_dot_py = pkg2.get_child('__init__.py') - found_pyname = get_definition_location(self.project, mod1.read(), - mod1.read().index('pkg2') + 1) -- self.assertEquals(init_dot_py, found_pyname[0]) -+ self.assertEqual(init_dot_py, found_pyname[0]) - - def test_get_definition_location_unknown(self): - code = 'a_func()\n' - result = get_definition_location(self.project, code, len(code) - 3) -- self.assertEquals((None, None), result) -+ self.assertEqual((None, None), result) - - def test_get_definition_location_dot_spaces(self): - code = 'class AClass(object):\n ' \ - '@staticmethod\n def a_method():\n' \ - ' pass\nAClass.\\\n a_method()' - result = get_definition_location(self.project, code, len(code) - 3) -- self.assertEquals((None, 2), result) -+ self.assertEqual((None, 2), result) - - def test_get_definition_location_dot_line_break_inside_parens(self): - code = 'class A(object):\n def a_method(self):\n pass\n' + \ - '(A.\na_method)' - result = get_definition_location(self.project, code, - code.rindex('a_method') + 1) -- self.assertEquals((None, 2), result) -+ self.assertEqual((None, 2), result) - - def test_if_scopes_in_other_scopes_for_get_definition_location(self): - code = 'def f(a_var):\n pass\na_var = 10\n' + \ - 'if True:\n' + \ - ' print(a_var)\n' - result = get_definition_location(self.project, code, len(code) - 3) -- self.assertEquals((None, 3), result) -+ self.assertEqual((None, 3), result) - - def test_code_assists_in_parens(self): - code = 'def a_func(a_var):\n pass\na_var = 10\na_func(a_' -@@ -425,8 +425,8 @@ class CodeAssistTest(unittest.TestCase): - ' my_sample_var = 20\n' + \ - ' my_sample_' - proposals = sorted_proposals(self._assist(code)) -- self.assertEquals('my_sample_var', proposals[0].name) -- self.assertEquals('my_sample_function', proposals[1].name) -+ self.assertEqual('my_sample_var', proposals[0].name) -+ self.assertEqual('my_sample_function', proposals[1].name) - - def test_proposals_sorter_for_methods_and_attributes(self): - code = 'class A(object):\n' + \ -@@ -439,9 +439,9 @@ class CodeAssistTest(unittest.TestCase): - 'a_var = A()\n' + \ - 'a_var.my_' - proposals = sorted_proposals(self._assist(code)) -- self.assertEquals('my_b_func', proposals[0].name) -- self.assertEquals('my_c_func', proposals[1].name) -- self.assertEquals('my_a_var', proposals[2].name) -+ self.assertEqual('my_b_func', proposals[0].name) -+ self.assertEqual('my_c_func', proposals[1].name) -+ self.assertEqual('my_a_var', proposals[2].name) - - def test_proposals_sorter_for_global_methods_and_funcs(self): - code = 'def my_b_func(self):\n' + \ -@@ -449,8 +449,8 @@ class CodeAssistTest(unittest.TestCase): - 'my_a_var = 10\n' + \ - 'my_' - proposals = sorted_proposals(self._assist(code)) -- self.assertEquals('my_b_func', proposals[0].name) -- self.assertEquals('my_a_var', proposals[1].name) -+ self.assertEqual('my_b_func', proposals[0].name) -+ self.assertEqual('my_a_var', proposals[1].name) - - def test_proposals_sorter_underlined_methods(self): - code = 'class A(object):\n' + \ -@@ -461,8 +461,8 @@ class CodeAssistTest(unittest.TestCase): - 'a_var = A()\n' + \ - 'a_var.' - proposals = sorted_proposals(self._assist(code)) -- self.assertEquals('my_func', proposals[0].name) -- self.assertEquals('_my_func', proposals[1].name) -+ self.assertEqual('my_func', proposals[0].name) -+ self.assertEqual('_my_func', proposals[1].name) - - def test_proposals_sorter_and_scope_prefs(self): - code = 'my_global_var = 1\n' \ -@@ -471,8 +471,8 @@ class CodeAssistTest(unittest.TestCase): - ' my_' - result = self._assist(code) - proposals = sorted_proposals(result, scopepref=['global', 'local']) -- self.assertEquals('my_global_var', proposals[0].name) -- self.assertEquals('my_local_var', proposals[1].name) -+ self.assertEqual('my_global_var', proposals[0].name) -+ self.assertEqual('my_local_var', proposals[1].name) - - def test_proposals_sorter_and_type_prefs(self): - code = 'my_global_var = 1\n' \ -@@ -481,8 +481,8 @@ class CodeAssistTest(unittest.TestCase): - 'my_' - result = self._assist(code) - proposals = sorted_proposals(result, typepref=['instance', 'function']) -- self.assertEquals('my_global_var', proposals[0].name) -- self.assertEquals('my_global_func', proposals[1].name) -+ self.assertEqual('my_global_var', proposals[0].name) -+ self.assertEqual('my_global_func', proposals[1].name) - - def test_proposals_sorter_and_missing_type_in_typepref(self): - code = 'my_global_var = 1\n' \ -@@ -525,7 +525,7 @@ class CodeAssistTest(unittest.TestCase): - mod = testutils.create_module(self.project, 'mod') - mod.write('"""a module"""\n') - src = 'import mod\nmod' -- self.assertEquals('a module', get_doc(self.project, src, len(src) - 1)) -+ self.assertEqual('a module', get_doc(self.project, src, len(src) - 1)) - - def test_get_pydoc_for_builtins(self): - src = 'print(object)\n' -@@ -685,20 +685,20 @@ class CodeAssistTest(unittest.TestCase): - def test_simple_get_calltips(self): - src = 'def f():\n pass\nvar = f()\n' - doc = get_calltip(self.project, src, src.rindex('f')) -- self.assertEquals('f()', doc) -+ self.assertEqual('f()', doc) - - def test_get_calltips_for_classes(self): - src = 'class C(object):\n' \ - ' def __init__(self):\n pass\nC(' - doc = get_calltip(self.project, src, len(src) - 1) -- self.assertEquals('C.__init__(self)', doc) -+ self.assertEqual('C.__init__(self)', doc) - - def test_get_calltips_for_objects_with_call(self): - src = 'class C(object):\n' \ - ' def __call__(self, p):\n pass\n' \ - 'c = C()\nc(1,' - doc = get_calltip(self.project, src, src.rindex('c')) -- self.assertEquals('C.__call__(self, p)', doc) -+ self.assertEqual('C.__call__(self, p)', doc) - - def test_get_calltips_and_including_module_name(self): - src = 'class C(object):\n' \ -@@ -707,7 +707,7 @@ class CodeAssistTest(unittest.TestCase): - mod = testutils.create_module(self.project, 'mod') - mod.write(src) - doc = get_calltip(self.project, src, src.rindex('c'), mod) -- self.assertEquals('mod.C.__call__(self, p)', doc) -+ self.assertEqual('mod.C.__call__(self, p)', doc) - - def test_get_calltips_and_including_module_name_2(self): - src = 'range()\n' -@@ -720,7 +720,7 @@ class CodeAssistTest(unittest.TestCase): - ' pass\n' \ - 'C().f()' - doc = get_calltip(self.project, src, src.rindex('f'), remove_self=True) -- self.assertEquals('C.f()', doc) -+ self.assertEqual('C.f()', doc) - - def test_removing_self_parameter_and_more_than_one_parameter(self): - src = 'class C(object):\n' \ -@@ -728,7 +728,7 @@ class CodeAssistTest(unittest.TestCase): - ' pass\n' \ - 'C().f()' - doc = get_calltip(self.project, src, src.rindex('f'), remove_self=True) -- self.assertEquals('C.f(p1)', doc) -+ self.assertEqual('C.f(p1)', doc) - - def test_lambda_calltip(self): - src = 'foo = lambda x, y=1: None\n' \ -@@ -859,7 +859,7 @@ class CodeAssistTest(unittest.TestCase): - resource.write(code) - result = get_canonical_path(self.project, resource, 1) - mod_path = os.path.join(self.project.address, 'mod.py') -- self.assertEquals( -+ self.assertEqual( - result, [(mod_path, 'MODULE'), - ('GLOBAL_VARIABLE', 'VARIABLE')]) - -@@ -870,7 +870,7 @@ class CodeAssistTest(unittest.TestCase): - resource.write(code) - result = get_canonical_path(self.project, resource, 24) - mod_path = os.path.join(self.project.address, 'mod.py') -- self.assertEquals( -+ self.assertEqual( - result, [(mod_path, 'MODULE'), ('Foo', 'CLASS'), - ('attr', 'VARIABLE')]) - -@@ -882,7 +882,7 @@ class CodeAssistTest(unittest.TestCase): - resource.write(code) - result = get_canonical_path(self.project, resource, 30) - mod_path = os.path.join(self.project.address, 'mod.py') -- self.assertEquals( -+ self.assertEqual( - result, [(mod_path, 'MODULE'), ('Foo', 'CLASS'), - ('Bar', 'CLASS')]) - -@@ -894,7 +894,7 @@ class CodeAssistTest(unittest.TestCase): - resource.write(code) - result = get_canonical_path(self.project, resource, 41) - mod_path = os.path.join(self.project.address, 'mod.py') -- self.assertEquals( -+ self.assertEqual( - result, [(mod_path, 'MODULE'), ('Foo', 'CLASS'), - ('bar', 'FUNCTION'), ('b', 'PARAMETER')]) - -@@ -905,7 +905,7 @@ class CodeAssistTest(unittest.TestCase): - resource.write(code) - result = get_canonical_path(self.project, resource, 17) - mod_path = os.path.join(self.project.address, 'mod.py') -- self.assertEquals( -+ self.assertEqual( - result, [(mod_path, 'MODULE'), ('bar', 'FUNCTION'), - ('x', 'VARIABLE')]) - -@@ -1027,7 +1027,7 @@ class CodeAssistInProjectsTest(unittest. - ' def method1(self):\n' \ - ' pass\n' \ - 'Sample.me' -- self.assertEquals(len(code) - 2, starting_offset(code, len(code))) -+ self.assertEqual(len(code) - 2, starting_offset(code, len(code))) - - def test_backslash_after_dots(self): - code = 'class Sample(object):\n' \ -@@ -1062,13 +1062,13 @@ class CodeAssistInProjectsTest(unittest. - code = 'import mod1\nmod1.a_func\n' - result = get_definition_location(self.project, code, - len(code) - 2, mod2) -- self.assertEquals((mod1, 1), result) -+ self.assertEqual((mod1, 1), result) - - def test_get_definition_location_for_builtins(self): - code = 'import sys\n' - result = get_definition_location(self.project, code, - len(code) - 2) -- self.assertEquals((None, None), result) -+ self.assertEqual((None, None), result) - - def test_get_doc_on_relative_imports(self): - pkg = testutils.create_package(self.project, 'pkg') -@@ -1120,7 +1120,7 @@ class CodeAssistInProjectsTest(unittest. - - def test_starting_expression(self): - code = 'l = list()\nl.app' -- self.assertEquals('l.app', starting_expression(code, len(code))) -+ self.assertEqual('l.app', starting_expression(code, len(code))) - - - def suite(): diff --git a/isAlive_failed_test.patch b/isAlive_failed_test.patch deleted file mode 100644 index 5afd7e1..0000000 --- a/isAlive_failed_test.patch +++ /dev/null @@ -1,199 +0,0 @@ ---- 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=''): - if not source.endswith(b'\n'): - source += b'\n' - try: -- return compile(source, filename, 'exec', _ast.PyCF_ONLY_AST) -+ return ast.parse(source, filename='') - 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 - ---- 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): ---- 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 = [] ---- 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): ---- a/ropetest/type_hinting_test.py -+++ b/ropetest/type_hinting_test.py -@@ -198,18 +198,18 @@ class AbstractAssignmentHintingTest(Abst - + 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' \ diff --git a/obsolete_escape_strings.patch b/obsolete_escape_strings.patch deleted file mode 100644 index d1d5e68..0000000 --- a/obsolete_escape_strings.patch +++ /dev/null @@ -1,263 +0,0 @@ ---- a/rope/base/change.py -+++ b/rope/base/change.py -@@ -116,10 +116,10 @@ class ChangeSet(Change): - - - def _handle_job_set(function): -- """A decorator for handling `taskhandle.JobSet`\s -+ """A decorator for handling `taskhandle.JobSet` - -- A decorator for handling `taskhandle.JobSet`\s for `do` and `undo` -- methods of `Change`\s. -+ A decorator for handling `taskhandle.JobSet` for `do` and `undo` -+ methods of `Change`. - """ - def call(self, job_set=taskhandle.NullJobSet()): - job_set.started_job(str(self)) ---- a/rope/base/oi/__init__.py -+++ b/rope/base/oi/__init__.py -@@ -32,7 +32,7 @@ into play. It analyzes function body an - that is returned from it (we usually need the returned value for the - given parameter objects). - --Rope might collect and store information for other `PyName`\s, too. -+Rope might collect and store information for other `PyName`, too. - For instance rope stores the object builtin containers hold. - - """ ---- a/rope/base/oi/soi.py -+++ b/rope/base/oi/soi.py -@@ -40,7 +40,7 @@ def infer_returned_object(pyfunction, ar - - @_ignore_inferred - def infer_parameter_objects(pyfunction): -- """Infer the `PyObject`\s of parameters of this `PyFunction`""" -+ """Infer the `PyObject` of parameters of this `PyFunction`""" - object_info = pyfunction.pycore.object_info - result = object_info.get_parameter_objects(pyfunction) - if result is None: ---- a/rope/base/oi/transform.py -+++ b/rope/base/oi/transform.py -@@ -1,4 +1,4 @@ --"""Provides classes for persisting `PyObject`\s""" -+"""Provides classes for persisting `PyObject`""" - import os - import re - ---- a/rope/base/project.py -+++ b/rope/base/project.py -@@ -33,7 +33,7 @@ class _Project(object): - folder address is an empty string. If the resource does not - exist a `exceptions.ResourceNotFound` exception would be - raised. Use `get_file()` and `get_folder()` when you need to -- get nonexistent `Resource`\s. -+ get nonexistent `Resource`. - - """ - path = self._get_resource_path(resource_name) ---- a/rope/base/pynames.py -+++ b/rope/base/pynames.py -@@ -3,7 +3,7 @@ from rope.base import exceptions, utils - - - class PyName(object): -- """References to `PyObject`\s inside python programs""" -+ """References to `PyObject` inside python programs""" - - def get_object(self): - """Return the `PyObject` object referenced by this `PyName`""" ---- a/rope/base/pyobjects.py -+++ b/rope/base/pyobjects.py -@@ -32,7 +32,7 @@ class PyObject(object): - return key in self.get_attributes() - - def __eq__(self, obj): -- """Check the equality of two `PyObject`\s -+ """Check the equality of two `PyObject` - - Currently it is assumed that instances (the direct instances - of `PyObject`, not the instances of its subclasses) are equal ---- a/rope/base/resourceobserver.py -+++ b/rope/base/resourceobserver.py -@@ -4,9 +4,9 @@ import os - class ResourceObserver(object): - """Provides the interface for observing resources - -- `ResourceObserver`\s can be registered using `Project. -+ `ResourceObserver` can be registered using `Project. - add_observer()`. But most of the time `FilteredResourceObserver` -- should be used. `ResourceObserver`\s report all changes passed -+ should be used. `ResourceObserver` report all changes passed - to them and they don't report changes to all resources. For - example if a folder is removed, it only calls `removed()` for that - folder and not its contents. You can use ---- a/rope/base/resources.py -+++ b/rope/base/resources.py -@@ -214,7 +214,7 @@ class _ResourceMatcher(object): - def set_patterns(self, patterns): - """Specify which resources to match - -- `patterns` is a `list` of `str`\s that can contain ``*`` and -+ `patterns` is a `list` of `str` that can contain ``*`` and - ``?`` signs for matching resource names. - - """ ---- a/rope/contrib/autoimport.py -+++ b/rope/contrib/autoimport.py -@@ -90,7 +90,7 @@ class AutoImport(object): - task_handle=taskhandle.NullTaskHandle()): - """Generate global name cache for project files - -- If `resources` is a list of `rope.base.resource.File`\s, only -+ If `resources` is a list of `rope.base.resource.File`, only - those files are searched; otherwise all python modules in the - project are cached. - ---- a/rope/contrib/codeassist.py -+++ b/rope/contrib/codeassist.py -@@ -19,7 +19,7 @@ from rope.refactor import functionutils - - def code_assist(project, source_code, offset, resource=None, - templates=None, maxfixes=1, later_locals=True): -- """Return python code completions as a list of `CodeAssistProposal`\s -+ """Return python code completions as a list of `CodeAssistProposal` - - `resource` is a `rope.base.resources.Resource` object. If - provided, relative imports are handled. -@@ -317,7 +317,7 @@ class NamedParamProposal(CompletionPropo - def sorted_proposals(proposals, scopepref=None, typepref=None): - """Sort a list of proposals - -- Return a sorted list of the given `CodeAssistProposal`\s. -+ Return a sorted list of the given `CodeAssistProposal`. - - `scopepref` can be a list of proposal scopes. Defaults to - ``['parameter_keyword', 'local', 'global', 'imported', ---- a/rope/contrib/finderrors.py -+++ b/rope/contrib/finderrors.py -@@ -29,7 +29,7 @@ from rope.base import ast, evaluate, pyo - def find_errors(project, resource): - """Find possible bad name and attribute accesses - -- It returns a list of `Error`\s. -+ It returns a list of `Error`. - """ - pymodule = project.get_pymodule(resource) - finder = _BadAccessFinder(pymodule) ---- a/rope/contrib/findit.py -+++ b/rope/contrib/findit.py -@@ -9,11 +9,11 @@ from rope.refactor import occurrences - def find_occurrences(project, resource, offset, unsure=False, resources=None, - in_hierarchy=False, - task_handle=taskhandle.NullTaskHandle()): -- """Return a list of `Location`\s -+ """Return a list of `Location` - - If `unsure` is `True`, possible matches are returned, too. You - can use `Location.unsure` to see which are unsure occurrences. -- `resources` can be a list of `rope.base.resource.File`\s that -+ `resources` can be a list of `rope.base.resource.File` that - should be searched for occurrences; if `None` all python files - in the project are searched. - -@@ -40,7 +40,7 @@ def find_implementations(project, resour - """Find the places a given method is overridden. - - Finds the places a method is implemented. Returns a list of -- `Location`\s. -+ `Location`. - """ - name = worder.get_name_at(resource, offset) - this_pymodule = project.get_pymodule(resource) ---- a/rope/refactor/change_signature.py -+++ b/rope/refactor/change_signature.py -@@ -127,10 +127,10 @@ class ChangeSignature(object): - task_handle=taskhandle.NullTaskHandle()): - """Get changes caused by this refactoring - -- `changers` is a list of `_ArgumentChanger`\s. If `in_hierarchy` -+ `changers` is a list of `_ArgumentChanger`. If `in_hierarchy` - is `True` the changers are applyed to all matching methods in - the class hierarchy. -- `resources` can be a list of `rope.base.resource.File`\s that -+ `resources` can be a list of `rope.base.resource.File` that - should be searched for occurrences; if `None` all python files - in the project are searched. - ---- a/rope/refactor/encapsulate_field.py -+++ b/rope/refactor/encapsulate_field.py -@@ -30,7 +30,7 @@ class EncapsulateField(object): - same is true for `setter` and if it is None set_${field_name} is - used. - -- `resources` can be a list of `rope.base.resource.File`\s that -+ `resources` can be a list of `rope.base.resource.File` that - the refactoring should be applied on; if `None` all python - files in the project are searched. - ---- a/rope/refactor/importutils/__init__.py -+++ b/rope/refactor/importutils/__init__.py -@@ -261,7 +261,7 @@ class ImportTools(object): - - - def get_imports(project, pydefined): -- """A shortcut for getting the `ImportInfo`\s used in a scope""" -+ """A shortcut for getting the `ImportInfo` used in a scope""" - pymodule = pydefined.get_module() - module = module_imports.ModuleImports(project, pymodule) - if pymodule == pydefined: ---- a/rope/refactor/importutils/actions.py -+++ b/rope/refactor/importutils/actions.py -@@ -126,7 +126,7 @@ class RemovingVisitor(ImportInfoVisitor) - class AddingVisitor(ImportInfoVisitor): - """A class for adding imports - -- Given a list of `ImportInfo`\s, it tries to add each import to the -+ Given a list of `ImportInfo`, it tries to add each import to the - module and returns `True` and gives up when an import can be added - to older ones. - ---- a/rope/refactor/introduce_factory.py -+++ b/rope/refactor/introduce_factory.py -@@ -31,7 +31,7 @@ class IntroduceFactory(object): - be added. If `global_factory` is `True` the factory will be - global otherwise a static method is added to the class. - -- `resources` can be a list of `rope.base.resource.File`\s that -+ `resources` can be a list of `rope.base.resource.File` that - this refactoring should be applied on; if `None` all python - files in the project are searched. - ---- a/rope/refactor/move.py -+++ b/rope/refactor/move.py -@@ -67,7 +67,7 @@ class MoveMethod(object): - - `dest_attr`: the name of the destination attribute - - `new_name`: the name of the new method; if `None` uses - the old name -- - `resources` can be a list of `rope.base.resources.File`\s to -+ - `resources` can be a list of `rope.base.resources.File` to - apply this refactoring on. If `None`, the restructuring - will be applied to all python files. - ---- a/rope/refactor/rename.py -+++ b/rope/refactor/rename.py -@@ -59,7 +59,7 @@ class Rename(object): - called with an instance of `occurrence.Occurrence` as - parameter. If it returns `True`, the occurrence is - considered to be a match. -- - `resources` can be a list of `rope.base.resources.File`\s to -+ - `resources` can be a list of `rope.base.resources.File` to - apply this refactoring on. If `None`, the restructuring - will be applied to all python files. - - `in_file`: this argument has been deprecated; use ---- a/rope/refactor/restructure.py -+++ b/rope/refactor/restructure.py -@@ -95,7 +95,7 @@ class Restructure(object): - task_handle=taskhandle.NullTaskHandle()): - """Get the changes needed by this restructuring - -- `resources` can be a list of `rope.base.resources.File`\s to -+ `resources` can be a list of `rope.base.resources.File` to - apply the restructuring on. If `None`, the restructuring will - be applied to all python files. - diff --git a/python-rope.changes b/python-rope.changes index 6a3d702..3536014 100644 --- a/python-rope.changes +++ b/python-rope.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Tue May 5 16:25:43 UTC 2020 - Matej Cepl + +- Update to 0.17.0: + - Make tests compatible with Python 3.8 + - Use context manager for open() + - Don’t use UserDict (!!!) and collections.MutableMapping. + - assertEquals has been deprecated for long time (-> assertEqual) + - Remove weird escpaing of 's' character, which is the syntax + error these days. + - Add testing for Python 3.8 as well + - Fix pattern for matching short strings + - Work with deprecated types and using aliased ones. + - Don't use underscored _ast, but use ast instead + - Direct import from collections is getting deprecated. + - Use .is_alive method instead of a deprecated .isAlive + in threading.Thread + - Fix simple typo: sitaution -> situation (#287) + - Two more assertEquals happened. +- Remove all patches, which were now included in the upstream + tarball. + ------------------------------------------------------------------- Mon Mar 9 10:54:00 CET 2020 - Matej Cepl diff --git a/python-rope.spec b/python-rope.spec index e619d05..0af2efa 100644 --- a/python-rope.spec +++ b/python-rope.spec @@ -19,26 +19,13 @@ %define upname rope %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-rope -Version: 0.16.0 +Version: 0.17.0 Release: 0 Summary: A python refactoring library License: LGPL-3.0-or-later Group: Development/Languages/Python URL: https://github.com/python-rope/rope Source: https://files.pythonhosted.org/packages/source/r/rope/rope-%{version}.tar.gz -# PATCH-FIX-UPSTREAM isAlive_failed_test.patch gh#python-rope/rope#283 mcepl@suse.com -# Fix problems with aliased collections -> collections.abc -Patch0: isAlive_failed_test.patch -# PATCH-FIX-UPSTREAM Python38-compatibility.patch mcepl@suse.com -# Remove Python 3.8 incompatibilities -Patch1: Python38-compatibility.patch -# PATCH-FIX-UPSTREAM obsolete_escape_strings.patch mcepl@suse.com -# Remove weird escpaing of 's' character, which is the syntax error -# these days. -Patch2: obsolete_escape_strings.patch -# PATCH-FIX-UPSTREAM assertEquals.patch mcepl@suse.com -# assertEquals has been deprecated for long time -Patch3: assertEquals.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes diff --git a/rope-0.16.0.tar.gz b/rope-0.16.0.tar.gz deleted file mode 100644 index 3d7514b..0000000 --- a/rope-0.16.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d2830142c2e046f5fc26a022fe680675b6f48f81c7fc1f03a950706e746e9dfe -size 243304 diff --git a/rope-0.17.0.tar.gz b/rope-0.17.0.tar.gz new file mode 100644 index 0000000..5f2aded --- /dev/null +++ b/rope-0.17.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:658ad6705f43dcf3d6df379da9486529cf30e02d9ea14c5682aa80eb33b649e1 +size 248629