Skip to content

7.4.0: pytest is failing with internal error on testing mypy (possible bug in pytest?) #11201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
kloczek opened this issue Jul 12, 2023 · 4 comments
Closed
4 tasks done

Comments

@kloczek
Copy link
Contributor

kloczek commented Jul 12, 2023

  • a detailed description of the bug or problem you are having
  • output of pip list from the virtual environment you are using
  • pytest and operating system versions
  • minimal example if possible

I'm packaging mypy as the 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 --no-isolation
  • because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
  • install .whl file in </install/prefix> using 'installer` module
  • run pytest with $PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
  • build is performed in env which is cut off from access to the public network (pytest is executed with -m "not network")

Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-mypy-1.4.1-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-mypy-1.4.1-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' -vvv
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.17, pytest-7.4.0, pluggy-1.0.0 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /home/tkloczko/rpmbuild/BUILD/mypy-1.4.1
configfile: pytest.ini
testpaths: mypy/test, mypyc/test
plugins: cov-4.0.0, xdist-3.3.1, forked-1.6.0
24 workers [11206 items]
scheduling tests via LoadScheduling

mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_namespace
mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testTypeUsingTypeCInUpperBound <- test-data/unit/check-classes.test
[gw0] [  0%] PASSED mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_namespace
mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_namespace_explicit_base
[gw0] [  0%] PASSED mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_namespace_explicit_base
mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_namespace_multi_dir
mypy/test/testcheck.py::TypeCheckSuite::check-dynamic-typing.test::testImplicitGlobalFunctionSignature <- test-data/unit/check-dynamic-typing.test
mypy/test/testcheck.py::TypeCheckSuite::check-enum.test::testFinalWithDunderAssignment <- test-data/unit/check-enum.test
mypy/test/testcheck.py::TypeCheckSuite::check-annotated.test::testAnnotatedAliasGenericUnion <- test-data/unit/check-annotated.test
mypy/test/testcheck.py::TypeCheckSuite::check-classes.test::testDescriptorDunderSetWrongArgTypes <- test-data/unit/check-classes.test
mypy/test/testcheck.py::TypeCheckSuite::check-columns.test::testColumnReturnValueExpected <- test-data/unit/check-columns.test
mypy/test/testcheck.py::TypeCheckSuite::check-bound.test::testBoundHigherOrderWithVoid <- test-data/unit/check-bound.test
[gw0] [  0%] PASSED mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_namespace_multi_dir
mypy/test/test_find_sources.py::SourceFinderSuite::test_crawl_no_namespace

[..]

[gw0] [ 67%] SKIPPED mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::fine-grained-follow-imports.test::testFollowImportsNormalAddSuppressed3_cached <- test-data/unit/fine-grained-follow-imports.test
mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::fine-grained-follow-imports.test::testFollowImportsNormalEditingFileBringNewModule_cached <- test-data/unit/fine-grained-follow-imports.test
INTERNALERROR> def worker_internal_error(self, node, formatted_error):
INTERNALERROR>         """
INTERNALERROR>         pytest_internalerror() was called on the worker.
INTERNALERROR>
INTERNALERROR>         pytest_internalerror() arguments are an excinfo and an excrepr, which can't
INTERNALERROR>         be serialized, so we go with a poor man's solution of raising an exception
INTERNALERROR>         here ourselves using the formatted message.
INTERNALERROR>         """
INTERNALERROR>         self._active_nodes.remove(node)
INTERNALERROR>         try:
INTERNALERROR> >           assert False, formatted_error
INTERNALERROR> E           AssertionError: Traceback (most recent call last):
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR> E                 session.exitstatus = doit(config, session) or 0
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR> E                 config.hook.pytest_runtestloop(session=session)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> E                 return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> E                 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> E                 return outcome.get_result()
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> E                 raise ex[1].with_traceback(ex[2])
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> E                 res = hook_impl.function(*args)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/xdist/remote.py", line 157, in pytest_runtestloop
INTERNALERROR> E                 self.run_one_test()
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/xdist/remote.py", line 174, in run_one_test
INTERNALERROR> E                 self.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> E                 return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> E                 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> E                 return outcome.get_result()
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> E                 raise ex[1].with_traceback(ex[2])
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> E                 res = hook_impl.function(*args)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 114, in pytest_runtest_protocol
INTERNALERROR> E                 runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 133, in runtestprotocol
INTERNALERROR> E                 reports.append(call_and_report(item, "call", log))
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 224, in call_and_report
INTERNALERROR> E                 report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR> E                 return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> E                 return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 55, in _multicall
INTERNALERROR> E                 gen.send(outcome)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/skipping.py", line 266, in pytest_runtest_makereport
INTERNALERROR> E                 rep = outcome.get_result()
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> E                 raise ex[1].with_traceback(ex[2])
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> E                 res = hook_impl.function(*args)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/runner.py", line 368, in pytest_runtest_makereport
INTERNALERROR> E                 return TestReport.from_item_and_call(item, call)
INTERNALERROR> E               File "/usr/lib/python3.8/site-packages/_pytest/reports.py", line 362, in from_item_and_call
INTERNALERROR> E                 longrepr = item.repr_failure(excinfo)
INTERNALERROR> E               File "/home/tkloczko/rpmbuild/BUILD/mypy-1.4.1/mypy/test/data.py", line 392, in repr_failure
INTERNALERROR> E                 self.parent._prunetraceback(excinfo)
INTERNALERROR> E             AttributeError: 'DataFileCollector' object has no attribute '_prunetraceback'
INTERNALERROR> E           assert False
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/xdist/dsession.py:197: AssertionError
[gw21] [ 67%] PASSED mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::fine-grained.test::testMakeClassNoLongerAbstract1_cached <- test-data/unit/fine-grained.test
mypy/test/testfinegrainedcache.py::FineGrainedCacheSuite::fine-grained.test::testMakeClassNoLongerAbstract2_cached <- test-data/unit/fine-grained.test
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 270, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/_pytest/main.py", line 324, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/xdist/dsession.py", line 122, in pytest_runtestloop
INTERNALERROR>     self.loop_once()
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/xdist/dsession.py", line 145, in loop_once
INTERNALERROR>     call(**kwargs)
INTERNALERROR>   File "/usr/lib/python3.8/site-packages/xdist/dsession.py", line 184, in worker_workerfinished
INTERNALERROR>     assert not crashitem, (crashitem, node)
INTERNALERROR> AssertionError: ('mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkg_config_nositepackages', <WorkerController gw9>)
INTERNALERROR> assert not 'mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkg_config_nositepackages'

======================================================================= 7476 passed, 133 skipped, 6 xfailed in 43.78s =======================================================================

Here is list of installed modules in build env

Package                       Version
----------------------------- -------
alabaster                     0.7.13
ast_decompiler                0.7.0
asttokens                     2.2.1
attrs                         23.1.0
Babel                         2.12.1
backcall                      0.2.0
build                         0.10.0
charset-normalizer            3.1.0
coverage                      7.2.7
decorator                     5.1.1
distlib                       0.3.6
distro                        1.8.0
docutils                      0.19
exceptiongroup                1.1.1
execnet                       1.9.0
executing                     1.2.0
filelock                      3.12.2
flake8                        5.0.4
flake8-bugbear                22.7.1
flake8-pyi                    22.11.0
gpg                           1.20.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.7.0
iniconfig                     2.0.0
installer                     0.7.0
ipython                       8.12.0
jedi                          0.18.2
Jinja2                        3.1.2
libcomps                      0.1.19
lxml                          4.9.3
MarkupSafe                    2.1.2
matplotlib-inline             0.1.6
mccabe                        0.7.0
mypy-extensions               1.0.0
packaging                     23.1
parso                         0.8.3
pexpect                       4.8.0
pickleshare                   0.7.5
platformdirs                  3.8.1
pluggy                        1.0.0
prompt-toolkit                3.0.38
psutil                        5.9.2
ptyprocess                    0.7.0
pure-eval                     0.2.2
py                            1.11.0
pycodestyle                   2.9.1
pyflakes                      2.5.0
Pygments                      2.15.1
pyproject_hooks               1.0.0
pytest                        7.4.0
pytest-cov                    4.0.0
pytest-forked                 1.6.0
pytest-xdist                  3.3.1
python-dateutil               2.8.2
pytz                          2023.2
requests                      2.31.0
setuptools                    68.0.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        6.2.1
sphinx-rtd-theme              1.2.1
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jquery          4.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data                    0.6.2
tomli                         2.0.1
traitlets                     5.9.0
typed-ast                     1.5.4
typing_extensions             4.7.1
urllib3                       1.26.15
virtualenv                    20.23.1
wcwidth                       0.2.6
wheel                         0.40.0
zipp                          3.15.0
@kloczek kloczek changed the title 7.4.0: pytest is failing with interbnal error on testing passible bug in pytest? 7.4.0: pytest is failing with internal error on testing (passible bug in pytest?) Jul 12, 2023
@kloczek kloczek changed the title 7.4.0: pytest is failing with internal error on testing (passible bug in pytest?) 7.4.0: pytest is failing with internal error on testing (possible bug in pytest?) Jul 12, 2023
@kloczek kloczek changed the title 7.4.0: pytest is failing with internal error on testing (possible bug in pytest?) 7.4.0: pytest is failing with internal error on testing mypy (possible bug in pytest?) Jul 12, 2023
@RonnyPfannschmidt
Copy link
Member

At first glance this looks like a custom collector missing a implicitly assumed api

Please provide output with --fulltrace so we can also observe the full error

@kloczek
Copy link
Contributor Author

kloczek commented Jul 12, 2023

Here it is:

INTERNALERROR> def worker_internal_error(self, node, formatted_error):
INTERNALERROR>         """
INTERNALERROR>         pytest_internalerror() was called on the worker.
INTERNALERROR>
INTERNALERROR>         pytest_internalerror() arguments are an excinfo and an excrepr, which can't
INTERNALERROR>         be serialized, so we go with a poor man's solution of raising an exception
INTERNALERROR>         here ourselves using the formatted message.
INTERNALERROR>         """
INTERNALERROR>         self._active_nodes.remove(node)
INTERNALERROR>         try:
INTERNALERROR> >           assert False, formatted_error
INTERNALERROR> E           AssertionError: config = <_pytest.config.Config object at 0x7fae4647ca00>
INTERNALERROR> E             doit = <function _main at 0x7fae469bde50>
INTERNALERROR> E
INTERNALERROR> E                 def wrap_session(
INTERNALERROR> E                     config: Config, doit: Callable[[Config, "Session"], Optional[Union[int, ExitCode]]]
INTERNALERROR> E                 ) -> Union[int, ExitCode]:
INTERNALERROR> E                     """Skeleton command line program."""
INTERNALERROR> E                     session = Session.from_config(config)
INTERNALERROR> E                     session.exitstatus = ExitCode.OK
INTERNALERROR> E                     initstate = 0
INTERNALERROR> E                     try:
INTERNALERROR> E                         try:
INTERNALERROR> E                             config._do_configure()
INTERNALERROR> E                             initstate = 1
INTERNALERROR> E                             config.hook.pytest_sessionstart(session=session)
INTERNALERROR> E                             initstate = 2
INTERNALERROR> E             >               session.exitstatus = doit(config, session) or 0
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/main.py:270:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             config = <_pytest.config.Config object at 0x7fae4647ca00>
INTERNALERROR> E             session = <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>
INTERNALERROR> E
INTERNALERROR> E                 def _main(config: Config, session: "Session") -> Optional[Union[int, ExitCode]]:
INTERNALERROR> E                     """Default command line protocol for initialization, session,
INTERNALERROR> E                     running tests and reporting."""
INTERNALERROR> E                     config.hook.pytest_collection(session=session)
INTERNALERROR> E             >       config.hook.pytest_runtestloop(session=session)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/main.py:324:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <_HookCaller 'pytest_runtestloop'>, args = ()
INTERNALERROR> E             kwargs = {'session': <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>}
INTERNALERROR> E             argname = 'session', firstresult = True
INTERNALERROR> E
INTERNALERROR> E                 def __call__(self, *args, **kwargs):
INTERNALERROR> E                     if args:
INTERNALERROR> E                         raise TypeError("hook calling supports only keyword arguments")
INTERNALERROR> E                     assert not self.is_historic()
INTERNALERROR> E
INTERNALERROR> E                     # This is written to avoid expensive operations when not needed.
INTERNALERROR> E                     if self.spec:
INTERNALERROR> E                         for argname in self.spec.argnames:
INTERNALERROR> E                             if argname not in kwargs:
INTERNALERROR> E                                 notincall = tuple(set(self.spec.argnames) - kwargs.keys())
INTERNALERROR> E                                 warnings.warn(
INTERNALERROR> E                                     "Argument(s) {} which are declared in the hookspec "
INTERNALERROR> E                                     "can not be found in this hook call".format(notincall),
INTERNALERROR> E                                     stacklevel=2,
INTERNALERROR> E                                 )
INTERNALERROR> E                                 break
INTERNALERROR> E
INTERNALERROR> E                         firstresult = self.spec.opts.get("firstresult")
INTERNALERROR> E                     else:
INTERNALERROR> E                         firstresult = False
INTERNALERROR> E
INTERNALERROR> E             >       return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <_pytest.config.PytestPluginManager object at 0x7fae47b7ebb0>
INTERNALERROR> E             hook_name = 'pytest_runtestloop'
INTERNALERROR> E             methods = [<HookImpl plugin_name='main', plugin=<module '_pytest.main' from '/usr/lib/python3.8/site-packages/_pytest/main.py'>>...ae4647ce20>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7fae45fdc370>>]
INTERNALERROR> E             kwargs = {'session': <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>}
INTERNALERROR> E             firstresult = True
INTERNALERROR> E
INTERNALERROR> E                 def _hookexec(self, hook_name, methods, kwargs, firstresult):
INTERNALERROR> E                     # called from all hookcaller instances.
INTERNALERROR> E                     # enable_tracing will set its own wrapping function at self._inner_hookexec
INTERNALERROR> E             >       return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/pluggy/_manager.py:80:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <__channelexec__.WorkerInteractor object at 0x7fae4647ce20>
INTERNALERROR> E             session = <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>
INTERNALERROR> E
INTERNALERROR> E                 @pytest.hookimpl
INTERNALERROR> E                 def pytest_runtestloop(self, session):
INTERNALERROR> E                     self.log("entering main loop")
INTERNALERROR> E                     self.channel.setcallback(self.handle_command, endmarker=self.SHUTDOWN_MARK)
INTERNALERROR> E                     self.nextitem_index = self._get_next_item_index()
INTERNALERROR> E                     while self.nextitem_index is not self.SHUTDOWN_MARK:
INTERNALERROR> E             >           self.run_one_test()
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/xdist/remote.py:157:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <__channelexec__.WorkerInteractor object at 0x7fae4647ce20>
INTERNALERROR> E
INTERNALERROR> E                 def run_one_test(self):
INTERNALERROR> E                     self.item_index = self.nextitem_index
INTERNALERROR> E                     self.nextitem_index = self._get_next_item_index()
INTERNALERROR> E
INTERNALERROR> E                     items = self.session.items
INTERNALERROR> E                     item = items[self.item_index]
INTERNALERROR> E                     if self.nextitem_index is self.SHUTDOWN_MARK:
INTERNALERROR> E                         nextitem = None
INTERNALERROR> E                     else:
INTERNALERROR> E                         nextitem = items[self.nextitem_index]
INTERNALERROR> E
INTERNALERROR> E                     worker_title("[pytest-xdist running] %s" % item.nodeid)
INTERNALERROR> E
INTERNALERROR> E                     start = time.time()
INTERNALERROR> E             >       self.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/xdist/remote.py:174:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <_HookCaller 'pytest_runtest_protocol'>, args = ()
INTERNALERROR> E             kwargs = {'item': <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>, 'nextitem': <DataDrivenTestCase testTypedPkgSimple>}
INTERNALERROR> E             argname = 'nextitem', firstresult = True
INTERNALERROR> E
INTERNALERROR> E                 def __call__(self, *args, **kwargs):
INTERNALERROR> E                     if args:
INTERNALERROR> E                         raise TypeError("hook calling supports only keyword arguments")
INTERNALERROR> E                     assert not self.is_historic()
INTERNALERROR> E
INTERNALERROR> E                     # This is written to avoid expensive operations when not needed.
INTERNALERROR> E                     if self.spec:
INTERNALERROR> E                         for argname in self.spec.argnames:
INTERNALERROR> E                             if argname not in kwargs:
INTERNALERROR> E                                 notincall = tuple(set(self.spec.argnames) - kwargs.keys())
INTERNALERROR> E                                 warnings.warn(
INTERNALERROR> E                                     "Argument(s) {} which are declared in the hookspec "
INTERNALERROR> E                                     "can not be found in this hook call".format(notincall),
INTERNALERROR> E                                     stacklevel=2,
INTERNALERROR> E                                 )
INTERNALERROR> E                                 break
INTERNALERROR> E
INTERNALERROR> E                         firstresult = self.spec.opts.get("firstresult")
INTERNALERROR> E                     else:
INTERNALERROR> E                         firstresult = False
INTERNALERROR> E
INTERNALERROR> E             >       return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <_pytest.config.PytestPluginManager object at 0x7fae47b7ebb0>
INTERNALERROR> E             hook_name = 'pytest_runtest_protocol'
INTERNALERROR> E             methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...lugin_name='warnings', plugin=<module '_pytest.warnings' from '/usr/lib/python3.8/site-packages/_pytest/warnings.py'>>]
INTERNALERROR> E             kwargs = {'item': <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>, 'nextitem': <DataDrivenTestCase testTypedPkgSimple>}
INTERNALERROR> E             firstresult = True
INTERNALERROR> E
INTERNALERROR> E                 def _hookexec(self, hook_name, methods, kwargs, firstresult):
INTERNALERROR> E                     # called from all hookcaller instances.
INTERNALERROR> E                     # enable_tracing will set its own wrapping function at self._inner_hookexec
INTERNALERROR> E             >       return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/pluggy/_manager.py:80:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             item = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>
INTERNALERROR> E             nextitem = <DataDrivenTestCase testTypedPkgSimple>
INTERNALERROR> E
INTERNALERROR> E                 def pytest_runtest_protocol(item: Item, nextitem: Optional[Item]) -> bool:
INTERNALERROR> E                     ihook = item.ihook
INTERNALERROR> E                     ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
INTERNALERROR> E             >       runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/runner.py:114:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             item = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>, log = True
INTERNALERROR> E             nextitem = <DataDrivenTestCase testTypedPkgSimple>
INTERNALERROR> E
INTERNALERROR> E                 def runtestprotocol(
INTERNALERROR> E                     item: Item, log: bool = True, nextitem: Optional[Item] = None
INTERNALERROR> E                 ) -> List[TestReport]:
INTERNALERROR> E                     hasrequest = hasattr(item, "_request")
INTERNALERROR> E                     if hasrequest and not item._request:  # type: ignore[attr-defined]
INTERNALERROR> E                         # This only happens if the item is re-run, as is done by
INTERNALERROR> E                         # pytest-rerunfailures.
INTERNALERROR> E                         item._initrequest()  # type: ignore[attr-defined]
INTERNALERROR> E                     rep = call_and_report(item, "setup", log)
INTERNALERROR> E                     reports = [rep]
INTERNALERROR> E                     if rep.passed:
INTERNALERROR> E                         if item.config.getoption("setupshow", False):
INTERNALERROR> E                             show_test_item(item)
INTERNALERROR> E                         if not item.config.getoption("setuponly", False):
INTERNALERROR> E             >               reports.append(call_and_report(item, "call", log))
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/runner.py:133:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             item = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>, when = 'call'
INTERNALERROR> E             log = True, kwds = {}
INTERNALERROR> E             call = <CallInfo when='call' excinfo=<ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uvwwx1i/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\n") tblen=14>>
INTERNALERROR> E             hook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fae4647cb80>
INTERNALERROR> E
INTERNALERROR> E                 def call_and_report(
INTERNALERROR> E                     item: Item, when: "Literal['setup', 'call', 'teardown']", log: bool = True, **kwds
INTERNALERROR> E                 ) -> TestReport:
INTERNALERROR> E                     call = call_runtest_hook(item, when, **kwds)
INTERNALERROR> E                     hook = item.ihook
INTERNALERROR> E             >       report: TestReport = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/runner.py:224:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <_HookCaller 'pytest_runtest_makereport'>, args = ()
INTERNALERROR> E             kwargs = {'call': <CallInfo when='call' excinfo=<ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uv...']' returned non-zero exit status 1.\n") tblen=14>>, 'item': <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>}
INTERNALERROR> E             argname = 'call', firstresult = True
INTERNALERROR> E
INTERNALERROR> E                 def __call__(self, *args, **kwargs):
INTERNALERROR> E                     if args:
INTERNALERROR> E                         raise TypeError("hook calling supports only keyword arguments")
INTERNALERROR> E                     assert not self.is_historic()
INTERNALERROR> E
INTERNALERROR> E                     # This is written to avoid expensive operations when not needed.
INTERNALERROR> E                     if self.spec:
INTERNALERROR> E                         for argname in self.spec.argnames:
INTERNALERROR> E                             if argname not in kwargs:
INTERNALERROR> E                                 notincall = tuple(set(self.spec.argnames) - kwargs.keys())
INTERNALERROR> E                                 warnings.warn(
INTERNALERROR> E                                     "Argument(s) {} which are declared in the hookspec "
INTERNALERROR> E                                     "can not be found in this hook call".format(notincall),
INTERNALERROR> E                                     stacklevel=2,
INTERNALERROR> E                                 )
INTERNALERROR> E                                 break
INTERNALERROR> E
INTERNALERROR> E                         firstresult = self.spec.opts.get("firstresult")
INTERNALERROR> E                     else:
INTERNALERROR> E                         firstresult = False
INTERNALERROR> E
INTERNALERROR> E             >       return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <_pytest.config.PytestPluginManager object at 0x7fae47b7ebb0>
INTERNALERROR> E             hook_name = 'pytest_runtest_makereport'
INTERNALERROR> E             methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...Impl plugin_name='tmpdir', plugin=<module '_pytest.tmpdir' from '/usr/lib/python3.8/site-packages/_pytest/tmpdir.py'>>]
INTERNALERROR> E             kwargs = {'call': <CallInfo when='call' excinfo=<ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uv...']' returned non-zero exit status 1.\n") tblen=14>>, 'item': <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>}
INTERNALERROR> E             firstresult = True
INTERNALERROR> E
INTERNALERROR> E                 def _hookexec(self, hook_name, methods, kwargs, firstresult):
INTERNALERROR> E                     # called from all hookcaller instances.
INTERNALERROR> E                     # enable_tracing will set its own wrapping function at self._inner_hookexec
INTERNALERROR> E             >       return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/pluggy/_manager.py:80:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             item = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>
INTERNALERROR> E             call = <CallInfo when='call' excinfo=<ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uvwwx1i/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\n") tblen=14>>
INTERNALERROR> E
INTERNALERROR> E                 @hookimpl(hookwrapper=True)
INTERNALERROR> E                 def pytest_runtest_makereport(item: Item, call: CallInfo[None]):
INTERNALERROR> E                     outcome = yield
INTERNALERROR> E             >       rep = outcome.get_result()
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/skipping.py:266:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             item = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>
INTERNALERROR> E             call = <CallInfo when='call' excinfo=<ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uvwwx1i/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\n") tblen=14>>
INTERNALERROR> E
INTERNALERROR> E                 def pytest_runtest_makereport(item: Item, call: CallInfo[None]) -> TestReport:
INTERNALERROR> E             >       return TestReport.from_item_and_call(item, call)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/runner.py:368:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             cls = <class '_pytest.reports.TestReport'>
INTERNALERROR> E             item = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>
INTERNALERROR> E             call = <CallInfo when='call' excinfo=<ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uvwwx1i/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\n") tblen=14>>
INTERNALERROR> E
INTERNALERROR> E                 @classmethod
INTERNALERROR> E                 def from_item_and_call(cls, item: Item, call: "CallInfo[None]") -> "TestReport":
INTERNALERROR> E                     """Create and fill a TestReport with standard item and call info.
INTERNALERROR> E
INTERNALERROR> E                     :param item: The item.
INTERNALERROR> E                     :param call: The call info.
INTERNALERROR> E                     """
INTERNALERROR> E                     when = call.when
INTERNALERROR> E                     # Remove "collect" from the Literal type -- only for collection calls.
INTERNALERROR> E                     assert when != "collect"
INTERNALERROR> E                     duration = call.duration
INTERNALERROR> E                     start = call.start
INTERNALERROR> E                     stop = call.stop
INTERNALERROR> E                     keywords = {x: 1 for x in item.keywords}
INTERNALERROR> E                     excinfo = call.excinfo
INTERNALERROR> E                     sections = []
INTERNALERROR> E                     if not call.excinfo:
INTERNALERROR> E                         outcome: Literal["passed", "failed", "skipped"] = "passed"
INTERNALERROR> E                         longrepr: Union[
INTERNALERROR> E                             None,
INTERNALERROR> E                             ExceptionInfo[BaseException],
INTERNALERROR> E                             Tuple[str, int, str],
INTERNALERROR> E                             str,
INTERNALERROR> E                             TerminalRepr,
INTERNALERROR> E                         ] = None
INTERNALERROR> E                     else:
INTERNALERROR> E                         if not isinstance(excinfo, ExceptionInfo):
INTERNALERROR> E                             outcome = "failed"
INTERNALERROR> E                             longrepr = excinfo
INTERNALERROR> E                         elif isinstance(excinfo.value, skip.Exception):
INTERNALERROR> E                             outcome = "skipped"
INTERNALERROR> E                             r = excinfo._getreprcrash()
INTERNALERROR> E                             assert (
INTERNALERROR> E                                 r is not None
INTERNALERROR> E                             ), "There should always be a traceback entry for skipping a test."
INTERNALERROR> E                             if excinfo.value._use_item_location:
INTERNALERROR> E                                 path, line = item.reportinfo()[:2]
INTERNALERROR> E                                 assert line is not None
INTERNALERROR> E                                 longrepr = os.fspath(path), line + 1, r.message
INTERNALERROR> E                             else:
INTERNALERROR> E                                 longrepr = (str(r.path), r.lineno, r.message)
INTERNALERROR> E                         else:
INTERNALERROR> E                             outcome = "failed"
INTERNALERROR> E                             if call.when == "call":
INTERNALERROR> E             >                   longrepr = item.repr_failure(excinfo)
INTERNALERROR> E
INTERNALERROR> E             /usr/lib/python3.8/site-packages/_pytest/reports.py:362:
INTERNALERROR> E             _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR> E
INTERNALERROR> E             self = <DataDrivenTestCase testTypedPkgNoSitePkgsIgnoredImports>
INTERNALERROR> E             excinfo = <ExceptionInfo Exception("Failed to create venv.\nError: Command '['/tmp/tmp_uvwwx1i/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\n") tblen=14>
INTERNALERROR> E             style = None
INTERNALERROR> E
INTERNALERROR> E                 def repr_failure(self, excinfo: Any, style: Any | None = None) -> str:
INTERNALERROR> E                     if isinstance(excinfo.value, SystemExit):
INTERNALERROR> E                         # We assume that before doing exit() (which raises SystemExit) we've printed
INTERNALERROR> E                         # enough context about what happened so that a stack trace is not useful.
INTERNALERROR> E                         # In particular, uncaught exceptions during semantic analysis or type checking
INTERNALERROR> E                         # call exit() and they already print out a stack trace.
INTERNALERROR> E                         excrepr = excinfo.exconly()
INTERNALERROR> E                     elif isinstance(excinfo.value, pytest.fail.Exception) and not excinfo.value.pytrace:
INTERNALERROR> E                         excrepr = excinfo.exconly()
INTERNALERROR> E                     else:
INTERNALERROR> E             >           self.parent._prunetraceback(excinfo)
INTERNALERROR> E             E           AttributeError: 'DataFileCollector' object has no attribute '_prunetraceback'
INTERNALERROR> E
INTERNALERROR> E             /home/tkloczko/rpmbuild/BUILD/mypy-1.4.1/mypy/test/data.py:392: AttributeError
INTERNALERROR> E           assert False
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/xdist/dsession.py:197: AssertionError
.INTERNALERROR> config = <_pytest.config.Config object at 0x7f33250c3970>, doit = <function _main at 0x7f332604cc10>
INTERNALERROR>
INTERNALERROR>     def wrap_session(
INTERNALERROR>         config: Config, doit: Callable[[Config, "Session"], Optional[Union[int, ExitCode]]]
INTERNALERROR>     ) -> Union[int, ExitCode]:
INTERNALERROR>         """Skeleton command line program."""
INTERNALERROR>         session = Session.from_config(config)
INTERNALERROR>         session.exitstatus = ExitCode.OK
INTERNALERROR>         initstate = 0
INTERNALERROR>         try:
INTERNALERROR>             try:
INTERNALERROR>                 config._do_configure()
INTERNALERROR>                 initstate = 1
INTERNALERROR>                 config.hook.pytest_sessionstart(session=session)
INTERNALERROR>                 initstate = 2
INTERNALERROR> >               session.exitstatus = doit(config, session) or 0
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/_pytest/main.py:270:
INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR>
INTERNALERROR> config = <_pytest.config.Config object at 0x7f33250c3970>, session = <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>
INTERNALERROR>
INTERNALERROR>     def _main(config: Config, session: "Session") -> Optional[Union[int, ExitCode]]:
INTERNALERROR>         """Default command line protocol for initialization, session,
INTERNALERROR>         running tests and reporting."""
INTERNALERROR>         config.hook.pytest_collection(session=session)
INTERNALERROR> >       config.hook.pytest_runtestloop(session=session)
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/_pytest/main.py:324:
INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR>
INTERNALERROR> self = <_HookCaller 'pytest_runtestloop'>, args = (), kwargs = {'session': <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>}
INTERNALERROR> argname = 'session', firstresult = True
INTERNALERROR>
INTERNALERROR>     def __call__(self, *args, **kwargs):
INTERNALERROR>         if args:
INTERNALERROR>             raise TypeError("hook calling supports only keyword arguments")
INTERNALERROR>         assert not self.is_historic()
INTERNALERROR>
INTERNALERROR>         # This is written to avoid expensive operations when not needed.
INTERNALERROR>         if self.spec:
INTERNALERROR>             for argname in self.spec.argnames:
INTERNALERROR>                 if argname not in kwargs:
INTERNALERROR>                     notincall = tuple(set(self.spec.argnames) - kwargs.keys())
INTERNALERROR>                     warnings.warn(
INTERNALERROR>                         "Argument(s) {} which are declared in the hookspec "
INTERNALERROR>                         "can not be found in this hook call".format(notincall),
INTERNALERROR>                         stacklevel=2,
INTERNALERROR>                     )
INTERNALERROR>                     break
INTERNALERROR>
INTERNALERROR>             firstresult = self.spec.opts.get("firstresult")
INTERNALERROR>         else:
INTERNALERROR>             firstresult = False
INTERNALERROR>
INTERNALERROR> >       return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265:
INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR>
INTERNALERROR> self = <_pytest.config.PytestPluginManager object at 0x7f33261c2490>, hook_name = 'pytest_runtestloop'
INTERNALERROR> methods = [<HookImpl plugin_name='main', plugin=<module '_pytest.main' from '/usr/lib/python3.8/site-packages/_pytest/main.py'>>...3324b26640>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7f3324a2f0a0>>]
INTERNALERROR> kwargs = {'session': <Session mypy-1.4.1 exitstatus=<ExitCode.INTERNAL_ERROR: 3> testsfailed=0 testscollected=11206>}, firstresult = True
INTERNALERROR>
INTERNALERROR>     def _hookexec(self, hook_name, methods, kwargs, firstresult):
INTERNALERROR>         # called from all hookcaller instances.
INTERNALERROR>         # enable_tracing will set its own wrapping function at self._inner_hookexec
INTERNALERROR> >       return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/pluggy/_manager.py:80:
INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR>
INTERNALERROR> self = <xdist.dsession.DSession object at 0x7f3324b26640>
INTERNALERROR>
INTERNALERROR>     @pytest.hookimpl
INTERNALERROR>     def pytest_runtestloop(self):
INTERNALERROR>         self.sched = self.config.hook.pytest_xdist_make_scheduler(
INTERNALERROR>             config=self.config, log=self.log
INTERNALERROR>         )
INTERNALERROR>         assert self.sched is not None
INTERNALERROR>
INTERNALERROR>         self.shouldstop = False
INTERNALERROR>         while not self.session_finished:
INTERNALERROR> >           self.loop_once()
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/xdist/dsession.py:122:
INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR>
INTERNALERROR> self = <xdist.dsession.DSession object at 0x7f3324b26640>
INTERNALERROR>
INTERNALERROR>     def loop_once(self):
INTERNALERROR>         """Process one callback from one of the workers."""
INTERNALERROR>         while 1:
INTERNALERROR>             if not self._active_nodes:
INTERNALERROR>                 # If everything has died stop looping
INTERNALERROR>                 self.triggershutdown()
INTERNALERROR>                 raise RuntimeError("Unexpectedly no active workers available")
INTERNALERROR>             try:
INTERNALERROR>                 eventcall = self.queue.get(timeout=2.0)
INTERNALERROR>                 break
INTERNALERROR>             except Empty:
INTERNALERROR>                 continue
INTERNALERROR>         callname, kwargs = eventcall
INTERNALERROR>         assert callname, kwargs
INTERNALERROR>         method = "worker_" + callname
INTERNALERROR>         call = getattr(self, method)
INTERNALERROR>         self.log("calling method", method, kwargs)
INTERNALERROR> >       call(**kwargs)
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/xdist/dsession.py:145:
INTERNALERROR> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
INTERNALERROR>
INTERNALERROR> self = <xdist.dsession.DSession object at 0x7f3324b26640>, node = <WorkerController gw4>
INTERNALERROR>
INTERNALERROR>     def worker_workerfinished(self, node):
INTERNALERROR>         """Emitted when node executes its pytest_sessionfinish hook.
INTERNALERROR>
INTERNALERROR>         Removes the node from the scheduler.
INTERNALERROR>
INTERNALERROR>         The node might not be in the scheduler if it had not emitted
INTERNALERROR>         workerready before shutdown was triggered.
INTERNALERROR>         """
INTERNALERROR>         self.config.hook.pytest_testnodedown(node=node, error=None)
INTERNALERROR>         if node.workeroutput["exitstatus"] == 2:  # keyboard-interrupt
INTERNALERROR>             self.shouldstop = f"{node} received keyboard-interrupt"
INTERNALERROR>             self.worker_errordown(node, "keyboard-interrupt")
INTERNALERROR>             return
INTERNALERROR>         if node in self.sched.nodes:
INTERNALERROR>             crashitem = self.sched.remove_node(node)
INTERNALERROR> >           assert not crashitem, (crashitem, node)
INTERNALERROR> E           AssertionError: ('mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkgNoSitePkgsIgnoredImports', <WorkerController gw4>)
INTERNALERROR> E           assert not 'mypy/test/testpep561.py::PEP561Suite::pep561.test::testTypedPkgNoSitePkgsIgnoredImports'
INTERNALERROR>
INTERNALERROR> /usr/lib/python3.8/site-packages/xdist/dsession.py:184: AssertionError

PS. Maybe it would be good to add to issue ticket template note about provide --fulltrace output in cases of some errors like internal errors? (maybe more? 🤔)

@The-Compiler
Copy link
Member

mypy is using private pytest APIs which were removed in fcada1e.

This was already fixed here: python/mypy#15611

@The-Compiler The-Compiler closed this as not planned Won't fix, can't repro, duplicate, stale Jul 12, 2023
@kloczek
Copy link
Contributor Author

kloczek commented Jul 12, 2023

Thank you 👍 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants