Skip to content

Test suite fails with Python 3.13 #126811

@mcepl

Description

@mcepl

Bug report

Bug description:

When running the test suite with Python 3.13 nine tests fails:

[   35s] =================================== FAILURES ===================================
[   35s] _ AutoImportTest.test_skipping_directories_not_accessible_because_of_permission_error _
[   35s] 
[   35s] self = <ropetest.contrib.autoimporttest.AutoImportTest testMethod=test_skipping_directories_not_accessible_because_of_permission_error>
[   35s] 
[   35s]     def test_skipping_directories_not_accessible_because_of_permission_error(self):
[   35s]         # The single thread test takes much longer than the multithread test but is easier to debug
[   35s]         single_thread = False
[   35s]         self.importer.generate_modules_cache(single_thread=single_thread)
[   35s]     
[   35s]         # Create a temporary directory and set permissions to 000
[   35s]         import tempfile, sys
[   35s]         with tempfile.TemporaryDirectory() as dir:
[   35s]             import os
[   35s]             os.chmod(dir, 0o000)
[   35s]             self.importer.project.prefs.python_path = [dir]
[   35s] >           self.importer.generate_modules_cache(single_thread=single_thread)
[   35s] 
[   35s] ropetest/contrib/autoimporttest.py:156: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] rope/contrib/autoimport/sqlite.py:400: in generate_modules_cache
[   35s]     self._get_available_packages()
[   35s] rope/contrib/autoimport/sqlite.py:562: in _get_available_packages
[   35s]     for package in self._safe_iterdir(folder):
[   35s] rope/contrib/autoimport/sqlite.py:547: in _safe_iterdir
[   35s]     dirs = folder.iterdir()
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] 
[   35s] self = PosixPath('/tmp/tmp_3hqhcpm')
[   35s] 
[   35s]     def iterdir(self):
[   35s]         """Yield path objects of the directory contents.
[   35s]     
[   35s]         The children are yielded in arbitrary order, and the
[   35s]         special entries '.' and '..' are not included.
[   35s]         """
[   35s]         root_dir = str(self)
[   35s] >       with os.scandir(root_dir) as scandir_it:
[   35s] E       PermissionError: [Errno 13] Permission denied: '/tmp/tmp_3hqhcpm'
[   35s] 
[   35s] /usr/lib64/python3.13/pathlib/_local.py:575: PermissionError
[   35s] ______ DocstringNoneAssignmentHintingTest.test_hint_parametrized_iterable ______
[   35s] 
[   35s] self = <ropetest.type_hinting_test.DocstringNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterable>
[   35s] 
[   35s]     def test_hint_parametrized_iterable(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:224: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterable in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] ______ DocstringNoneAssignmentHintingTest.test_hint_parametrized_iterator ______
[   35s] 
[   35s] self = <ropetest.type_hinting_test.DocstringNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterator>
[   35s] 
[   35s]     def test_hint_parametrized_iterator(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:234: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterator in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] _ DocstringNotImplementedAssignmentHintingTest.test_hint_parametrized_iterable _
[   35s] 
[   35s] self = <ropetest.type_hinting_test.DocstringNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterable>
[   35s] 
[   35s]     def test_hint_parametrized_iterable(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:224: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterable in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] _ DocstringNotImplementedAssignmentHintingTest.test_hint_parametrized_iterator _
[   35s] 
[   35s] self = <ropetest.type_hinting_test.DocstringNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterator>
[   35s] 
[   35s]     def test_hint_parametrized_iterator(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:234: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterator in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] ___ PEP0484CommentNoneAssignmentHintingTest.test_hint_parametrized_iterable ____
[   35s] 
[   35s] self = <ropetest.type_hinting_test.PEP0484CommentNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterable>
[   35s] 
[   35s]     def test_hint_parametrized_iterable(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:224: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterable in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] ___ PEP0484CommentNoneAssignmentHintingTest.test_hint_parametrized_iterator ____
[   35s] 
[   35s] self = <ropetest.type_hinting_test.PEP0484CommentNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterator>
[   35s] 
[   35s]     def test_hint_parametrized_iterator(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:234: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterator in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] _ PEP0484CommentNotImplementedAssignmentHintingTest.test_hint_parametrized_iterable _
[   35s] 
[   35s] self = <ropetest.type_hinting_test.PEP0484CommentNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterable>
[   35s] 
[   35s]     def test_hint_parametrized_iterable(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:224: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterable in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
[   35s] _ PEP0484CommentNotImplementedAssignmentHintingTest.test_hint_parametrized_iterator _
[   35s] 
[   35s] self = <ropetest.type_hinting_test.PEP0484CommentNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterator>
[   35s] 
[   35s]     def test_hint_parametrized_iterator(self):
[   35s]         code = dedent(f"""\
[   35s]             class Sample(object):
[   35s]                 {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
[   35s]                 def a_method(self):
[   35s]                     for i in self.a_attr:
[   35s]                         i.is_a""")
[   35s]         result = self._assist(code)
[   35s] >       self.assert_completion_in_result("is_alive", "attribute", result)
[   35s] 
[   35s] ropetest/type_hinting_test.py:234: 
[   35s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   35s] ropetest/type_hinting_test.py:29: in assert_completion_in_result
[   35s]     self.fail(
[   35s] E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
[   35s] ------------------------------ Captured log call -------------------------------
[   35s] ERROR    root:utils.py:114 Cannot resolve type Iterator in ['__class__', '__contains__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__firstlineno__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__getstate__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__iter__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__static_attributes__', '__str__', '__subclasshook__', '__weakref__', '_calling__create_concluded_attributes_', '_calling__get_concluded_attributes_', '_calling__get_structural_attributes_', '_create_concluded_attributes', '_create_scope', '_create_structural_attributes', '_forget_concluded_data', '_get_base_type', '_get_concluded_attributes', '_get_concluded_data', '_get_defined_objects', '_get_structural_attributes', '_init_source', '_types', '_unknown', 'absolute_name', 'ast_node', 'attributes', 'coding', 'concluded_attributes', 'concluded_data', 'defineds', 'get_ast', 'get_attribute', 'get_attributes', 'get_doc', 'get_module', 'get_name', 'get_resource', 'get_scope', 'get_type', 'has_errors', 'lines', 'logical_lines', 'parent', 'pycore', 'resource', 'scope', 'source_code', 'star_imports', 'structural_attributes', 'type', 'visitor_class']
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] 
[   35s] During handling of the above exception, another exception occurred:
[   35s] 
[   35s] Traceback (most recent call last):
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
[   35s]     ret_type = mod.get_attribute(attr_name).get_object()
[   35s]                ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
[   35s]   File "/home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/pyobjects.py", line 218, in get_attribute
[   35s]     raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
[   35s] rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
[   35s] =============================== warnings summary ===============================
[   35s] ropetest/advanced_oi_test.py: 60 warnings
[   35s] ropetest/builtinstest.py: 63 warnings
[   35s] ropetest/codeanalyzetest.py: 15 warnings
[   35s] ropetest/contrib/autoimport/autoimporttest.py: 17 warnings
[   35s] ropetest/contrib/autoimport/utilstest.py: 5 warnings
[   35s] ropetest/contrib/autoimporttest.py: 25 warnings
[   35s] ropetest/contrib/changestacktest.py: 1 warning
[   35s] ropetest/contrib/codeassisttest.py: 170 warnings
[   35s] ropetest/contrib/finderrorstest.py: 5 warnings
[   35s] ropetest/contrib/findittest.py: 11 warnings
[   35s] ropetest/contrib/fixmodnamestest.py: 4 warnings
[   35s] ropetest/contrib/generatetest.py: 30 warnings
[   35s] ropetest/historytest.py: 40 warnings
[   35s] ropetest/objectdbtest.py: 19 warnings
[   35s] ropetest/objectinfertest.py: 33 warnings
[   35s] ropetest/projecttest.py: 127 warnings
[   35s] ropetest/pycoretest.py: 123 warnings
[   35s] ropetest/pyscopestest.py: 46 warnings
[   35s] ropetest/refactor/__init__.py: 59 warnings
[   35s] ropetest/refactor/change_signature_test.py: 40 warnings
[   35s] ropetest/refactor/extracttest.py: 169 warnings
[   35s] ropetest/refactor/importutilstest.py: 143 warnings
[   35s] ropetest/refactor/inlinetest.py: 95 warnings
[   35s] ropetest/refactor/movetest.py: 74 warnings
[   35s] ropetest/refactor/multiprojecttest.py: 8 warnings
[   35s] ropetest/refactor/renametest.py: 89 warnings
[   35s] ropetest/refactor/restructuretest.py: 23 warnings
[   35s] ropetest/refactor/similarfindertest.py: 32 warnings
[   35s] ropetest/refactor/usefunctiontest.py: 12 warnings
[   35s] ropetest/reprtest.py: 16 warnings
[   35s] ropetest/runmodtest.py: 9 warnings
[   35s] ropetest/type_hinting_test.py: 76 warnings
[   35s] ropetest/versioningtest.py: 5 warnings
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/project.py:229: DeprecationWarning: Delete once deprecated functions are gone
[   35s]     self._init_source_folders()
[   35s] 
[   35s] ropetest/advanced_oi_test.py: 139 warnings
[   35s] ropetest/projecttest.py: 5 warnings
[   35s] ropetest/refactor/multiprojecttest.py: 4 warnings
[   35s] ropetest/runmodtest.py: 18 warnings
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/base/libutils.py:34: DeprecationWarning: relative is deprecated
[   35s]     return relative(project.address, path)
[   35s] 
[   35s] ropetest/contrib/autoimport/autoimporttest.py: 21 warnings
[   35s] ropetest/contrib/autoimporttest.py: 26 warnings
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/contrib/autoimport/sqlite.py:482: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
[   35s] 
[   35s] ropetest/contrib/autoimport/autoimporttest.py: 16 warnings
[   35s] ropetest/contrib/autoimporttest.py: 26 warnings
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/rope/contrib/autoimport/sqlite.py:124: DeprecationWarning: The default value for `AutoImport(memory)` argument will change to use an on-disk database by default in the future. If you want to use an in-memory database, you need to pass `AutoImport(memory=True)` explicitly.
[   35s]     warnings.warn(
[   35s] 
[   35s] ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/ropetest/refactor/__init__.py:1125: DeprecationWarning: Just use JobSet.name attribute/property instead
[   35s]     self.assertEqual("test job set", jobs.get_name())
[   35s] 
[   35s] ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/ropetest/refactor/__init__.py:1126: DeprecationWarning: Just use JobSet.job_name attribute/property instead
[   35s]     self.assertEqual(None, jobs.get_active_job_name())
[   35s] 
[   35s] ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/ropetest/refactor/__init__.py:1129: DeprecationWarning: Just use JobSet.name attribute/property instead
[   35s]     self.assertEqual("test job set", jobs.get_name())
[   35s] 
[   35s] ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
[   35s]   /home/abuild/rpmbuild/BUILD/rope-1.12.0/ropetest/refactor/__init__.py:1131: DeprecationWarning: Just use JobSet.job_name attribute/property instead
[   35s]     self.assertEqual("job1", jobs.get_active_job_name())
[   35s] 
[   35s] -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
[   35s] =========================== short test summary info ============================
[   35s] FAILED ropetest/contrib/autoimporttest.py::AutoImportTest::test_skipping_directories_not_accessible_because_of_permission_error
[   35s] FAILED ropetest/type_hinting_test.py::DocstringNoneAssignmentHintingTest::test_hint_parametrized_iterable
[   35s] FAILED ropetest/type_hinting_test.py::DocstringNoneAssignmentHintingTest::test_hint_parametrized_iterator
[   35s] FAILED ropetest/type_hinting_test.py::DocstringNotImplementedAssignmentHintingTest::test_hint_parametrized_iterable
[   35s] FAILED ropetest/type_hinting_test.py::DocstringNotImplementedAssignmentHintingTest::test_hint_parametrized_iterator
[   35s] FAILED ropetest/type_hinting_test.py::PEP0484CommentNoneAssignmentHintingTest::test_hint_parametrized_iterable
[   35s] FAILED ropetest/type_hinting_test.py::PEP0484CommentNoneAssignmentHintingTest::test_hint_parametrized_iterator
[   35s] FAILED ropetest/type_hinting_test.py::PEP0484CommentNotImplementedAssignmentHintingTest::test_hint_parametrized_iterable
[   35s] FAILED ropetest/type_hinting_test.py::PEP0484CommentNotImplementedAssignmentHintingTest::test_hint_parametrized_iterator
[   35s] = 9 failed, 2048 passed, 7 skipped, 3 deselected, 5 xfailed, 1903 warnings in 9.00s =

Complete build log with the list of all packages used and steps to reproduce. Notice that the test suite passes without a problem with older versions of Python.

CPython versions tested on:

3.13

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions