Skip to content

0.7.0: pytest is failing #54

Open
Open
@kloczek

Description

@kloczek

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.

  • python3 -sBm build -w
  • install .whl file in </install/prefix>
  • run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>

I'm assuming that probably sometbing is missing in my env but I cannot find out what exactly it is
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-trio-typing-0.7.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-trio-typing-0.7.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra --pyargs trio_typing
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0
collected 16 items

trio_typing/_tests/test_runtime.py .                                                                                                                                 [  6%]
trio_typing/_tests/test_typecheck.py FFFFFFFFFFFFFFF                                                                                                                 [100%]

================================================================================= FAILURES =================================================================================
____________________________________________________________________________ testAsyncGenerator ____________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/async_generator.test:1:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_________________________________________________________________________ testAsyncGeneratorUtils __________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/async_generator.test:53:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_______________________________________________________________________________ testAsyncCM ________________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/async_generator.test:79:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
______________________________________________________________________________ testAsyncCM_36 ______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/async_generator.test:99:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_______________________________________________________________________________ testOpenType _______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/open-mode.test:1:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_______________________________________________________________________________ testOutcome ________________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/outcome.test:1:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
______________________________________________________________________________ testTaskStatus ______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/taskstatus.test:1:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_________________________________________________________________________ testTaskStatus_NoPlugin __________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/taskstatus.test:30:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:47: in run_case
    assert_string_arrays_equal(
/usr/lib/python3.8/site-packages/mypy/test/helpers.py:117: in assert_string_arrays_equal
    raise AssertionError(msg)
E   AssertionError: Unexpected output from /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/taskstatus.test line 30
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
Expected:
  main:6: error: Argument 1 to "started" of "TaskStatus" has incompatible type "str"; expected "int" (diff)
  main:14: error: Argument "task_status" to "child" has incompatible type "TaskStatus[None]"; expected "TaskStatus[int]" (diff)
  main:18: error: Argument 1 to "start_soon" of "Nursery" has incompatible type "Callable[[int, NamedArg(TaskStatus[int], 'task_status')], Coroutine[Any, Any, None]]"; expected "Union[Callable[[], Awaitable[Any]], Callable[[Any], Awaitable[Any]], Callable[[Any, Any], Awaitable[Any]], Callable[[Any, Any, Any], Awaitable[Any]], Callable[[Any, Any, Any, Any], Awaitable[Any]], Callable[[VarArg(Any)], Awaitable[Any]]]" (diff)
  main:26: note: Revealed type is "builtins.int*" (diff)
  main:27: note: Revealed type is "None"        (diff)
Actual:
  main:1: error: Skipping analyzing "trio": found module but no type hints or library stubs (diff)
  main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports (diff)
  main:2: error: Cannot find implementation or library stub for module named "trio_typing" (diff)
  main:26: note: Revealed type is "Any"         (diff)
  main:27: note: Revealed type is "Any"         (diff)

Alignment of first line difference:
  E: main:6: error: Argument 1 to "started" of "TaskStatus" has incompatible ...
  A: main:1: error: Skipping analyzing "trio": found module but no type hints...
          ^
______________________________________________________________________________ testTrioBasic _______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:1:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
__________________________________________________________________________ testTrioBasic_NoPlugin __________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:30:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:47: in run_case
    assert_string_arrays_equal(
/usr/lib/python3.8/site-packages/mypy/test/helpers.py:117: in assert_string_arrays_equal
    raise AssertionError(msg)
E   AssertionError: Unexpected output from /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test line 30
--------------------------------------------------------------------------- Captured stderr call ---------------------------------------------------------------------------
Expected:
  main:13: note: Revealed type is "trio.Nursery*" (diff)
  main:14: note: Revealed type is "trio.CancelScope" (diff)
  main:24: note: Revealed type is "builtins.list*[builtins.float]" (diff)
  main:27: note: Revealed type is "Any"         (diff)
Actual:
  main:1: error: Skipping analyzing "trio": found module but no type hints or library stubs (diff)
  main:1: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports (diff)
  main:2: error: Skipping analyzing "trio.testing": found module but no type hints or library stubs (diff)
  main:13: note: Revealed type is "Any"         (diff)
  main:14: note: Revealed type is "Any"         (diff)
  main:24: note: Revealed type is "Any"         (diff)
  main:27: note: Revealed type is "Any"         (diff)

Alignment of first line difference:
  E: main:13: note: Revealed type is "trio.Nursery*"...
  A: main:1: error: Skipping analyzing "trio": found module but no type hints...
           ^
______________________________________________________________________________ testExceptions ______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:59:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
______________________________________________________________________________ testOverloaded ______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:82:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_______________________________________________________________________________ testChannels _______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:97:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
___________________________________________________________________________ testSubprocessPaths ____________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:107:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
_____________________________________________________________________________ testOptionalCwd ______________________________________________________________________________
data: /home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test-data/trio-basic.test:115:
/usr/lib/python3.8/site-packages/mypy/build.py:425: in load_plugins_from_config
    module = importlib.import_module(module_name)
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
    ???
<frozen importlib._bootstrap>:991: in _find_and_load
    ???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:671: in _load_unlocked
    ???
<frozen importlib._bootstrap_external>:843: in exec_module
    ???
<frozen importlib._bootstrap>:219: in _call_with_frames_removed
    ???
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/plugin.py:16: in <module>
    from mypy.types import (
E   ImportError: cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)

During handling of the above exception, another exception occurred:
/home/tkloczko/rpmbuild/BUILD/trio-typing-0.7.0/trio_typing/_tests/test_typecheck.py:44: in run_case
    result = build.build(
/usr/lib/python3.8/site-packages/mypy/build.py:179: in build
    result = _build(
/usr/lib/python3.8/site-packages/mypy/build.py:229: in _build
    plugin, snapshot = load_plugins(options, errors, stdout, extra_plugins)
/usr/lib/python3.8/site-packages/mypy/build.py:475: in load_plugins
    custom_plugins, snapshot = load_plugins_from_config(options, errors, stdout)
/usr/lib/python3.8/site-packages/mypy/build.py:427: in load_plugins_from_config
    plugin_error('Error importing plugin "{}": {}'.format(plugin_path, exc))
/usr/lib/python3.8/site-packages/mypy/build.py:397: in plugin_error
    errors.raise_error(use_stdout=False)
/usr/lib/python3.8/site-packages/mypy/errors.py:502: in raise_error
    raise CompileError(self.new_messages(),
E   mypy.errors.CompileError: /dev/null:1: error: Error importing plugin "trio_typing.plugin": cannot import name 'TypeVarLikeType' from 'mypy.types' (/usr/lib/python3.8/site-packages/mypy/types.py)
========================================================================= short test summary info ==========================================================================
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testAsyncGenerator
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testAsyncGeneratorUtils
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testAsyncCM
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testAsyncCM_36
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testOpenType
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testOutcome
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testTaskStatus
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testTaskStatus_NoPlugin
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testTrioBasic
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testTrioBasic_NoPlugin
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testExceptions
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testOverloaded
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testChannels
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testSubprocessPaths
FAILED trio_typing/_tests/test_typecheck.py::TrioTestSuite::testOptionalCwd
====================================================================== 15 failed, 1 passed in 26.72s =======================================================================

I'm using mypy 0.910.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions