ipython / ipykernel

IPython Kernel for Jupyter
https://ipykernel.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
648 stars 366 forks source link

6.15.2: pytest is failing in `ipykernel/tests/test_debugger.py::test_stop_on_breakpoint` unit #981

Open kloczek opened 2 years ago

kloczek commented 2 years ago

I'm packaging 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.

Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.15.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.15.2-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.15.2, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: timeout-2.1.0, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False collected 116 items ipykernel/tests/test_async.py ..ss [ 3%] ipykernel/tests/test_connect.py ..... [ 7%] ipykernel/tests/test_debugger.py ...F.... [ 14%] ipykernel/tests/test_embed_kernel.py ... [ 17%] ipykernel/tests/test_eventloop.py . [ 18%] ipykernel/tests/test_heartbeat.py .... [ 21%] ipykernel/tests/test_io.py .. [ 23%] ipykernel/tests/test_jsonutil.py sssss [ 27%] ipykernel/tests/test_kernel.py .ss..........s..s...... [ 47%] ipykernel/tests/test_kernelspec.py ............. [ 58%] ipykernel/tests/test_message_spec.py ....................... [ 78%] ipykernel/tests/test_pickleutil.py ..... [ 82%] ipykernel/tests/test_start_kernel.py .. [ 84%] ipykernel/tests/test_zmq_shell.py ...... [ 89%] ipykernel/inprocess/tests/test_kernel.py s...... [ 95%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ================================================================================= FAILURES ================================================================================= _________________________________________________________________________ test_stop_on_breakpoint __________________________________________________________________________ kernel_with_debug = def test_stop_on_breakpoint(kernel_with_debug): code = """def f(a, b): c = a + b return c f(2, 3)""" r = wait_for_debug_request(kernel_with_debug, "dumpCell", {"code": code}) > source = r["body"]["sourcePath"] E KeyError: 'body' ipykernel/tests/test_debugger.py:138: KeyError ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== =========================================================================== slowest 10 durations =========================================================================== 31.37s call ipykernel/tests/test_kernel.py::test_shutdown_subprocesses 6.32s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.09s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.96s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.82s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.81s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.53s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.29s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.03s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.78s setup ipykernel/tests/test_debugger.py::test_stop_on_breakpoint ========================================================================= short test summary info ========================================================================== SKIPPED [1] ipykernel/tests/test_async.py:34: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:34: Requires curio SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:290: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:349: test only on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:129: Currently don't capture during test as pytest does its own capturing FAILED ipykernel/tests/test_debugger.py::test_stop_on_breakpoint - KeyError: 'body' ========================================================== 1 failed, 103 passed, 12 skipped in 103.54s (0:01:43) =========================================================== ```

Here is list of installed modules in build env

```console Package Version ----------------------------- ----------------- alabaster 0.7.12 asttokens 2.0.5 attrs 22.1.0 Babel 2.10.2 backcall 0.2.0 Brlapi 0.8.3 build 0.8.0 charset-normalizer 2.1.0 codespell 2.1.0 cycler 0.11.0 debugpy 1.6.3 decorator 5.1.1 distro 1.7.0 docutils 0.18.1 editables 0.3 entrypoints 0.4 executing 0.8.3 extras 1.0.0 fixtures 4.0.0 flaky 3.7.0 fonttools 4.37.1 gpg 1.17.1-unknown hatchling 1.8.1 idna 3.3 imagesize 1.4.1 importlib-metadata 4.12.0 iniconfig 1.1.1 ipykernel 6.15.1 ipyparallel 8.4.1 ipython 8.4.0 jedi 0.18.1 Jinja2 3.1.1 jupyter_client 7.3.5 jupyter_core 4.11.1 kiwisolver 1.4.4 libcomps 0.1.18 louis 3.22.0 markdown-it-py 2.1.0 MarkupSafe 2.1.1 matplotlib 3.5.3 matplotlib-inline 0.1.5 mdit-py-plugins 0.3.0 mdurl 0.1.1 myst-parser 0.18.0 nest-asyncio 1.5.5 numpy 1.23.1 olefile 0.46 packaging 21.3 parso 0.8.3 pathspec 0.9.0 pbr 5.9.0 pep517 0.12.0 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.2.0 pip 22.2.1 pluggy 1.0.0 prompt-toolkit 3.0.29 psutil 5.9.0 ptyprocess 0.7.0 pure-eval 0.2.2 py 1.11.0 Pygments 2.13.0 PyGObject 3.42.2 pyparsing 3.0.9 pytest 7.1.2 pytest-timeout 2.1.0 python-dateutil 2.8.2 pytz 2022.1 PyYAML 6.0 pyzmq 23.2.0 requests 2.28.1 rpm 4.17.0 setuptools 65.3.0 six 1.16.0 snowballstemmer 2.2.0 Sphinx 5.1.1 sphinxcontrib-applehelp 1.0.2.dev20220730 sphinxcontrib-devhelp 1.0.2.dev20220730 sphinxcontrib_github_alt 1.2 sphinxcontrib-htmlhelp 2.0.0 sphinxcontrib-jsmath 1.0.1.dev20220730 sphinxcontrib-qthelp 1.0.3.dev20220730 sphinxcontrib-serializinghtml 1.1.5 stack-data 0.5.0 testtools 2.5.0 tomli 2.0.1 tornado 6.2 tqdm 4.64.0 traitlets 5.3.0 typing_extensions 4.2.0 urllib3 1.26.12 wcwidth 0.2.5 wheel 0.37.1 zipp 3.8.1 ```
kloczek commented 1 year ago

Just tested 6.18.0

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.0-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.18.0, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.20.2, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 130 items ipykernel/tests/test_async.py ..ss [ 3%] ipykernel/tests/test_connect.py ..... [ 6%] ipykernel/tests/test_debugger.py ........ [ 13%] ipykernel/tests/test_embed_kernel.py ... [ 15%] ipykernel/tests/test_eventloop.py .E.. [ 18%] ipykernel/tests/test_heartbeat.py .... [ 21%] ipykernel/tests/test_io.py .. [ 23%] ipykernel/tests/test_jsonutil.py sssss [ 26%] ipykernel/tests/test_kernel.py .ss..........s..s...... [ 44%] ipykernel/tests/test_kernel_direct.py ........... [ 53%] ipykernel/tests/test_kernelspec.py ............. [ 63%] ipykernel/tests/test_message_spec.py ....................... [ 80%] ipykernel/tests/test_pickleutil.py ..... [ 84%] ipykernel/tests/test_start_kernel.py .. [ 86%] ipykernel/tests/test_zmq_shell.py ...... [ 90%] ipykernel/inprocess/tests/test_kernel.py s...... [ 96%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ================================================================================== ERRORS ================================================================================== ______________________________________________________________________ ERROR at setup of test_tk_loop ______________________________________________________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = >, kwargs = {} func = , setup = ._asyncgen_fixture_wrapper..setup at 0x7f1e4c219f70> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f1e4c219550> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:128: in kernel kernel = TestKernel() ipykernel/tests/conftest.py:62: in __init__ stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning ============================================================================= warnings summary ============================================================================= ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== =========================================================================== slowest 10 durations =========================================================================== 31.41s call ipykernel/tests/test_kernel.py::test_shutdown_subprocesses 6.29s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.11s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.71s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.69s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.59s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.52s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.19s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.15s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.66s call ipykernel/tests/test_kernel.py::test_message_order ========================================================================= short test summary info ========================================================================== SKIPPED [1] ipykernel/tests/test_async.py:34: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:34: Requires curio SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:129: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_eventloop.py::test_tk_loop - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. ====================================================== 117 passed, 12 skipped, 1 warning, 1 error in 99.83s (0:01:39) ====================================================== /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-2bd2a75e-ea65-4b16-a3d7-8d6556780de8' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-b402c72d-0cc0-43bd-92d9-bf2ab739af62' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-52f78433-3a18-4364-8af3-c0f1cfa5a4fb' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-5892dd60-f999-4998-b28a-acc7c79f99ff/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-5892dd60-f999-4998-b28a-acc7c79f99ff/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-5892dd60-f999-4998-b28a-acc7c79f99ff/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-5892dd60-f999-4998-b28a-acc7c79f99ff : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-5892dd60-f999-4998-b28a-acc7c79f99ff' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-0f56c63d-5f06-4ed6-8c8f-502f53e9a09e' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-f41a7bc7-cc7c-4fa4-802e-92e0f8bb8713' warnings.warn( ```
kloczek commented 1 year ago

After add to --deselect failing unit another one popped out

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.0-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra --deselect ipykernel/tests/test_eventloop.py::test_tk_loop =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.18.0, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.20.2, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 130 items / 1 deselected / 129 selected ipykernel/tests/test_async.py ..ss [ 3%] ipykernel/tests/test_connect.py ..... [ 6%] ipykernel/tests/test_debugger.py ........ [ 13%] ipykernel/tests/test_embed_kernel.py ... [ 15%] ipykernel/tests/test_eventloop.py .E. [ 17%] ipykernel/tests/test_heartbeat.py .... [ 20%] ipykernel/tests/test_io.py .. [ 22%] ipykernel/tests/test_jsonutil.py sssss [ 26%] ipykernel/tests/test_kernel.py .ss..........s..s...... [ 44%] ipykernel/tests/test_kernel_direct.py ........... [ 52%] ipykernel/tests/test_kernelspec.py ............. [ 62%] ipykernel/tests/test_message_spec.py ....................... [ 80%] ipykernel/tests/test_pickleutil.py ..... [ 84%] ipykernel/tests/test_start_kernel.py .. [ 86%] ipykernel/tests/test_zmq_shell.py ...... [ 90%] ipykernel/inprocess/tests/test_kernel.py s...... [ 96%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ================================================================================== ERRORS ================================================================================== ___________________________________________________________________ ERROR at setup of test_asyncio_loop ____________________________________________________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = >, kwargs = {} func = , setup = ._asyncgen_fixture_wrapper..setup at 0x7fc2b9c1ae50> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7fc2b9c1adc0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:128: in kernel kernel = TestKernel() ipykernel/tests/conftest.py:62: in __init__ stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning ============================================================================= warnings summary ============================================================================= ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== =========================================================================== slowest 10 durations =========================================================================== 31.38s call ipykernel/tests/test_kernel.py::test_shutdown_subprocesses 6.30s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.20s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.86s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.63s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.53s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.51s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.19s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.19s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.69s call ipykernel/tests/test_kernel.py::test_subprocess_error ========================================================================= short test summary info ========================================================================== SKIPPED [1] ipykernel/tests/test_async.py:34: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:34: Requires curio SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:129: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_eventloop.py::test_asyncio_loop - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. =============================================== 116 passed, 12 skipped, 1 deselected, 1 warning, 1 error in 99.55s (0:01:39) =============================================== /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-62af5aaf-bd4d-46a5-b86c-56f8f8559dc5' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-fbd97d9b-5f6d-4022-84fd-8223f0232580' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-882c639e-e3f2-4ae9-94fc-40abf69f20de' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-375fd09a-6fda-4f2d-921f-fe109b93fec3/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-375fd09a-6fda-4f2d-921f-fe109b93fec3/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-375fd09a-6fda-4f2d-921f-fe109b93fec3/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-375fd09a-6fda-4f2d-921f-fe109b93fec3 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-375fd09a-6fda-4f2d-921f-fe109b93fec3' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-432335d0-f12d-4432-b283-9304a2bf11df' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-b512a356-311e-470f-985f-df018f23207f' warnings.warn( ```

This may mean that there are some dependencies beteen units. To diagnose that issue https://github.com/mrbean-bremen/pytest-find-dependencies/ can be used.

kloczek commented 1 year ago

Loks like with 6.18.1 one more unit is failing

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.1-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra --deselect ipykernel/tests/test_eventloop.py::test_asyncio_loop --deselect ipykernel/tests/test_eventloop.py::test_enable_gui --deselect ipykernel/tests/test_eventloop.py::test_tk_loop --deselect ipykernel/tests/test_kernel_direct.py::test_comm_info_request --deselect ipykernel/tests/test_kernel_direct.py::test_complete_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_debug_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_execute_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_interrupt_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_kernel_info_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_shutdown_request --deselect ipykernel/tests/test_kernel_direct.py::test_history_request --deselect ipykernel/tests/test_kernel_direct.py::test_inspect_request --deselect ipykernel/tests/test_kernel_direct.py::test_is_complete_request =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.18.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.20.2, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 174 items / 15 deselected / 159 selected ipykernel/tests/test_async.py ..ss [ 2%] ipykernel/tests/test_comm.py E [ 3%] ipykernel/tests/test_connect.py ..... [ 6%] ipykernel/tests/test_debugger.py ........ [ 11%] ipykernel/tests/test_embed_kernel.py .... [ 13%] ipykernel/tests/test_eventloop.py .s [ 15%] ipykernel/tests/test_heartbeat.py .... [ 17%] ipykernel/tests/test_io.py ..... [ 20%] ipykernel/tests/test_ipkernel_direct.py .................... [ 33%] ipykernel/tests/test_jsonutil.py sssss [ 36%] ipykernel/tests/test_kernel.py .ss..........ss.s.....s [ 50%] ipykernel/tests/test_kernel_direct.py ......... [ 56%] ipykernel/tests/test_kernelapp.py ...s [ 59%] ipykernel/tests/test_kernelspec.py ............. [ 67%] ipykernel/tests/test_message_spec.py ....................... [ 81%] ipykernel/tests/test_parentpoller.py .s [ 83%] ipykernel/tests/test_pickleutil.py ..... [ 86%] ipykernel/tests/test_start_kernel.py .. [ 87%] ipykernel/tests/test_zmq_shell.py ........ [ 92%] ipykernel/inprocess/tests/test_kernel.py .s..s.. [ 96%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ==================================== ERRORS ==================================== _________________________ ERROR at setup of test_comm __________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> request = >, kwargs = {} func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f061fa0dca0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f061fa0d280> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:143: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:116: in __init__ self._initialize() ipykernel/tests/conftest.py:55: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning =============================== warnings summary =============================== ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 6.38s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.10s call ipykernel/tests/test_kernel.py::test_control_thread_priority 3.02s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.94s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.53s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.49s call ipykernel/tests/test_kernel.py::test_subprocess_print 1.99s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 1.97s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.71s call ipykernel/tests/test_kernel.py::test_message_order 1.47s call ipykernel/tests/test_kernel.py::test_subprocess_error =========================== short test summary info ============================ SKIPPED [1] ipykernel/tests/test_async.py:34: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:34: Requires curio SKIPPED [1] ipykernel/tests/test_eventloop.py:94: MacOS-only SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:317: this test requires matplotlib SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:533: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernelapp.py:51: requires trio SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:58: This test requires matplotlib SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:92: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_comm.py::test_comm - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq n... = 140 passed, 18 skipped, 15 deselected, 1 warning, 1 error in 71.88s (0:01:11) = ```
kloczek commented 1 year ago

After add that unit to --deselect list another errors/fails popped out. Looks like there are some dependencies between units. To diagnose that issue https://github.com/mrbean-bremen/pytest-find-dependencies/ can be used.

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.18.1-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra --deselect ipykernel/tests/test_comm.py::test_comm --deselect ipykernel/tests/test_eventloop.py::test_asyncio_loop --deselect ipykernel/tests/test_eventloop.py::test_enable_gui --deselect ipykernel/tests/test_eventloop.py::test_tk_loop --deselect ipykernel/tests/test_kernel_direct.py::test_comm_info_request --deselect ipykernel/tests/test_kernel_direct.py::test_complete_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_debug_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_execute_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_interrupt_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_kernel_info_request --deselect ipykernel/tests/test_kernel_direct.py::test_direct_shutdown_request --deselect ipykernel/tests/test_kernel_direct.py::test_history_request --deselect ipykernel/tests/test_kernel_direct.py::test_inspect_request --deselect ipykernel/tests/test_kernel_direct.py::test_is_complete_request =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.15, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.18.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.20.2, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 174 items / 16 deselected / 158 selected ipykernel/tests/test_async.py ..ss [ 2%] ipykernel/tests/test_connect.py ..... [ 5%] ipykernel/tests/test_debugger.py ........ [ 10%] ipykernel/tests/test_embed_kernel.py ...F [ 13%] ipykernel/tests/test_eventloop.py s [ 14%] ipykernel/tests/test_heartbeat.py .... [ 17%] ipykernel/tests/test_io.py ..... [ 20%] ipykernel/tests/test_ipkernel_direct.py .................... [ 32%] ipykernel/tests/test_jsonutil.py sssss [ 36%] ipykernel/tests/test_kernel.py .ss..........ss.s.....s [ 50%] ipykernel/tests/test_kernel_direct.py ......... [ 56%] ipykernel/tests/test_kernelapp.py ...s [ 58%] ipykernel/tests/test_kernelspec.py .....F....... [ 67%] ipykernel/tests/test_message_spec.py ....................... [ 81%] ipykernel/tests/test_parentpoller.py .s [ 82%] ipykernel/tests/test_pickleutil.py ..... [ 86%] ipykernel/tests/test_start_kernel.py .. [ 87%] ipykernel/tests/test_zmq_shell.py ........ [ 92%] ipykernel/inprocess/tests/test_kernel.py .s..s.. [ 96%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ==================================== ERRORS ==================================== ___________________ ERROR at setup of test_asyncio_interrupt ___________________ cls = func = . at 0x7f935d9a1e50> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.8/site-packages/_pytest/runner.py:339: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/_pytest/runner.py:260: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.8/site-packages/_pytest/threadexception.py:78: in pytest_runtest_setup yield from thread_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None, None, None]: with catch_threading_exception() as cm: yield if cm.args: thread_name = "" if cm.args.thread is None else cm.args.thread.name msg = f"Exception in thread {thread_name}\n\n" msg += "".join( traceback.format_exception( cm.args.exc_type, cm.args.exc_value, cm.args.exc_traceback, ) ) > warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-16 E E Traceback (most recent call last): E File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.8/threading.py", line 870, in run E self._target(*self._args, **self._kwargs) E File "/home/tkloczko/rpmbuild/BUILD/ipykernel-6.18.1/ipykernel/tests/test_embed_kernel.py", line 209, in trigger_stop E app.io_loop.add_callback(app.io_loop.stop) E AttributeError: 'IPKernelApp' object has no attribute 'io_loop' /usr/lib/python3.8/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning =================================== FAILURES =================================== ____________________________ test_embed_kernel_func ____________________________ def test_embed_kernel_func(): from types import ModuleType module = ModuleType("test") def trigger_stop(): time.sleep(1) app = IPKernelApp.instance() app.io_loop.add_callback(app.io_loop.stop) IPKernelApp.clear_instance() thread = threading.Thread(target=trigger_stop) thread.start() > embed_kernel(module, outstream_class=None) ipykernel/tests/test_embed_kernel.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipykernel/embed.py:38: in embed_kernel app.initialize([]) /usr/lib/python3.8/site-packages/traitlets/config/application.py:110: in inner return method(app, *args, **kwargs) ipykernel/kernelapp.py:683: in initialize self.init_kernel() ipykernel/kernelapp.py:524: in init_kernel shell_stream = ZMQStream(self.shell_socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning ----------------------------- Captured stdout call ----------------------------- NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments. To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use: --existing kernel-830380.json ___________________________ test_install_kernelspec ____________________________ def test_install_kernelspec(): path = tempfile.mkdtemp() try: > InstallIPythonKernelSpecApp.launch_instance(argv=["--prefix", path]) ipykernel/tests/test_kernelspec.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/traitlets/config/application.py:976: in launch_instance app = cls.instance(**kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = , args = () kwargs = {} @classmethod def instance(cls, *args, **kwargs): """Returns a global instance of this class. This method create a new instance if none have previously been created and returns a previously created instance is one already exists. The arguments and keyword arguments passed to this method are passed on to the :meth:`__init__` method of the class upon instantiation. Examples -------- Create a singleton class using instance, and retrieve it:: >>> from traitlets.config.configurable import SingletonConfigurable >>> class Foo(SingletonConfigurable): pass >>> foo = Foo.instance() >>> foo == Foo.instance() True Create a subclass that is retrived using the base class instance:: >>> class Bar(SingletonConfigurable): pass >>> class Bam(Bar): pass >>> bam = Bam.instance() >>> bam == Bar.instance() True """ # Create and save the instance if cls._instance is None: inst = cls(*args, **kwargs) # Now make sure that the instance will also be returned by # parent classes' _instance attribute. for subclass in cls._walk_mro(): subclass._instance = inst if isinstance(cls._instance, cls): return cls._instance else: > raise MultipleInstanceError( "An incompatible sibling of '%s' is already instanciated" " as singleton: %s" % (cls.__name__, type(cls._instance).__name__) ) E traitlets.config.configurable.MultipleInstanceError: An incompatible sibling of 'InstallIPythonKernelSpecApp' is already instanciated as singleton: IPKernelApp /usr/lib/python3.8/site-packages/traitlets/config/configurable.py:560: MultipleInstanceError =============================== warnings summary =============================== ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 6.40s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.25s call ipykernel/tests/test_kernel.py::test_control_thread_priority 3.02s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.95s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.53s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.52s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.21s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 2.09s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 1.70s call ipykernel/tests/test_kernel.py::test_message_order 1.55s setup ipykernel/tests/test_debugger.py::test_rich_inspect_not_at_breakpoint =========================== short test summary info ============================ SKIPPED [1] ipykernel/tests/test_async.py:34: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:34: Requires curio SKIPPED [1] ipykernel/tests/test_eventloop.py:94: MacOS-only SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:317: this test requires matplotlib SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:533: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernelapp.py:51: requires trio SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:58: This test requires matplotlib SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:92: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_eventloop.py::test_asyncio_interrupt - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-16 FAILED ipykernel/tests/test_embed_kernel.py::test_embed_kernel_func - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq n... FAILED ipykernel/tests/test_kernelspec.py::test_install_kernelspec - traitlets.config.configurable.MultipleInstanceError: An incompatible siblin... = 2 failed, 137 passed, 18 skipped, 16 deselected, 1 warning, 1 error in 70.97s (0:01:10) = ```
kloczek commented 1 year ago

Just tested 6.19.1 with updates comm to 0.1.2 and looks looks like comm relates unit is failing Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.19.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.20.2, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 176 items ipykernel/tests/test_async.py ..ss [ 2%] ipykernel/tests/test_comm.py E.. [ 3%] ipykernel/tests/test_connect.py ..... [ 6%] ipykernel/tests/test_debugger.py ........ [ 11%] ipykernel/tests/test_embed_kernel.py .... [ 13%] ipykernel/tests/test_eventloop.py ....s [ 16%] ipykernel/tests/test_heartbeat.py .... [ 18%] ipykernel/tests/test_io.py ..... [ 21%] ipykernel/tests/test_ipkernel_direct.py .................... [ 32%] ipykernel/tests/test_jsonutil.py sssss [ 35%] ipykernel/tests/test_kernel.py .ss..........s..s.....s [ 48%] ipykernel/tests/test_kernel_direct.py ..................... [ 60%] ipykernel/tests/test_kernelapp.py ...s [ 63%] ipykernel/tests/test_kernelspec.py ............. [ 70%] ipykernel/tests/test_message_spec.py ....................... [ 83%] ipykernel/tests/test_parentpoller.py .s [ 84%] ipykernel/tests/test_pickleutil.py ..... [ 87%] ipykernel/tests/test_start_kernel.py .. [ 88%] ipykernel/tests/test_zmq_shell.py ........ [ 93%] ipykernel/inprocess/tests/test_kernel.py ....s.. [ 97%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ==================================== ERRORS ==================================== _________________________ ERROR at setup of test_comm __________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> request = >, kwargs = {} func = setup = ._asyncgen_fixture_wrapper..setup at 0x7fdc4441caf0> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7fdc443a90d0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:148: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:120: in __init__ self._initialize() ipykernel/tests/conftest.py:57: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning =============================== warnings summary =============================== ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 5.89s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.23s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.60s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.54s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.49s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.34s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.29s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 2.10s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 1.82s call ipykernel/tests/test_kernel.py::test_subprocess_error 1.81s call ipykernel/tests/test_kernel.py::test_message_order =========================== short test summary info ============================ SKIPPED [1] ipykernel/tests/test_async.py:38: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:38: Requires curio SKIPPED [1] ipykernel/tests/test_eventloop.py:97: MacOS-only SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:533: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernelapp.py:50: requires trio SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:92: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_comm.py::test_comm - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq n... ======== 159 passed, 16 skipped, 1 warning, 1 error in 76.33s (0:01:16) ======== /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5/test_rmtree_errorhandler_rerai0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5/test_rmtree_errorhandler_reado0 : [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5/test_safe_delete_no_perms0 : [Errno 39] Directory not empty: 'test_safe_delete_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5/test_safe_set_no_perms0 : [Errno 39] Directory not empty: 'test_safe_set_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5/test_safe_get_no_perms0 : [Errno 39] Directory not empty: 'test_safe_get_no_perms0' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-1fce6b8b-f94b-48a4-a45e-8deb0d0205e5' warnings.warn( /usr/lib/python3.8/site-packages/_pytest/pathlib.py:79: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-bbbd68fd-a8e5-407e-8e15-01dc72db9bf3 : [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-bbbd68fd-a8e5-407e-8e15-01dc72db9bf3' warnings.warn( ```
kloczek commented 1 year ago

After --deselect that unit more opped out.

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.19.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.19.1-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra --deselect ipykernel/tests/test_comm.py::test_comm =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.20.2, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 176 items / 3 deselected / 173 selected ipykernel/tests/test_async.py ..ss [ 2%] ipykernel/tests/test_connect.py ..... [ 5%] ipykernel/tests/test_debugger.py ........ [ 9%] ipykernel/tests/test_embed_kernel.py ...F [ 12%] ipykernel/tests/test_eventloop.py ...s [ 15%] ipykernel/tests/test_heartbeat.py .... [ 17%] ipykernel/tests/test_io.py ..... [ 20%] ipykernel/tests/test_ipkernel_direct.py .................... [ 31%] ipykernel/tests/test_jsonutil.py sssss [ 34%] ipykernel/tests/test_kernel.py .ss..........s..s.....s [ 47%] ipykernel/tests/test_kernel_direct.py ..................... [ 60%] ipykernel/tests/test_kernelapp.py ...s [ 62%] ipykernel/tests/test_kernelspec.py .....F....... [ 69%] ipykernel/tests/test_message_spec.py ....................... [ 83%] ipykernel/tests/test_parentpoller.py .s [ 84%] ipykernel/tests/test_pickleutil.py ..... [ 87%] ipykernel/tests/test_start_kernel.py .. [ 88%] ipykernel/tests/test_zmq_shell.py ........ [ 93%] ipykernel/inprocess/tests/test_kernel.py ....s.. [ 97%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ==================================== ERRORS ==================================== ___________________ ERROR at setup of test_asyncio_interrupt ___________________ cls = func = . at 0x7f7148492280> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: "Callable[[], TResult]", when: "Literal['collect', 'setup', 'call', 'teardown']", reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() /usr/lib/python3.8/site-packages/_pytest/runner.py:339: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/_pytest/runner.py:260: in lambda: ihook(item=item, **kwds), when=when, reraise=reraise /usr/lib/python3.8/site-packages/pluggy/_hooks.py:265: in __call__ return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult) /usr/lib/python3.8/site-packages/pluggy/_manager.py:80: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) /usr/lib/python3.8/site-packages/_pytest/threadexception.py:78: in pytest_runtest_setup yield from thread_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def thread_exception_runtest_hook() -> Generator[None, None, None]: with catch_threading_exception() as cm: yield if cm.args: thread_name = "" if cm.args.thread is None else cm.args.thread.name msg = f"Exception in thread {thread_name}\n\n" msg += "".join( traceback.format_exception( cm.args.exc_type, cm.args.exc_value, cm.args.exc_traceback, ) ) > warnings.warn(pytest.PytestUnhandledThreadExceptionWarning(msg)) E pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-16 E E Traceback (most recent call last): E File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner E self.run() E File "/usr/lib64/python3.8/threading.py", line 870, in run E self._target(*self._args, **self._kwargs) E File "/home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1/ipykernel/tests/test_embed_kernel.py", line 209, in trigger_stop E app.io_loop.add_callback(app.io_loop.stop) E AttributeError: 'IPKernelApp' object has no attribute 'io_loop' /usr/lib/python3.8/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning =================================== FAILURES =================================== ____________________________ test_embed_kernel_func ____________________________ def test_embed_kernel_func(): from types import ModuleType module = ModuleType("test") def trigger_stop(): time.sleep(1) app = IPKernelApp.instance() app.io_loop.add_callback(app.io_loop.stop) IPKernelApp.clear_instance() thread = threading.Thread(target=trigger_stop) thread.start() > embed_kernel(module, outstream_class=None) ipykernel/tests/test_embed_kernel.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipykernel/embed.py:39: in embed_kernel app.initialize([]) /usr/lib/python3.8/site-packages/traitlets/config/application.py:110: in inner return method(app, *args, **kwargs) ipykernel/kernelapp.py:680: in initialize self.init_kernel() ipykernel/kernelapp.py:524: in init_kernel shell_stream = ZMQStream(self.shell_socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning ----------------------------- Captured stdout call ----------------------------- NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments. To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use: --existing kernel-3381039.json ___________________________ test_install_kernelspec ____________________________ def test_install_kernelspec(): path = tempfile.mkdtemp() try: > InstallIPythonKernelSpecApp.launch_instance(argv=["--prefix", path]) ipykernel/tests/test_kernelspec.py:82: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/traitlets/config/application.py:976: in launch_instance app = cls.instance(**kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = , args = () kwargs = {} @classmethod def instance(cls, *args, **kwargs): """Returns a global instance of this class. This method create a new instance if none have previously been created and returns a previously created instance is one already exists. The arguments and keyword arguments passed to this method are passed on to the :meth:`__init__` method of the class upon instantiation. Examples -------- Create a singleton class using instance, and retrieve it:: >>> from traitlets.config.configurable import SingletonConfigurable >>> class Foo(SingletonConfigurable): pass >>> foo = Foo.instance() >>> foo == Foo.instance() True Create a subclass that is retrived using the base class instance:: >>> class Bar(SingletonConfigurable): pass >>> class Bam(Bar): pass >>> bam = Bam.instance() >>> bam == Bar.instance() True """ # Create and save the instance if cls._instance is None: inst = cls(*args, **kwargs) # Now make sure that the instance will also be returned by # parent classes' _instance attribute. for subclass in cls._walk_mro(): subclass._instance = inst if isinstance(cls._instance, cls): return cls._instance else: > raise MultipleInstanceError( "An incompatible sibling of '%s' is already instanciated" " as singleton: %s" % (cls.__name__, type(cls._instance).__name__) ) E traitlets.config.configurable.MultipleInstanceError: An incompatible sibling of 'InstallIPythonKernelSpecApp' is already instanciated as singleton: IPKernelApp /usr/lib/python3.8/site-packages/traitlets/config/configurable.py:560: MultipleInstanceError =============================== warnings summary =============================== ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 5.90s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.15s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.66s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.52s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.44s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.24s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.11s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.02s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.78s call ipykernel/tests/test_kernel.py::test_message_order 1.58s call ipykernel/tests/test_kernel.py::test_subprocess_error =========================== short test summary info ============================ SKIPPED [1] ipykernel/tests/test_async.py:38: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:38: Requires curio SKIPPED [1] ipykernel/tests/test_eventloop.py:97: MacOS-only SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:533: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernelapp.py:50: requires trio SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:92: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_eventloop.py::test_asyncio_interrupt - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-16 FAILED ipykernel/tests/test_embed_kernel.py::test_embed_kernel_func - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq n... FAILED ipykernel/tests/test_kernelspec.py::test_install_kernelspec - traitlets.config.configurable.MultipleInstanceError: An incompatible siblin... = 2 failed, 154 passed, 16 skipped, 3 deselected, 1 warning, 1 error in 72.90s (0:01:12) = ```

Aother prove that there are some dependencies between units.

kloczek commented 1 year ago

Here is result of runing pytest --find-dependencies with installed pytest-find-dependencies

```console + /usr/bin/pytest -ra --find-dependencies Running pytest with arguments --find-dependencies-internal -raXs --durations 10 --color=yes --doctest-modules --ignore=ipykernel/pylab/backend_inline.py --ignore=ipykernel/pylab/config.py --ignore=ipykernel/gui/gtk3embed.py --ignore=ipykernel/gui/gtkembed.py --ignore=ipykernel/datapub.py --ignore=ipykernel/log.py --ignore=ipykernel/pickleutil.py --ignore=ipykernel/serialize.py --ignore=ipykernel/_eventloop_macos.py -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: find-dependencies-0.5.2, timeout-2.1.0, asyncio-0.20.2, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False asyncio: mode=auto collected 176 items ipykernel/tests/test_async.py ..ss [ 2%] ipykernel/tests/test_comm.py E.. [ 3%] ipykernel/tests/test_connect.py ..... [ 6%] ipykernel/tests/test_debugger.py ........ [ 11%] ipykernel/tests/test_embed_kernel.py .... [ 13%] ipykernel/tests/test_eventloop.py ....s [ 16%] ipykernel/tests/test_heartbeat.py .... [ 18%] ipykernel/tests/test_io.py ..... [ 21%] ipykernel/tests/test_ipkernel_direct.py .................... [ 32%] ipykernel/tests/test_jsonutil.py sssss [ 35%] ipykernel/tests/test_kernel.py .ss..........s..s.....s [ 48%] ipykernel/tests/test_kernel_direct.py ..................... [ 60%] ipykernel/tests/test_kernelapp.py ...s [ 63%] ipykernel/tests/test_kernelspec.py ............. [ 70%] ipykernel/tests/test_message_spec.py ....................... [ 83%] ipykernel/tests/test_parentpoller.py .s [ 84%] ipykernel/tests/test_pickleutil.py ..... [ 87%] ipykernel/tests/test_start_kernel.py .. [ 88%] ipykernel/tests/test_zmq_shell.py ........ [ 93%] ipykernel/inprocess/tests/test_kernel.py ....s.. [ 97%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] ==================================== ERRORS ==================================== _________________________ ERROR at setup of test_comm __________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> request = >, kwargs = {} func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f5144788310> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f5144788670> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:148: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:120: in __init__ self._initialize() ipykernel/tests/conftest.py:57: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 5.90s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.12s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.78s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.53s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.32s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.31s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.28s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.05s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.74s call ipykernel/tests/test_kernel.py::test_message_order 1.64s call ipykernel/tests/test_kernel.py::test_subprocess_error =========================== short test summary info ============================ SKIPPED [1] ipykernel/tests/test_async.py:38: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:38: Requires curio SKIPPED [1] ipykernel/tests/test_eventloop.py:97: MacOS-only SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:533: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernelapp.py:50: requires trio SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:92: Currently don't capture during test as pytest does its own capturing ERROR ipykernel/tests/test_comm.py::test_comm - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq n... !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! ============= 159 passed, 16 skipped, 1 error in 74.93s (0:01:14) ============== Running pytest with arguments --find-dependencies-internal -raXs --durations 10 --color=yes --doctest-modules --ignore=ipykernel/pylab/backend_inline.py --ignore=ipykernel/pylab/config.py --ignore=ipykernel/gui/gtk3embed.py --ignore=ipykernel/gui/gtkembed.py --ignore=ipykernel/datapub.py --ignore=ipykernel/log.py --ignore=ipykernel/pickleutil.py --ignore=ipykernel/serialize.py --ignore=ipykernel/_eventloop_macos.py -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: find-dependencies-0.5.2, timeout-2.1.0, asyncio-0.20.2, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False asyncio: mode=auto collected 176 items ipykernel/inprocess/tests/test_kernelmanager.py ..... [ 2%] ipykernel/inprocess/tests/test_kernel.py ..s.... [ 6%] ipykernel/tests/test_zmq_shell.py E....... [ 11%] ipykernel/tests/test_start_kernel.py .. [ 12%] ipykernel/tests/test_pickleutil.py ..... [ 15%] ipykernel/tests/test_parentpoller.py s. [ 16%] ipykernel/tests/test_message_spec.py ....................... [ 29%] ipykernel/tests/test_kernelspec.py ............. [ 36%] ipykernel/tests/test_kernelapp.py s... [ 39%] ipykernel/tests/test_kernel_direct.py ..................... [ 51%] ipykernel/tests/test_kernel.py s.....s..s..........ss. [ 64%] ipykernel/tests/test_jsonutil.py sssss [ 67%] ipykernel/tests/test_ipkernel_direct.py .................... [ 78%] ipykernel/tests/test_io.py ..... [ 81%] ipykernel/tests/test_heartbeat.py .... [ 83%] ipykernel/tests/test_eventloop.py s.... [ 86%] ipykernel/tests/test_embed_kernel.py F... [ 88%] ipykernel/tests/test_debugger.py ........ [ 93%] ipykernel/tests/test_connect.py ..... [ 96%] ipykernel/tests/test_comm.py ... [ 97%] ipykernel/tests/test_async.py ss.. [100%] ==================================== ERRORS ==================================== _________________ ERROR at setup of test_zmq_interactive_shell _________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False> request = > kwargs = {}, func = setup = ._asyncgen_fixture_wrapper..setup at 0x7f510088a820> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f510088a4c0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:148: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:120: in __init__ self._initialize() ipykernel/tests/conftest.py:57: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning =================================== FAILURES =================================== ____________________________ test_embed_kernel_func ____________________________ def test_embed_kernel_func(): from types import ModuleType module = ModuleType("test") def trigger_stop(): time.sleep(1) app = IPKernelApp.instance() app.io_loop.add_callback(app.io_loop.stop) IPKernelApp.clear_instance() thread = threading.Thread(target=trigger_stop) thread.start() > embed_kernel(module, outstream_class=None) ipykernel/tests/test_embed_kernel.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipykernel/embed.py:36: in embed_kernel app = IPKernelApp.instance() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ cls = , args = (), kwargs = {} @classmethod def instance(cls, *args, **kwargs): """Returns a global instance of this class. This method create a new instance if none have previously been created and returns a previously created instance is one already exists. The arguments and keyword arguments passed to this method are passed on to the :meth:`__init__` method of the class upon instantiation. Examples -------- Create a singleton class using instance, and retrieve it:: >>> from traitlets.config.configurable import SingletonConfigurable >>> class Foo(SingletonConfigurable): pass >>> foo = Foo.instance() >>> foo == Foo.instance() True Create a subclass that is retrived using the base class instance:: >>> class Bar(SingletonConfigurable): pass >>> class Bam(Bar): pass >>> bam = Bam.instance() >>> bam == Bar.instance() True """ # Create and save the instance if cls._instance is None: inst = cls(*args, **kwargs) # Now make sure that the instance will also be returned by # parent classes' _instance attribute. for subclass in cls._walk_mro(): subclass._instance = inst if isinstance(cls._instance, cls): return cls._instance else: > raise MultipleInstanceError( "An incompatible sibling of '%s' is already instanciated" " as singleton: %s" % (cls.__name__, type(cls._instance).__name__) ) E traitlets.config.configurable.MultipleInstanceError: An incompatible sibling of 'IPKernelApp' is already instanciated as singleton: InstallIPythonKernelSpecApp /usr/lib/python3.8/site-packages/traitlets/config/configurable.py:560: MultipleInstanceError ===Flaky Test Report=== test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant failed (2 runs remaining out of 3). Exception in thread Thread-18 Traceback (most recent call last): File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib64/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1/ipykernel/tests/test_embed_kernel.py", line 208, in trigger_stop app = IPKernelApp.instance() File "/usr/lib/python3.8/site-packages/traitlets/config/configurable.py", line 560, in instance raise MultipleInstanceError( traitlets.config.configurable.MultipleInstanceError: An incompatible sibling of 'IPKernelApp' is already instanciated as singleton: InstallIPythonKernelSpecApp [, , , , , ] test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_basic passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 5.91s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.11s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.78s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.55s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.31s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.30s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.28s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.02s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.82s call ipykernel/tests/test_kernel.py::test_message_order 1.72s call ipykernel/tests/test_kernel.py::test_subprocess_error =========================== short test summary info ============================ SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:92: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/tests/test_kernelapp.py:50: requires trio SKIPPED [1] ipykernel/tests/test_kernel.py:533: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernel.py:348: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:289: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_jsonutil.py:115: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:104: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:98: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:71: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_eventloop.py:97: MacOS-only SKIPPED [1] ipykernel/tests/test_async.py:38: Requires curio SKIPPED [1] ipykernel/tests/test_async.py:38: Requires trio ERROR ipykernel/tests/test_zmq_shell.py::test_zmq_interactive_shell - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq n... FAILED ipykernel/tests/test_embed_kernel.py::test_embed_kernel_func - traitlets.config.configurable.MultipleInstanceError: An incompatible siblin... !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!! ======== 1 failed, 158 passed, 16 skipped, 1 error in 75.84s (0:01:15) ========= Running pytest with arguments --find-dependencies-internal -raXs --durations 10 --color=yes --doctest-modules --ignore=ipykernel/pylab/backend_inline.py --ignore=ipykernel/pylab/config.py --ignore=ipykernel/gui/gtk3embed.py --ignore=ipykernel/gui/gtkembed.py --ignore=ipykernel/datapub.py --ignore=ipykernel/log.py --ignore=ipykernel/pickleutil.py --ignore=ipykernel/serialize.py --ignore=ipykernel/_eventloop_macos.py -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: find-dependencies-0.5.2, timeout-2.1.0, asyncio-0.20.2, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False asyncio: mode=auto collected 176 items ipykernel/tests/test_async.py .. [ 1%] ipykernel/tests/test_comm.py E ================================================================================== ERRORS ================================================================================== _______________________________________________________________________ ERROR at setup of test_comm ________________________________________________________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = >, kwargs = {} func = , setup = ._asyncgen_fixture_wrapper..setup at 0x7f5144787700> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f51447878b0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:148: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:120: in __init__ self._initialize() ipykernel/tests/conftest.py:57: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning =========================================================================== slowest 10 durations =========================================================================== 5.89s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 1.10s setup ipykernel/tests/test_async.py::test_async_await 1.08s setup ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 0.35s call ipykernel/tests/test_async.py::test_async_await 0.14s teardown ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 0.12s teardown ipykernel/tests/test_async.py::test_async_await 0.01s setup ipykernel/tests/test_comm.py::test_comm (1 durations < 0.005s hidden. Use -vv to show these durations.) ========================================================================= short test summary info ========================================================================== ERROR ipykernel/tests/test_comm.py::test_comm - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ======================================================================== 2 passed, 1 error in 9.06s ======================================================================== Running pytest with arguments --find-dependencies-internal -raXs --durations 10 --color=yes --doctest-modules --ignore=ipykernel/pylab/backend_inline.py --ignore=ipykernel/pylab/config.py --ignore=ipykernel/gui/gtk3embed.py --ignore=ipykernel/gui/gtkembed.py --ignore=ipykernel/datapub.py --ignore=ipykernel/log.py --ignore=ipykernel/pickleutil.py --ignore=ipykernel/serialize.py --ignore=ipykernel/_eventloop_macos.py -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: find-dependencies-0.5.2, timeout-2.1.0, asyncio-0.20.2, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False asyncio: mode=auto collected 176 items ipykernel/tests/test_async.py . [ 0%] ipykernel/tests/test_comm.py E ================================================================================== ERRORS ================================================================================== _______________________________________________________________________ ERROR at setup of test_comm ________________________________________________________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = >, kwargs = {} func = , setup = ._asyncgen_fixture_wrapper..setup at 0x7f5144788040> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f51447880d0> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.8/site-packages/nest_asyncio.py:90: in run_until_complete return f.result() /usr/lib64/python3.8/asyncio/futures.py:178: in result raise self._exception /usr/lib64/python3.8/asyncio/tasks.py:280: in __step result = coro.send(None) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:148: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:120: in __init__ self._initialize() ipykernel/tests/conftest.py:57: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning =========================================================================== slowest 10 durations =========================================================================== 1.09s setup ipykernel/tests/test_async.py::test_async_await 0.34s call ipykernel/tests/test_async.py::test_async_await 0.12s teardown ipykernel/tests/test_async.py::test_async_await 0.01s setup ipykernel/tests/test_comm.py::test_comm (1 durations < 0.005s hidden. Use -vv to show these durations.) ========================================================================= short test summary info ========================================================================== ERROR ipykernel/tests/test_comm.py::test_comm - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ======================================================================== 1 passed, 1 error in 1.93s ======================================================================== Running pytest with arguments --find-dependencies-internal -raXs --durations 10 --color=yes --doctest-modules --ignore=ipykernel/pylab/backend_inline.py --ignore=ipykernel/pylab/config.py --ignore=ipykernel/gui/gtk3embed.py --ignore=ipykernel/gui/gtkembed.py --ignore=ipykernel/datapub.py --ignore=ipykernel/log.py --ignore=ipykernel/pickleutil.py --ignore=ipykernel/serialize.py --ignore=ipykernel/_eventloop_macos.py -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: find-dependencies-0.5.2, timeout-2.1.0, asyncio-0.20.2, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False asyncio: mode=auto collected 176 items ipykernel/tests/test_embed_kernel.py F ================================================================================= FAILURES ================================================================================= __________________________________________________________________________ test_embed_kernel_func __________________________________________________________________________ def test_embed_kernel_func(): from types import ModuleType module = ModuleType("test") def trigger_stop(): time.sleep(1) app = IPKernelApp.instance() app.io_loop.add_callback(app.io_loop.stop) IPKernelApp.clear_instance() thread = threading.Thread(target=trigger_stop) thread.start() > embed_kernel(module, outstream_class=None) ipykernel/tests/test_embed_kernel.py:215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ipykernel/embed.py:39: in embed_kernel app.initialize([]) /usr/lib/python3.8/site-packages/traitlets/config/application.py:110: in inner return method(app, *args, **kwargs) ipykernel/kernelapp.py:680: in initialize self.init_kernel() ipykernel/kernelapp.py:524: in init_kernel shell_stream = ZMQStream(self.shell_socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning --------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------- NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments. To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use: --existing kernel-3391125.json =========================================================================== slowest 10 durations =========================================================================== 0.03s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_func (2 durations < 0.005s hidden. Use -vv to show these durations.) ========================================================================= short test summary info ========================================================================== FAILED ipykernel/tests/test_embed_kernel.py::test_embed_kernel_func - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============================================================================ 1 failed in 0.39s ============================================================================= Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib64/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/lib64/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1/ipykernel/tests/test_embed_kernel.py", line 209, in trigger_stop app.io_loop.add_callback(app.io_loop.stop) AttributeError: 'IPKernelApp' object has no attribute 'io_loop' Running pytest with arguments --find-dependencies-internal -raXs --durations 10 --color=yes --doctest-modules --ignore=ipykernel/pylab/backend_inline.py --ignore=ipykernel/pylab/config.py --ignore=ipykernel/gui/gtk3embed.py --ignore=ipykernel/gui/gtkembed.py --ignore=ipykernel/datapub.py --ignore=ipykernel/log.py --ignore=ipykernel/pickleutil.py --ignore=ipykernel/serialize.py --ignore=ipykernel/_eventloop_macos.py -ra =========================================================================== test session starts ============================================================================ platform linux -- Python 3.8.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.19.1, configfile: pyproject.toml, testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: find-dependencies-0.5.2, timeout-2.1.0, asyncio-0.20.2, flaky-3.7.0 timeout: 300.0s timeout method: signal timeout func_only: False asyncio: mode=auto collected 176 items ipykernel/tests/test_zmq_shell.py E ================================================================================== ERRORS ================================================================================== _______________________________________________________________ ERROR at setup of test_zmq_interactive_shell _______________________________________________________________ event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>, request = >, kwargs = {} func = , setup = ._asyncgen_fixture_wrapper..setup at 0x7f514892e280> finalizer = ._asyncgen_fixture_wrapper..finalizer at 0x7f514892ee50> @functools.wraps(fixture) def _asyncgen_fixture_wrapper( event_loop: asyncio.AbstractEventLoop, request: SubRequest, **kwargs: Any ): func = _perhaps_rebind_fixture_func( fixture, request.instance, fixturedef.unittest ) gen_obj = func(**_add_kwargs(func, kwargs, event_loop, request)) async def setup(): res = await gen_obj.__anext__() return res def finalizer() -> None: """Yield again, to finalize.""" async def async_finalizer() -> None: try: await gen_obj.__anext__() except StopAsyncIteration: pass else: msg = "Async generator fixture didn't stop." msg += "Yield only once." raise ValueError(msg) event_loop.run_until_complete(async_finalizer()) > result = event_loop.run_until_complete(setup()) /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:301: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.8/asyncio/base_events.py:616: in run_until_complete return future.result() /usr/lib/python3.8/site-packages/pytest_asyncio/plugin.py:283: in setup res = await gen_obj.__anext__() ipykernel/tests/conftest.py:148: in kernel kernel = MockKernel() ipykernel/tests/conftest.py:120: in __init__ self._initialize() ipykernel/tests/conftest.py:57: in _initialize stream = ZMQStream(socket) /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:107: in __init__ self.io_loop = io_loop or IOLoop.current() /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:126: in current _deprecated() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _deprecated(): if _deprecated.called: # type: ignore return _deprecated.called = True # type: ignore > warnings.warn( "zmq.eventloop.ioloop is deprecated in pyzmq 17." " pyzmq now works with default tornado and asyncio eventloops.", DeprecationWarning, stacklevel=3, ) E DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. /usr/lib64/python3.8/site-packages/zmq/eventloop/ioloop.py:74: DeprecationWarning =========================================================================== slowest 10 durations =========================================================================== (2 durations < 0.005s hidden. Use -vv to show these durations.) ========================================================================= short test summary info ========================================================================== ERROR ipykernel/tests/test_zmq_shell.py::test_zmq_interactive_shell - DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============================================================================= 1 error in 0.38s ============================================================================= ============================== Results =============================== Run dependency analysis for 176 tests. Executed 359 tests in 6 test runs. Tests failing permanently after all tests have run: ipykernel/tests/test_embed_kernel.py::test_embed_kernel_func ipykernel/tests/test_zmq_shell.py::test_zmq_interactive_shell Dependent tests: ipykernel/tests/test_comm.py::test_comm depends on ipykernel/tests/test_async.py::test_async_await Dependency test FAILED ====================================================================== ============================================================================= warnings summary ============================================================================= ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:27 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:27: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ```
kloczek commented 1 year ago

Just tested 6.25.2 and looks like pytest is no longer failing. because I see only few warnings I'm leaving you decision about close or not this ticket. Nevertheless .. thank you 👍 😄 Here is pytest output:

```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.25.2-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-ipykernel-6.25.2-2.fc35.x86_64/usr/lib/python3.8/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.8.18, pytest-7.4.1, pluggy-1.3.0 rootdir: /home/tkloczko/rpmbuild/BUILD/ipykernel-6.25.2 configfile: pyproject.toml testpaths: ipykernel/tests, ipykernel/inprocess/tests plugins: asyncio-0.21.1, timeout-2.1.0, flaky-3.7.0 asyncio: mode=auto timeout: 300.0s timeout method: signal timeout func_only: False collected 180 items ipykernel/tests/test_async.py ..ss [ 2%] ipykernel/tests/test_comm.py ... [ 3%] ipykernel/tests/test_connect.py ..... [ 6%] ipykernel/tests/test_debugger.py ......... [ 11%] ipykernel/tests/test_embed_kernel.py ...NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments. To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use: --existing kernel-2488795.json . [ 13%] ipykernel/tests/test_eventloop.py ....ss [ 17%] ipykernel/tests/test_heartbeat.py .... [ 19%] ipykernel/tests/test_io.py ....... [ 23%] ipykernel/tests/test_ipkernel_direct.py .................... [ 34%] ipykernel/tests/test_jsonutil.py sssss [ 37%] ipykernel/tests/test_kernel.py .ss..........s..s.....s [ 50%] ipykernel/tests/test_kernel_direct.py .................... [ 61%] ipykernel/tests/test_kernelapp.py ....s [ 63%] ipykernel/tests/test_kernelspec.py ............. [ 71%] ipykernel/tests/test_message_spec.py ....................... [ 83%] ipykernel/tests/test_parentpoller.py .s [ 85%] ipykernel/tests/test_pickleutil.py ..... [ 87%] ipykernel/tests/test_start_kernel.py .. [ 88%] ipykernel/tests/test_zmq_shell.py ........ [ 93%] ipykernel/inprocess/tests/test_kernel.py ....s.. [ 97%] ipykernel/inprocess/tests/test_kernelmanager.py ..... [100%] =============================== warnings summary =============================== ../../../../../usr/lib/python3.8/site-packages/jupyter_client/connect.py:20 /usr/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===Flaky Test Report=== test_embed_kernel_basic passed 1 out of the required 1 times. Success! test_embed_kernel_namespace passed 1 out of the required 1 times. Success! test_embed_kernel_reentrant passed 1 out of the required 1 times. Success! test_subprocess_print passed 1 out of the required 1 times. Success! test_subprocess_noprint passed 1 out of the required 1 times. Success! test_subprocess_error passed 1 out of the required 1 times. Success! test_ipython_start_kernel_userns passed 1 out of the required 1 times. Success! test_ipython_start_kernel_no_userns passed 1 out of the required 1 times. Success! test_interface passed 1 out of the required 1 times. Success! ===End Flaky Test Report=== ============================= slowest 10 durations ============================= 6.08s call ipykernel/tests/test_async.py::test_async_interrupt[asyncio] 3.13s call ipykernel/tests/test_kernel.py::test_control_thread_priority 2.84s call ipykernel/tests/test_kernel.py::test_interrupt_with_message 2.63s call ipykernel/tests/test_kernel.py::test_interrupt_during_input 2.59s call ipykernel/tests/test_message_spec.py::test_execute_stop_on_error 2.58s call ipykernel/tests/test_kernel.py::test_subprocess_print 2.29s call ipykernel/tests/test_embed_kernel.py::test_embed_kernel_reentrant 2.01s call ipykernel/tests/test_kernel.py::test_interrupt_during_pdb_set_trace 1.80s call ipykernel/tests/test_kernel.py::test_message_order 1.77s call ipykernel/tests/test_io.py::test_echo_watch =========================== short test summary info ============================ SKIPPED [1] ipykernel/tests/test_async.py:38: Requires trio SKIPPED [1] ipykernel/tests/test_async.py:38: Requires curio SKIPPED [1] ipykernel/tests/test_eventloop.py:123: MacOS-only SKIPPED [1] ipykernel/tests/test_eventloop.py:128: No viable version of PyQt or PySide installed. SKIPPED [1] ipykernel/tests/test_jsonutil.py:36: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:72: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:99: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:105: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_jsonutil.py:116: json_clean is a no-op SKIPPED [1] ipykernel/tests/test_kernel.py:61: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:73: Currently don't capture during test as pytest does its own capturing SKIPPED [1] ipykernel/tests/test_kernel.py:286: only run on Windows SKIPPED [1] ipykernel/tests/test_kernel.py:345: test only on windows SKIPPED [1] ipykernel/tests/test_kernel.py:529: Stalls on linux SKIPPED [1] ipykernel/tests/test_kernelapp.py:121: requires trio SKIPPED [1] ipykernel/tests/test_parentpoller.py:29: only works on windows SKIPPED [1] ipykernel/inprocess/tests/test_kernel.py:91: Currently don't capture during test as pytest does its own capturing ============ 163 passed, 17 skipped, 1 warning in 80.08s (0:01:20) ============= ```