rope icon indicating copy to clipboard operation
rope copied to clipboard

Test failures with Python 3.13.3rc3

Open musicinmybrain opened this issue 1 year ago • 2 comments

Describe the bug The following test failures appear to be regressions from Python 3.13.3rc2 to 3.13.3rc3.

To Reproduce Steps to reproduce the behavior:

$ python3.13 --version
Python 3.13.0rc3
$ python3.13 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .[dev]
(_e) $ python -m pytest
  1. Describe the error or unexpected result that you are getting
=========================================================================================== short test summary info ===========================================================================================
FAILED ropetest/contrib/autoimporttest.py::AutoImportTest::test_skipping_directories_not_accessible_because_of_permission_error - PermissionError: [Errno 13] Permission denied: '/tmp/tmppzk66v0e'
FAILED ropetest/type_hinting_test.py::DocstringNoneAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::DocstringNoneAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::DocstringNotImplementedAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::DocstringNotImplementedAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNoneAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNoneAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNotImplementedAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNotImplementedAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
===================================================================== 9 failed, 2071 passed, 7 skipped, 5 xfailed, 1936 warnings in 8.99s =====================================================================

Screenshots

N/A

Editor information (please complete the following information):

  • Project Python version: ...
  • Rope Python version: ...
  • Rope version: ...
  • Text editor/IDE and version: ...

Additional context

Detailed output:

================================================================================================== FAILURES ===================================================================================================
_____________________________________________________________ AutoImportTest.test_skipping_directories_not_accessible_because_of_permission_error _____________________________________________________________

self = <ropetest.contrib.autoimporttest.AutoImportTest testMethod=test_skipping_directories_not_accessible_because_of_permission_error>

    def test_skipping_directories_not_accessible_because_of_permission_error(self):
        # The single thread test takes much longer than the multithread test but is easier to debug
        single_thread = False
        self.importer.generate_modules_cache(single_thread=single_thread)

        # Create a temporary directory and set permissions to 000
        import sys
        import tempfile
        with tempfile.TemporaryDirectory() as dir:
            import os
            os.chmod(dir, 0o000)
            self.importer.project.prefs.python_path = [dir]
>           self.importer.generate_modules_cache(single_thread=single_thread)

ropetest/contrib/autoimporttest.py:175:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
rope/contrib/autoimport/sqlite.py:422: in generate_modules_cache
    self._get_available_packages()
rope/contrib/autoimport/sqlite.py:587: in _get_available_packages
    for package in self._safe_iterdir(folder):
rope/contrib/autoimport/sqlite.py:572: in _safe_iterdir
    dirs = folder.iterdir()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = PosixPath('/tmp/tmppzk66v0e')

    def iterdir(self):
        """Yield path objects of the directory contents.

        The children are yielded in arbitrary order, and the
        special entries '.' and '..' are not included.
        """
        root_dir = str(self)
>       with os.scandir(root_dir) as scandir_it:
E       PermissionError: [Errno 13] Permission denied: '/tmp/tmppzk66v0e'
/usr/lib64/python3.13/pathlib/_local.py:575: PermissionError
-------------------------------------------------------------------------------------------- Captured stdout call ---------------------------------------------------------------------------------------------
encoding problem: utf8 with BOM (<string>, line 0)invalid character '€' (U+20AC) (<string>, line 2)

(unicode error) 'utf-8' codec can't decode byte 0xf6 in position 1: invalid start byte (<string>, line 1)
unknown encoding: uft-8 (<string>, line 0)
_____________________________________________________________________ DocstringNoneAssignmentHintingTest.test_hint_parametrized_iterable ______________________________________________________________________

self = <ropetest.type_hinting_test.DocstringNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterable>

    def test_hint_parametrized_iterable(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:224:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
_____________________________________________________________________ DocstringNoneAssignmentHintingTest.test_hint_parametrized_iterator ______________________________________________________________________

self = <ropetest.type_hinting_test.DocstringNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterator>

    def test_hint_parametrized_iterator(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:234:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
________________________________________________________________ DocstringNotImplementedAssignmentHintingTest.test_hint_parametrized_iterable _________________________________________________________________

self = <ropetest.type_hinting_test.DocstringNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterable>

    def test_hint_parametrized_iterable(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:224:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
________________________________________________________________ DocstringNotImplementedAssignmentHintingTest.test_hint_parametrized_iterator _________________________________________________________________

self = <ropetest.type_hinting_test.DocstringNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterator>

    def test_hint_parametrized_iterator(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:234:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
___________________________________________________________________ PEP0484CommentNoneAssignmentHintingTest.test_hint_parametrized_iterable ___________________________________________________________________

self = <ropetest.type_hinting_test.PEP0484CommentNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterable>

    def test_hint_parametrized_iterable(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:224:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
___________________________________________________________________ PEP0484CommentNoneAssignmentHintingTest.test_hint_parametrized_iterator ___________________________________________________________________

self = <ropetest.type_hinting_test.PEP0484CommentNoneAssignmentHintingTest testMethod=test_hint_parametrized_iterator>

    def test_hint_parametrized_iterator(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:234:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
______________________________________________________________ PEP0484CommentNotImplementedAssignmentHintingTest.test_hint_parametrized_iterable ______________________________________________________________

self = <ropetest.type_hinting_test.PEP0484CommentNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterable>

    def test_hint_parametrized_iterable(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterable[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:224:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterable not found
______________________________________________________________ PEP0484CommentNotImplementedAssignmentHintingTest.test_hint_parametrized_iterator ______________________________________________________________

self = <ropetest.type_hinting_test.PEP0484CommentNotImplementedAssignmentHintingTest testMethod=test_hint_parametrized_iterator>

    def test_hint_parametrized_iterator(self):
        code = dedent(f"""\
            class Sample(object):   
                {fix_indents(self._make_class_hint("collections.Iterator[threading.Thread]"))}
                def a_method(self): 
                    for i in self.a_attr:
                        i.is_a""")  
        result = self._assist(code) 
>       self.assert_completion_in_result("is_alive", "attribute", result)

ropetest/type_hinting_test.py:234:  
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ropetest/type_hinting_test.py:29: in assert_completion_in_result
    self.fail(
E   AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
-------------------------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------------------------
ERROR:resolve_type: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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
---------------------------------------------------------------------------------------------- Captured log call ----------------------------------------------------------------------------------------------
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']
Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 102, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
  File "/home/ben/src/forks/rope/rope/base/oi/type_hinting/utils.py", line 112, in resolve_type
    ret_type = mod.get_attribute(attr_name).get_object()
               ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/ben/src/forks/rope/rope/base/pyobjects.py", line 218, in get_attribute
    raise exceptions.AttributeNotFoundError("Attribute %s not found" % name)
rope.base.exceptions.AttributeNotFoundError: Attribute Iterator not found
============================================================================================== warnings summary ===============================================================================================
ropetest/refactor/movetest.py:394   
  /home/ben/src/forks/rope/ropetest/refactor/movetest.py:394: SyntaxWarning: invalid escape sequence '\.'
    "Move refactoring should be performed on a global class, function or variable\.",

ropetest/refactor/movetest.py:407   
  /home/ben/src/forks/rope/ropetest/refactor/movetest.py:407: SyntaxWarning: invalid escape sequence '\.'
    "Moving global elements to the same module\.",

ropetest/advanced_oi_test.py: 60 warnings
ropetest/builtinstest.py: 63 warnings
ropetest/codeanalyzetest.py: 15 warnings
ropetest/contrib/autoimport/autoimporttest.py: 18 warnings
ropetest/contrib/autoimport/utilstest.py: 5 warnings
ropetest/contrib/autoimporttest.py: 28 warnings
ropetest/contrib/changestacktest.py: 1 warning
ropetest/contrib/codeassisttest.py: 170 warnings
ropetest/contrib/finderrorstest.py: 5 warnings
ropetest/contrib/findittest.py: 11 warnings
ropetest/contrib/fixmodnamestest.py: 4 warnings
ropetest/contrib/generatetest.py: 30 warnings
ropetest/historytest.py: 40 warnings
ropetest/objectdbtest.py: 19 warnings
ropetest/objectinfertest.py: 33 warnings
ropetest/projecttest.py: 127 warnings
ropetest/pycoretest.py: 123 warnings
ropetest/pyscopestest.py: 46 warnings
ropetest/refactor/__init__.py: 59 warnings
ropetest/refactor/change_signature_test.py: 40 warnings
ropetest/refactor/extracttest.py: 169 warnings
ropetest/refactor/importutilstest.py: 143 warnings
ropetest/refactor/inlinetest.py: 102 warnings
ropetest/refactor/movetest.py: 74 warnings
ropetest/refactor/multiprojecttest.py: 8 warnings
ropetest/refactor/renametest.py: 97 warnings
ropetest/refactor/restructuretest.py: 23 warnings
ropetest/refactor/similarfindertest.py: 32 warnings
ropetest/refactor/usefunctiontest.py: 12 warnings
ropetest/reprtest.py: 19 warnings   
ropetest/runmodtest.py: 9 warnings  
ropetest/type_hinting_test.py: 76 warnings
ropetest/versioningtest.py: 5 warnings
  /home/ben/src/forks/rope/rope/base/project.py:230: DeprecationWarning: Delete once deprecated functions are gone
    self._init_source_folders()

ropetest/advanced_oi_test.py: 139 warnings
ropetest/projecttest.py: 5 warnings 
ropetest/refactor/multiprojecttest.py: 4 warnings
ropetest/runmodtest.py: 18 warnings 
  /home/ben/src/forks/rope/rope/base/libutils.py:35: DeprecationWarning: relative is deprecated
    return relative(project.address, path)

ropetest/contrib/autoimport/autoimporttest.py: 22 warnings
ropetest/contrib/autoimporttest.py: 30 warnings
  /home/ben/src/forks/rope/rope/contrib/autoimport/sqlite.py:507: 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).
    datetime.utcnow().isoformat(),  

ropetest/contrib/autoimport/autoimporttest.py: 17 warnings
ropetest/contrib/autoimporttest.py: 29 warnings
  /home/ben/src/forks/rope/rope/contrib/autoimport/sqlite.py:139: 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.
    warnings.warn(

ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
  /home/ben/src/forks/rope/ropetest/refactor/__init__.py:1125: DeprecationWarning: Just use JobSet.name attribute/property instead
    self.assertEqual("test job set", jobs.get_name())

ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
  /home/ben/src/forks/rope/ropetest/refactor/__init__.py:1126: DeprecationWarning: Just use JobSet.job_name attribute/property instead
    self.assertEqual(None, jobs.get_active_job_name())

ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
  /home/ben/src/forks/rope/ropetest/refactor/__init__.py:1129: DeprecationWarning: Just use JobSet.name attribute/property instead
    self.assertEqual("test job set", jobs.get_name())

ropetest/refactor/__init__.py::TaskHandleTest::test_getting_job_name
  /home/ben/src/forks/rope/ropetest/refactor/__init__.py:1131: DeprecationWarning: Just use JobSet.job_name attribute/property instead
    self.assertEqual("job1", jobs.get_active_job_name())

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================================================================== short test summary info ===========================================================================================
FAILED ropetest/contrib/autoimporttest.py::AutoImportTest::test_skipping_directories_not_accessible_because_of_permission_error - PermissionError: [Errno 13] Permission denied: '/tmp/tmppzk66v0e'
FAILED ropetest/type_hinting_test.py::DocstringNoneAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::DocstringNoneAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::DocstringNotImplementedAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::DocstringNotImplementedAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNoneAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNoneAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNotImplementedAssignmentHintingTest::test_hint_parametrized_iterable - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
FAILED ropetest/type_hinting_test.py::PEP0484CommentNotImplementedAssignmentHintingTest::test_hint_parametrized_iterator - AssertionError: completion <is_alive> in scope 'attribute' not proposed, available names: []
===================================================================== 9 failed, 2071 passed, 7 skipped, 5 xfailed, 1936 warnings in 8.99s =====================================================================

musicinmybrain avatar Oct 08 '24 11:10 musicinmybrain

I still see the same failures with the latest master, 55169bb6f687ee3c0ce76c9230e93b0834acbde5, and Python 3.13.0 (final).

musicinmybrain avatar Nov 27 '24 14:11 musicinmybrain

With #809 applied all tests succeed again. Thank you!

penguinpee avatar May 24 '25 19:05 penguinpee