Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

8.5.0: pytest is failing in two units #988

Open
kloczek opened this issue Oct 25, 2023 · 10 comments
Open

8.5.0: pytest is failing in two units #988

kloczek opened this issue Oct 25, 2023 · 10 comments

Comments

@kloczek
Copy link

kloczek commented Oct 25, 2023

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.

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

8.4.0 in the same build env is OK.
Here is pytest output:

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.5.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.5.0-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.2, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.5.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: asyncio-0.21.1, timeout-2.2.0
asyncio: mode=strict
timeout: 100.0s
timeout method: thread
timeout func_only: False
collected 226 items

tests/test_adapter.py ...........................                        [ 11%]
tests/test_client.py .....................s......                        [ 24%]
tests/test_connect.py ...............                                    [ 30%]
tests/test_consoleapp.py ...                                             [ 32%]
tests/test_jsonutil.py ..........                                        [ 36%]
tests/test_kernelapp.py .                                                [ 37%]
tests/test_kernelmanager.py .....................s.s.s............       [ 53%]
tests/test_kernelspec.py .............                                   [ 59%]
tests/test_kernelspecapp.py ...                                          [ 61%]
tests/test_localinterfaces.py .                                          [ 61%]
tests/test_manager.py .                                                  [ 61%]
tests/test_multikernelmanager.py ...s.....F......................        [ 76%]
tests/test_provisioning.py ...........                                   [ 80%]
tests/test_public_api.py ....                                            [ 82%]
tests/test_restarter.py ........                                         [ 86%]
tests/test_session.py .............................                      [ 99%]
tests/test_ssh.py ..                                                     [100%]

=================================== FAILURES ===================================
_______________________ TestKernelManager.test_tcp_cinfo _______________________

self = <tests.test_multikernelmanager.TestKernelManager testMethod=test_tcp_cinfo>

    def test_tcp_cinfo(self):
        km = self._get_tcp_km()
>       self._run_cinfo(km, "tcp", localhost())

km         = <jupyter_client.multikernelmanager.MultiKernelManager object at 0x7f44d4ea5f10>
self       = <tests.test_multikernelmanager.TestKernelManager testMethod=test_tcp_cinfo>

/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.5.0/tests/test_multikernelmanager.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.5.0/tests/test_multikernelmanager.py:95: in _run_cinfo
    stream = km.connect_iopub(kid)
        cinfo      = {'control_port': 37483, 'hb_port': 43737, 'iopub_port': 43925, 'ip': '127.0.0.1', ...}
        ip         = '127.0.0.1'
        kid        = '8a278c06-5ef9-4374-8ded-98b00991754d'
        km         = <jupyter_client.multikernelmanager.MultiKernelManager object at 0x7f44d4ea5f10>
        self       = <tests.test_multikernelmanager.TestKernelManager testMethod=test_tcp_cinfo>
        transport  = 'tcp'
/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.5.0/jupyter_client/multikernelmanager.py:41: in wrapped
    r = method(*args, **kwargs)
        args       = ()
        f          = <function MultiKernelManager.connect_iopub at 0x7f44d6b89550>
        kernel_id  = '8a278c06-5ef9-4374-8ded-98b00991754d'
        km         = <jupyter_client.ioloop.manager.IOLoopKernelManager object at 0x7f44d4ea5460>
        kwargs     = {}
        method     = <bound method as_zmqstream.<locals>.wrapped of <jupyter_client.ioloop.manager.IOLoopKernelManager object at 0x7f44d4ea5460>>
        self       = <jupyter_client.multikernelmanager.MultiKernelManager object at 0x7f44d4ea5f10>
/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.5.0/jupyter_client/ioloop/manager.py:30: in wrapped
    return ZMQStream(socket, self.loop)
        args       = ()
        f          = <function ConnectionFileMixin.connect_iopub at 0x7f44d6ad6f70>
        kwargs     = {}
        save_socket_class = None
        self       = <jupyter_client.ioloop.manager.IOLoopKernelManager object at 0x7f44d4ea5460>
        socket     = <zmq.Socket(zmq.SUB) at 0x7f44d4e7b100>
/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:148: in __init__
    self._init_io_state()
        io_loop    = <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f44d4e71fa0>
        self       = <zmq.eventloop.zmqstream.ZMQStream object at 0x7f44d4ea5f70>
        socket     = <zmq.Socket(zmq.SUB) at 0x7f44d4e7b100>
/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:722: in _init_io_state
    self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)
        self       = <zmq.eventloop.zmqstream.ZMQStream object at 0x7f44d4ea5f70>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f44d4e71fa0>
fd = 104
handler = <bound method ZMQStream._handle_events of <zmq.eventloop.zmqstream.ZMQStream object at 0x7f44d4ea5f70>>
events = 1

    def add_handler(
        self, fd: Union[int, _Selectable], handler: Callable[..., None], events: int
    ) -> None:
        fd, fileobj = self.split_fd(fd)
        if fd in self.handlers:
>           raise ValueError("fd %s added twice" % fd)
E           ValueError: fd 104 added twice

events     = 1
fd         = 104
fileobj    = <zmq.Socket(zmq.SUB) at 0x7f44d4e7b100>
handler    = <bound method ZMQStream._handle_events of <zmq.eventloop.zmqstream.ZMQStream object at 0x7f44d4ea5f70>>
self       = <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f44d4e71fa0>

/usr/lib64/python3.8/site-packages/tornado/platform/asyncio.py:150: ValueError
------------------------------ Captured log call -------------------------------
ERROR    asyncio:base_events.py:1707 Exception in callback BaseAsyncIOLoop._handle_events(104, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(104, 1)>
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 614, in _handle_events
    zmq_events = self.socket.EVENTS
  File "/usr/lib64/python3.8/site-packages/zmq/sugar/attrsettr.py", line 55, in __getattr__
    return self._get_attr_opt(upper_key, opt)
  File "/usr/lib64/python3.8/site-packages/zmq/sugar/attrsettr.py", line 67, in _get_attr_opt
    return self.get(opt)
  File "zmq/backend/cython/socket.pyx", line 478, in zmq.backend.cython.socket.Socket.get
  File "zmq/backend/cython/socket.pyx", line 138, in zmq.backend.cython.socket._check_closed
zmq.error.ZMQError: Socket operation on non-socket

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib64/python3.8/site-packages/tornado/platform/asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 624, in _handle_events
    if self.closed():
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 576, in closed
    self.close()
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 547, in close
    warnings.warn(
UserWarning: Unregistering FD 104 after closing socket. This could result in unregistering handlers for the wrong socket. Please use stream.close() instead of closing the socket directly.
============================= slowest 10 durations =============================
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.10s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.05s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
17.98s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
16.63s call     tests/test_restarter.py::test_restart_check[tcp]
14.10s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
13.63s call     tests/test_restarter.py::test_restart_check[ipc]
12.43s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
12.33s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
9.04s call     tests/test_restarter.py::test_async_restart_check[tcp]
=========================== short test summary info ============================
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
FAILED tests/test_multikernelmanager.py::TestKernelManager::test_tcp_cinfo - ValueError: fd 104 added twice
============= 1 failed, 220 passed, 5 skipped in 338.36s (0:05:38) =============
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04/test_rmtree_errorhandler_reado0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-cf6bde2f-4d95-42dc-95f3-3c7d35589d04'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044/test_rmtree_errorhandler_reado0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_reado0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
  warnings.warn(
/usr/lib/python3.8/site-packages/_pytest/pathlib.py:95: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-93c5160a-bb24-4489-b653-31b84b620044'
  warnings.warn(

Here is list of installed modules in build env

Package                       Version
----------------------------- ----------
alabaster                     0.7.13
asttokens                     2.2.1
async-generator               1.10
Babel                         2.13.0
backcall                      0.2.0
build                         1.0.0
charset-normalizer            3.3.1
comm                          0.1.4
cppclean                      0.13
debugpy                       1.8.0
decorator                     5.1.1
distro                        1.8.0
docutils                      0.20.1
editables                     0.5
exceptiongroup                1.1.3
executing                     1.2.0
gpg                           1.22.0
hatchling                     1.18.0
idna                          3.4
imagesize                     1.4.1
importlib-metadata            6.8.0
iniconfig                     2.0.0
installer                     0.7.0
ipykernel                     6.25.2
ipython                       8.12.0
jedi                          0.19.0
Jinja2                        3.1.2
jupyter_client                8.4.0
jupyter_core                  5.3.1
markdown-it-py                3.0.0
MarkupSafe                    2.1.3
matplotlib-inline             0.1.6
mdit-py-plugins               0.4.0
mdurl                         0.1.2
mock                          5.1.0
msgpack                       1.0.6
myst-parser                   2.0.0
nest-asyncio                  1.5.8
packaging                     23.2
parso                         0.8.3
pathspec                      0.11.2
pexpect                       4.8.0
pickleshare                   0.7.5
platformdirs                  3.11.0
pluggy                        1.3.0
prompt-toolkit                3.0.39
psutil                        5.9.5
ptyprocess                    0.7.0
pure-eval                     0.2.2
Pygments                      2.16.1
pyproject_hooks               1.0.0
pytest                        7.4.2
pytest-asyncio                0.21.1
pytest-jupyter                0.7.0
pytest-timeout                2.2.0
python-dateutil               2.8.2
pytz                          2023.3
PyYAML                        6.0.1
pyzmq                         25.1.1
requests                      2.31.0
six                           1.16.0
snowballstemmer               2.2.0
Sphinx                        7.1.2
sphinx-autodoc-typehints      1.24.0
sphinx-rtd-theme              1.2.2
sphinxcontrib-applehelp       1.0.4
sphinxcontrib-devhelp         1.0.2
sphinxcontrib_github_alt      1.2
sphinxcontrib-htmlhelp        2.0.4
sphinxcontrib-jquery          4.1
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.9
stack-data                    0.6.3
tomli                         2.0.1
tornado                       6.3.3
traitlets                     5.11.2
trove-classifiers             2023.10.19
typing_extensions             4.8.0
urllib3                       1.26.18
wcwidth                       0.2.8
wheel                         0.41.2
zipp                          3.17.0
@kloczek
Copy link
Author

kloczek commented Nov 6, 2023

Updated pytest output for 8.6.0. Now are failing two units

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.0-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.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: asyncio-0.21.1, timeout-2.2.0
asyncio: mode=strict
timeout: 100.0s
timeout method: thread
timeout func_only: False
collected 231 items

tests/test_adapter.py ...........................                        [ 11%]
tests/test_client.py .....................s....F.                        [ 23%]
tests/test_connect.py ...............                                    [ 30%]
tests/test_consoleapp.py ...                                             [ 31%]
tests/test_jsonutil.py ..........                                        [ 35%]
tests/test_kernelapp.py .                                                [ 36%]
tests/test_kernelmanager.py .....................s.s.s............       [ 52%]
tests/test_kernelspec.py .............                                   [ 58%]
tests/test_kernelspecapp.py ...                                          [ 59%]
tests/test_localinterfaces.py .                                          [ 60%]
tests/test_manager.py ......                                             [ 62%]
tests/test_multikernelmanager.py ...s.....F......................        [ 76%]
tests/test_provisioning.py ...........                                   [ 81%]
tests/test_public_api.py ....                                            [ 83%]
tests/test_restarter.py ........                                         [ 86%]
tests/test_session.py .............................                      [ 99%]
tests/test_ssh.py ..                                                     [100%]

=================================== FAILURES ===================================
__________________ TestThreadedKernelClient.test_shutdown_id ___________________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7f8e85d0bca0>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 2.050238801864907
excinfo    = <ExceptionInfo PytestUnhandledThreadExceptionWarning('Exception in thread Thread-90\n\nTraceback (most recent call las...cket.pyx", line 332, in zmq.backend.cython.socket.Socket.__init__\nzmq.error.ZMQError: Too many open files\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7f8e85d0bca0>
precise_start = 1909499.850825244
precise_stop = 1909501.901064046
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1699276971.1146047
stop       = 1699276973.1648467
when       = 'call'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_call'>
        item       = <TestCaseFunction test_shutdown_id>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <TestCaseFunction test_shutdown_id>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <TestCaseFunction test_shutdown_id>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7f8e895bf9d0>
/usr/lib/python3.8/site-packages/_pytest/threadexception.py:83: in pytest_runtest_call
    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 = "<unknown>" 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-90
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 "/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/jupyter_client/channels.py", line 149, in run
E                   loop.run_until_complete(self._async_run())
E                 File "/usr/lib64/python3.8/asyncio/base_events.py", line 616, in run_until_complete
E                   return future.result()
E                 File "/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/jupyter_client/channels.py", line 142, in _async_run
E                   self._create_socket()
E                 File "/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/jupyter_client/channels.py", line 104, in _create_socket
E                   self.socket = self.context.socket(zmq.REQ)
E                 File "/usr/lib64/python3.8/site-packages/zmq/sugar/context.py", line 362, in socket
E                   s: ST = socket_class(  # set PYTHONTRACEMALLOC=2 to get the calling frame
E                 File "/usr/lib64/python3.8/site-packages/zmq/sugar/socket.py", line 159, in __init__
E                   super().__init__(
E                 File "zmq/backend/cython/socket.pyx", line 332, in zmq.backend.cython.socket.Socket.__init__
E               zmq.error.ZMQError: Too many open files

cm         = <_pytest.threadexception.catch_threading_exception object at 0x7f8e85d25940>
msg        = 'Exception in thread Thread-90\n\nTraceback (most recent call last):\n  File "/usr/lib64/python3.8/threading.py", line.../cython/socket.pyx", line 332, in zmq.backend.cython.socket.Socket.__init__\nzmq.error.ZMQError: Too many open files\n'
thread_name = 'Thread-90'

/usr/lib/python3.8/site-packages/_pytest/threadexception.py:73: PytestUnhandledThreadExceptionWarning
----------------------------- Captured stderr call -----------------------------
Could not import runpy module
Traceback (most recent call last):
  File "/usr/lib64/python3.8/runpy.py", line 19, in <module>
    from pkgutil import read_code, get_importer
  File "/usr/lib64/python3.8/pkgutil.py", line 137, in <module>
    def iter_importer_modules(importer, prefix=''):
  File "/usr/lib64/python3.8/functools.py", line 808, in singledispatch
    import types, weakref
  File "/usr/lib64/python3.8/weakref.py", line 22, in <module>
    from _weakrefset import WeakSet, _IterationGuard
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 914, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1407, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1379, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1534, in find_spec
  File "<frozen importlib._bootstrap_external>", line 123, in _path_join
  File "<frozen importlib._bootstrap_external>", line 123, in <listcomp>
KeyboardInterrupt
_______________________ TestKernelManager.test_tcp_cinfo _______________________

self = <tests.test_multikernelmanager.TestKernelManager testMethod=test_tcp_cinfo>

    def test_tcp_cinfo(self):
        km = self._get_tcp_km()
>       self._run_cinfo(km, "tcp", localhost())

km         = <jupyter_client.multikernelmanager.MultiKernelManager object at 0x7f8e85338130>
self       = <tests.test_multikernelmanager.TestKernelManager testMethod=test_tcp_cinfo>

/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/tests/test_multikernelmanager.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/tests/test_multikernelmanager.py:95: in _run_cinfo
    stream = km.connect_iopub(kid)
        cinfo      = {'control_port': 35395, 'hb_port': 45843, 'iopub_port': 37615, 'ip': '127.0.0.1', ...}
        ip         = '127.0.0.1'
        kid        = '4209ca19-7f7f-4e8e-926a-72499d19e685'
        km         = <jupyter_client.multikernelmanager.MultiKernelManager object at 0x7f8e85338130>
        self       = <tests.test_multikernelmanager.TestKernelManager testMethod=test_tcp_cinfo>
        transport  = 'tcp'
/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/jupyter_client/multikernelmanager.py:41: in wrapped
    r = method(*args, **kwargs)
        args       = ()
        f          = <function MultiKernelManager.connect_iopub at 0x7f8e87998430>
        kernel_id  = '4209ca19-7f7f-4e8e-926a-72499d19e685'
        km         = <jupyter_client.ioloop.manager.IOLoopKernelManager object at 0x7f8e85328910>
        kwargs     = {}
        method     = <bound method as_zmqstream.<locals>.wrapped of <jupyter_client.ioloop.manager.IOLoopKernelManager object at 0x7f8e85328910>>
        self       = <jupyter_client.multikernelmanager.MultiKernelManager object at 0x7f8e85338130>
/home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0/jupyter_client/ioloop/manager.py:30: in wrapped
    return ZMQStream(socket, self.loop)
        args       = ()
        f          = <function ConnectionFileMixin.connect_iopub at 0x7f8e878e3dc0>
        kwargs     = {}
        save_socket_class = None
        self       = <jupyter_client.ioloop.manager.IOLoopKernelManager object at 0x7f8e85328910>
        socket     = <zmq.Socket(zmq.SUB) at 0x7f8e85311b80>
/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:148: in __init__
    self._init_io_state()
        io_loop    = <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f8e8529cdf0>
        self       = <zmq.eventloop.zmqstream.ZMQStream object at 0x7f8e85328190>
        socket     = <zmq.Socket(zmq.SUB) at 0x7f8e85311b80>
/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:722: in _init_io_state
    self.io_loop.add_handler(self.socket, self._handle_events, self.io_loop.READ)
        self       = <zmq.eventloop.zmqstream.ZMQStream object at 0x7f8e85328190>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f8e8529cdf0>
fd = 119
handler = <bound method ZMQStream._handle_events of <zmq.eventloop.zmqstream.ZMQStream object at 0x7f8e85328190>>
events = 1

    def add_handler(
        self, fd: Union[int, _Selectable], handler: Callable[..., None], events: int
    ) -> None:
        fd, fileobj = self.split_fd(fd)
        if fd in self.handlers:
>           raise ValueError("fd %s added twice" % fd)
E           ValueError: fd 119 added twice

events     = 1
fd         = 119
fileobj    = <zmq.Socket(zmq.SUB) at 0x7f8e85311b80>
handler    = <bound method ZMQStream._handle_events of <zmq.eventloop.zmqstream.ZMQStream object at 0x7f8e85328190>>
self       = <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f8e8529cdf0>

/usr/lib64/python3.8/site-packages/tornado/platform/asyncio.py:150: ValueError
------------------------------ Captured log call -------------------------------
ERROR    asyncio:base_events.py:1707 Exception in callback BaseAsyncIOLoop._handle_events(119, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(119, 1)>
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 614, in _handle_events
    zmq_events = self.socket.EVENTS
  File "/usr/lib64/python3.8/site-packages/zmq/sugar/attrsettr.py", line 55, in __getattr__
    return self._get_attr_opt(upper_key, opt)
  File "/usr/lib64/python3.8/site-packages/zmq/sugar/attrsettr.py", line 67, in _get_attr_opt
    return self.get(opt)
  File "zmq/backend/cython/socket.pyx", line 478, in zmq.backend.cython.socket.Socket.get
  File "zmq/backend/cython/socket.pyx", line 138, in zmq.backend.cython.socket._check_closed
zmq.error.ZMQError: Socket operation on non-socket

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib64/python3.8/site-packages/tornado/platform/asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 624, in _handle_events
    if self.closed():
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 576, in closed
    self.close()
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 547, in close
    warnings.warn(
UserWarning: Unregistering FD 119 after closing socket. This could result in unregistering handlers for the wrong socket. Please use stream.close() instead of closing the socket directly.
ERROR    asyncio:base_events.py:1707 Exception in callback BaseAsyncIOLoop._handle_events(119, 1)
handle: <Handle BaseAsyncIOLoop._handle_events(119, 1)>
Traceback (most recent call last):
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 614, in _handle_events
    zmq_events = self.socket.EVENTS
  File "/usr/lib64/python3.8/site-packages/zmq/sugar/attrsettr.py", line 55, in __getattr__
    return self._get_attr_opt(upper_key, opt)
  File "/usr/lib64/python3.8/site-packages/zmq/sugar/attrsettr.py", line 67, in _get_attr_opt
    return self.get(opt)
  File "zmq/backend/cython/socket.pyx", line 478, in zmq.backend.cython.socket.Socket.get
  File "zmq/backend/cython/socket.pyx", line 138, in zmq.backend.cython.socket._check_closed
zmq.error.ZMQError: Socket operation on non-socket

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/lib64/python3.8/site-packages/tornado/platform/asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 624, in _handle_events
    if self.closed():
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 576, in closed
    self.close()
  File "/usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py", line 547, in close
    warnings.warn(
UserWarning: Unregistering FD 119 after closing socket. This could result in unregistering handlers for the wrong socket. Please use stream.close() instead of closing the socket directly.
============================= slowest 10 durations =============================
18.99s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
18.24s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
16.62s call     tests/test_restarter.py::test_restart_check[ipc]
13.63s call     tests/test_restarter.py::test_restart_check[tcp]
13.16s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
13.11s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
12.16s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
8.24s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_signal_kernel_subprocesses[signaltest-no-terminate-install_kernel_dont_terminate-_ShutdownStatus.SigkillRequest]
=========================== short test summary info ============================
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
FAILED tests/test_client.py::TestThreadedKernelClient::test_shutdown_id - pytest.PytestUnhandledThreadExceptionWarning: Exception in thread Thread-90
FAILED tests/test_multikernelmanager.py::TestKernelManager::test_tcp_cinfo - ValueError: fd 119 added twice
============= 2 failed, 224 passed, 5 skipped in 334.63s (0:05:34) =============

@kloczek
Copy link
Author

kloczek commented Dec 3, 2023

Gentle ping .. any update 🤔

@kloczek
Copy link
Author

kloczek commented Dec 3, 2023

Just tested 8.6.0

Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.0-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.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: asyncio-0.23.1, timeout-2.2.0
asyncio: mode=strict
timeout: 100.0s
timeout method: thread
timeout func_only: False
collected 231 items

tests/test_adapter.py ...........................                        [ 11%]
tests/test_client.py .....................s......                        [ 23%]
tests/test_connect.py ...............                                    [ 30%]
tests/test_consoleapp.py ...                                             [ 31%]
tests/test_jsonutil.py ..........                                        [ 35%]
tests/test_kernelapp.py .                                                [ 36%]
tests/test_kernelmanager.py .....................s.s.s............       [ 52%]
tests/test_kernelspec.py .......F.....                                   [ 58%]
tests/test_kernelspecapp.py ...                                          [ 59%]
tests/test_localinterfaces.py .                                          [ 60%]
tests/test_manager.py ......                                             [ 62%]
tests/test_multikernelmanager.py ...s............................        [ 76%]
tests/test_provisioning.py ...........                                   [ 81%]
tests/test_public_api.py ....                                            [ 83%]
tests/test_restarter.py ........                                         [ 86%]
tests/test_session.py .............................                      [ 99%]
tests/test_ssh.py ..                                                     [100%]

=================================== FAILURES ===================================
_______________ KernelSpecTests.test_install_kernel_spec_prefix ________________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x7fe28c094ca0>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.008983673993498087
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...arning: unclosed <socket.socket fd=42, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7fe28c094ca0>
precise_start = 2036055.377348446
precise_stop = 2036055.38633212
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1701642381.0675604
stop       = 1701642381.0765455
when       = 'call'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_call'>
        item       = <TestCaseFunction test_install_kernel_spec_prefix>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <TestCaseFunction test_install_kernel_spec_prefix>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <TestCaseFunction test_install_kernel_spec_prefix>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fe29131a9d0>
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            yield
            if cm.unraisable:
                if cm.unraisable.err_msg is not None:
                    err_msg = cm.unraisable.err_msg
                else:
                    err_msg = "Exception ignored in"
                msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                msg += "".join(
                    traceback.format_exception(
                        cm.unraisable.exc_type,
                        cm.unraisable.exc_value,
                        cm.unraisable.exc_traceback,
                    )
                )
>               warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E               pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E               Traceback (most recent call last):
E                 File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 1464, in hold_trait_notifications
E                   def compress(past_changes: list[Bunch] | None, change: Bunch) -> list[Bunch]:
E               ResourceWarning: unclosed <socket.socket fd=42, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fe28c0934c0>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=42, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'

/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
------------------------------ Captured log call -------------------------------
WARNING  traitlets:kernelspec.py:396 Installing to /tmp/tmpes6cj5vz/share/jupyter/kernels, which is not in ['/tmp/pytest-of-tkloczko/pytest-42/test_install_kernel_spec_prefi0/data/kernels', '/home/tkloczko/.local/share/jupyter/kernels', '/tmp/pytest-of-tkloczko/pytest-42/test_install_kernel_spec_prefi0/env/share/jupyter/kernels', '/tmp/pytest-of-tkloczko/pytest-42/test_install_kernel_spec_prefi0/share/jupyter/kernels', '/tmp/pytest-of-tkloczko/pytest-42/test_install_kernel_spec_prefi0/home/.ipython/kernels']. The kernelspec may not be found.
INFO     traitlets:kernelspec.py:407 Installed kernelspec tstinstalled in /tmp/tmpes6cj5vz/share/jupyter/kernels/tstinstalled
INFO     traitlets:kernelspec.py:403 Removing existing kernelspec in /tmp/tmpes6cj5vz/share/jupyter/kernels/tstinstalled
INFO     traitlets:kernelspec.py:407 Installed kernelspec tstinstalled in /tmp/tmpes6cj5vz/share/jupyter/kernels/tstinstalled
============================= slowest 10 durations =============================
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.07s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
17.89s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
13.62s call     tests/test_restarter.py::test_restart_check[ipc]
13.61s call     tests/test_restarter.py::test_restart_check[tcp]
13.22s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
13.05s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
11.84s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
11.38s call     tests/test_consoleapp.py::test_console_app_ssh
=========================== short test summary info ============================
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
FAILED tests/test_kernelspec.py::KernelSpecTests::test_install_kernel_spec_prefix - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.sock...
============= 1 failed, 225 passed, 5 skipped in 341.65s (0:05:41) =============

@kloczek
Copy link
Author

kloczek commented Dec 4, 2023

After add above unit to --deselect list another one popped out as fsiling.
\After repeat that process three times adding totally 4 units to --deselect list I've installed pytest-find-dependencies to test test suite

Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network' --find-dependencies
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_adapter.py ...........................                                                                                                                                     [ 11%]
tests/test_client.py .....................s......                                                                                                                                     [ 23%]
tests/test_connect.py ...............                                                                                                                                                 [ 30%]
tests/test_consoleapp.py ...                                                                                                                                                          [ 31%]
tests/test_jsonutil.py ..........                                                                                                                                                     [ 35%]
tests/test_kernelapp.py .                                                                                                                                                             [ 36%]
tests/test_kernelmanager.py .....................s.s.s............                                                                                                                    [ 52%]
tests/test_kernelspec.py .............                                                                                                                                                [ 58%]
tests/test_kernelspecapp.py ...                                                                                                                                                       [ 59%]
tests/test_localinterfaces.py .                                                                                                                                                       [ 60%]
tests/test_manager.py E.....                                                                                                                                                          [ 62%]
tests/test_multikernelmanager.py ...s............................                                                                                                                     [ 76%]
tests/test_provisioning.py ...........                                                                                                                                                [ 81%]
tests/test_public_api.py ....                                                                                                                                                         [ 83%]
tests/test_restarter.py ........                                                                                                                                                      [ 86%]
tests/test_session.py .............................                                                                                                                                   [ 99%]
tests/test_ssh.py ..                                                                                                                                                                  [100%]

========================================================================================== ERRORS ===========================================================================================
_____________________________________________________________________ ERROR at setup of test_connection_file_real_path ______________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e6c1edc0>, when = 'setup'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.018855812959372997
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...arning: unclosed <socket.socket fd=38, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e6c1edc0>
precise_start = 2048991.155502551
precise_stop = 2048991.174358364
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1701655316.8457143
stop       = 1701655316.8645716
when       = 'setup'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_setup'>
        item       = <Function test_connection_file_real_path>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_connection_file_real_path>}
        self       = <HookCaller 'pytest_runtest_setup'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_setup'
        kwargs     = {'item': <Function test_connection_file_real_path>}
        methods    = [<HookImpl plugin_name='nose', plugin=<module '_pytest.nose' from '/usr/lib/python3.8/site-packages/_pytest/nose.py'>>...pper name='/dev/null' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fc4e92f4670>
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:83: in pytest_runtest_setup
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            yield
            if cm.unraisable:
                if cm.unraisable.err_msg is not None:
                    err_msg = cm.unraisable.err_msg
                else:
                    err_msg = "Exception ignored in"
                msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                msg += "".join(
                    traceback.format_exception(
                        cm.unraisable.exc_type,
                        cm.unraisable.exc_value,
                        cm.unraisable.exc_traceback,
                    )
                )
>               warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E               pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E               Traceback (most recent call last):
E                 File "/usr/lib/python3.8/site-packages/pluggy/_callers.py", line 47, in _multicall
E                   args = [caller_kwargs[argname] for argname in hook_impl.argnames]
E               ResourceWarning: unclosed <socket.socket fd=38, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fc4e6c33c40>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=38, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'

/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
=================================================================================== slowest 10 durations ====================================================================================
20.36s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
18.15s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
13.63s call     tests/test_restarter.py::test_restart_check[ipc]
13.61s call     tests/test_restarter.py::test_restart_check[tcp]
12.25s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
12.22s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
12.12s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
9.12s call     tests/test_consoleapp.py::test_console_app_ssh
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
ERROR tests/test_manager.py::test_connection_file_real_path - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================== 225 passed, 5 skipped, 1 error in 342.97s (0:05:42) ====================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_ssh.py ..                                                                                                                                                                  [  0%]
tests/test_session.py .............................                                                                                                                                   [ 13%]
tests/test_restarter.py ........                                                                                                                                                      [ 16%]
tests/test_public_api.py ....                                                                                                                                                         [ 18%]
tests/test_provisioning.py .......F...                                                                                                                                                [ 23%]
tests/test_multikernelmanager.py ............................s...                                                                                                                     [ 37%]
tests/test_manager.py ......                                                                                                                                                          [ 39%]
tests/test_localinterfaces.py .                                                                                                                                                       [ 40%]
tests/test_kernelspecapp.py F..                                                                                                                                                       [ 41%]
tests/test_kernelspec.py .............                                                                                                                                                [ 47%]
tests/test_kernelmanager.py ............s.s.sF....................                                                                                                                    [ 63%]
tests/test_kernelapp.py .                                                                                                                                                             [ 64%]
tests/test_jsonutil.py ..........                                                                                                                                                     [ 68%]
tests/test_consoleapp.py ...                                                                                                                                                          [ 69%]
tests/test_connect.py ...............                                                                                                                                                 [ 76%]
tests/test_client.py ......s.....................                                                                                                                                     [ 88%]
tests/test_adapter.py ...........................                                                                                                                                     [100%]

========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________ TestRuntime.test_existing[no_provisioner] _________________________________________________________________________

self = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ef7340>, kpf = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e547d730>
akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43da580>

    async def test_existing(self, kpf, akm):
>       await self.akm_test(akm)

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43da580>
kpf        = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e547d730>
self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ef7340>

tests/test_provisioning.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_provisioning.py:272: in akm_test
    TestRuntime.validate_provisioner(kernel_mgr)
        kernel_mgr = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43da580>
        self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ef7340>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43da580>

    @staticmethod
    def validate_provisioner(akm: AsyncKernelManager) -> None:
        # Ensure the provisioner is managing a process at this point
        assert akm.provisioner is not None and akm.provisioner.has_process

        # Validate provisioner config
        if akm.kernel_name in ["no_provisioner", "default_provisioner"]:
>           assert not hasattr(akm.provisioner, "config_var_1")
E           AssertionError: assert not True
E            +  where True = hasattr(<tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e43ced60>, 'config_var_1')
E            +    where <tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e43ced60> = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43da580>.provisioner

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43da580>

tests/test_provisioning.py:324: AssertionError
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
DEBUG    traitlets:factory.py:95 Instantiating kernel 'Signal Test Kernel w None' with kernel provisioner: custom-test-provisioner
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpud4ykore.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:48683
________________________________________________________________________________ test_list_provisioners_app _________________________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e41eec10>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.11715233512222767
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <function Context.__del__ at 0x7fc4e91ee430>\n\...in __del__\n    warn(\nResourceWarning: Unclosed context <zmq.asyncio.Context(1 socket) at 0x7fc4e43d9590>\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e41eec10>
precise_start = 2049208.459453944
precise_stop = 2049208.576606279
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1701655534.149666
stop       = 1701655534.2668195
when       = 'call'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_call'>
        item       = <Function test_list_provisioners_app>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_list_provisioners_app>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_list_provisioners_app>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fc4e92f4670>
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            yield
            if cm.unraisable:
                if cm.unraisable.err_msg is not None:
                    err_msg = cm.unraisable.err_msg
                else:
                    err_msg = "Exception ignored in"
                msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                msg += "".join(
                    traceback.format_exception(
                        cm.unraisable.exc_type,
                        cm.unraisable.exc_value,
                        cm.unraisable.exc_traceback,
                    )
                )
>               warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E               pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Context.__del__ at 0x7fc4e91ee430>
E
E               Traceback (most recent call last):
E                 File "/usr/lib64/python3.8/site-packages/zmq/sugar/context.py", line 145, in __del__
E                   warn(
E               ResourceWarning: Unclosed context <zmq.asyncio.Context(1 socket) at 0x7fc4e43d9590>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fc4e4190e20>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <function Context.__del__ at 0x7fc4e91ee430>\n\nTraceback (most recent call last):\n  File "/us...line 145, in __del__\n    warn(\nResourceWarning: Unclosed context <zmq.asyncio.Context(1 socket) at 0x7fc4e43d9590>\n'

/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
----------------------------------------------------------------------------------- Captured stdout call ------------------------------------------------------------------------------------
Available kernel provisioners:
  custom-test-provisioner        tests.test_provisioning:CustomTestProvisioner
  local-provisioner              jupyter_client.provisioning:LocalProvisioner
  new-test-provisioner           tests.test_provisioning:NewTestProvisioner
  subclassed-test-provisioner    tests.test_provisioning:SubclassedTestProvisioner
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
DEBUG    traitlets:multikernelmanager.py:125 Destroying zmq context for <jupyter_client.multikernelmanager.AsyncMultiKernelManager object at 0x7fc4e434af70>
DEBUG    traitlets:multikernelmanager.py:125 Destroying zmq context for <jupyter_client.multikernelmanager.AsyncMultiKernelManager object at 0x7fc4e4368190>
___________________________________________________________________ TestParallel.test_start_parallel_thread_kernels[tcp] ____________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e40d6af0>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 12.148125956999138
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...arning: unclosed <socket.socket fd=56, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e40d6af0>
precise_start = 2049243.538216425
precise_stop = 2049255.686342382
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1701655569.2284281
stop       = 1701655581.3765569
when       = 'call'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_call'>
        item       = <Function test_start_parallel_thread_kernels[tcp]>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_start_parallel_thread_kernels[tcp]>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_start_parallel_thread_kernels[tcp]>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fc4e92f4670>
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            yield
            if cm.unraisable:
                if cm.unraisable.err_msg is not None:
                    err_msg = cm.unraisable.err_msg
                else:
                    err_msg = "Exception ignored in"
                msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                msg += "".join(
                    traceback.format_exception(
                        cm.unraisable.exc_type,
                        cm.unraisable.exc_value,
                        cm.unraisable.exc_traceback,
                    )
                )
>               warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E               pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E               Traceback (most recent call last):
E                 File "/usr/lib64/python3.8/asyncio/base_events.py", line 431, in create_task
E                   task = tasks.Task(coro, loop=self, name=name)
E               ResourceWarning: unclosed <socket.socket fd=56, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fc4e4058550>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=56, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'

/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
DEBUG    traitlets:factory.py:95 Instantiating kernel 'Signal Test Kernel' with kernel provisioner: custom-test-provisioner
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpahu0s0z_.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:52869
DEBUG    traitlets:client.py:366 connecting iopub channel to tcp://127.0.0.1:33733
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:33733
DEBUG    traitlets:client.py:354 connecting shell channel to tcp://127.0.0.1:56741
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:56741
DEBUG    traitlets:client.py:378 connecting stdin channel to tcp://127.0.0.1:36427
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:36427
DEBUG    traitlets:client.py:390 connecting heartbeat channel to tcp://127.0.0.1:53511
DEBUG    traitlets:client.py:401 connecting control channel to tcp://127.0.0.1:52869
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:52869
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpahu0s0z_.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:52869
DEBUG    traitlets:client.py:128 Destroying zmq context for <jupyter_client.blocking.client.BlockingKernelClient object at 0x7fc4e40717c0>
DEBUG    traitlets:factory.py:95 Instantiating kernel 'Signal Test Kernel' with kernel provisioner: custom-test-provisioner
DEBUG    traitlets:factory.py:95 Instantiating kernel 'Signal Test Kernel' with kernel provisioner: custom-test-provisioner
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpdklgp6o5.json']
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpj8ofx66w.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:38081
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:45147
DEBUG    traitlets:client.py:366 connecting iopub channel to tcp://127.0.0.1:50533
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:50533
DEBUG    traitlets:client.py:354 connecting shell channel to tcp://127.0.0.1:39437
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:39437
DEBUG    traitlets:client.py:378 connecting stdin channel to tcp://127.0.0.1:58461
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:58461
DEBUG    traitlets:client.py:390 connecting heartbeat channel to tcp://127.0.0.1:50903
DEBUG    traitlets:client.py:366 connecting iopub channel to tcp://127.0.0.1:42287
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:42287
DEBUG    traitlets:client.py:354 connecting shell channel to tcp://127.0.0.1:32819
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:32819
DEBUG    traitlets:client.py:378 connecting stdin channel to tcp://127.0.0.1:51853
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:51853
DEBUG    traitlets:client.py:390 connecting heartbeat channel to tcp://127.0.0.1:38293
DEBUG    traitlets:client.py:401 connecting control channel to tcp://127.0.0.1:38081
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:38081
DEBUG    traitlets:client.py:401 connecting control channel to tcp://127.0.0.1:45147
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:45147
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpdklgp6o5.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:38081
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmpj8ofx66w.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:45147
DEBUG    traitlets:client.py:128 Destroying zmq context for <jupyter_client.blocking.client.BlockingKernelClient object at 0x7fc4ddf83be0>
DEBUG    traitlets:client.py:128 Destroying zmq context for <jupyter_client.blocking.client.BlockingKernelClient object at 0x7fc4ddfa0700>
=================================================================================== slowest 10 durations ====================================================================================
18.12s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.10s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
18.06s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
13.63s call     tests/test_restarter.py::test_restart_check[ipc]
13.63s call     tests/test_restarter.py::test_restart_check[tcp]
12.17s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
12.15s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
11.82s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
9.04s call     tests/test_consoleapp.py::test_console_app_ssh
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_client.py:238: Not supported
FAILED tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner] - AssertionError: assert not True
FAILED tests/test_kernelspecapp.py::test_list_provisioners_app - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <function Context.__del__ at 0x7fc4e91ee430>
FAILED tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================================== 3 failed, 223 passed, 5 skipped in 345.73s (0:05:45) ====================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_adapter.py ...........................                                                                                                                                     [ 11%]
tests/test_client.py .....................s......                                                                                                                                     [ 23%]
tests/test_connect.py ..............                                                                                                                                                  [ 29%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
4.05s call     tests/test_client.py::TestThreadedKernelClient::test_comm_info
4.05s call     tests/test_client.py::TestThreadedKernelClient::test_kernel_info
4.05s call     tests/test_client.py::TestThreadedKernelClient::test_inspect
4.05s call     tests/test_client.py::TestThreadedKernelClient::test_history
3.78s call     tests/test_client.py::TestKernelClient::test_shutdown
3.78s call     tests/test_client.py::TestKernelClient::test_complete
3.70s call     tests/test_client.py::TestKernelClient::test_inspect
3.67s call     tests/test_client.py::TestKernelClient::test_kernel_info
3.57s call     tests/test_client.py::TestKernelClient::test_history
3.54s call     tests/test_client.py::TestKernelClient::test_shutdown_id
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_client.py:238: Not supported
========================================================================= 69 passed, 1 skipped in 94.06s (0:01:34) ==========================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_connect.py .                                                                                                                                                               [  0%]
tests/test_consoleapp.py ...                                                                                                                                                          [  1%]
tests/test_jsonutil.py ..........                                                                                                                                                     [  6%]
tests/test_kernelapp.py .                                                                                                                                                             [  6%]
tests/test_kernelmanager.py ....................                                                                                                                                      [ 15%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
19.23s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
17.88s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
9.05s call     tests/test_consoleapp.py::test_console_app_ssh
8.14s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_async_signal_kernel_subprocesses[signaltest-no-terminate-install_kernel_dont_terminate-_ShutdownStatus.SigkillRequest]
8.00s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_signal_kernel_subprocesses[signaltest-no-terminate-install_kernel_dont_terminate-_ShutdownStatus.SigkillRequest]
5.72s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_async_signal_kernel_subprocesses[signaltest-no-shutdown-install_kernel_dont_shutdown-_ShutdownStatus.SigtermRequest]
5.64s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_signal_kernel_subprocesses[signaltest-no-shutdown-install_kernel_dont_shutdown-_ShutdownStatus.SigtermRequest]
5.03s call     tests/test_kernelmanager.py::TestKernelManager::test_signal_kernel_subprocesses
3.22s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_async_signal_kernel_subprocesses[signaltest-_install_kernel-_ShutdownStatus.ShutdownRequest]
3.11s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_signal_kernel_subprocesses[signaltest-_install_kernel-_ShutdownStatus.ShutdownRequest]
=============================================================================== 36 passed in 96.39s (0:01:36) ===============================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py .s.sFs...........                                                                                                                                         [  7%]
tests/test_manager.py .

========================================================================================= FAILURES ==========================================================================================
___________________________________________________________________ TestParallel.test_start_sequence_process_kernels[tcp] ___________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e6d10a60>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 12.115391002036631
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...arning: unclosed <socket.socket fd=35, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e6d10a60>
precise_start = 2049662.597419504
precise_stop = 2049674.712810506
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1701655988.287631
stop       = 1701656000.403025
when       = 'call'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_call'>
        item       = <Function test_start_sequence_process_kernels[tcp]>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_start_sequence_process_kernels[tcp]>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_start_sequence_process_kernels[tcp]>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fc4e92f4670>
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            yield
            if cm.unraisable:
                if cm.unraisable.err_msg is not None:
                    err_msg = cm.unraisable.err_msg
                else:
                    err_msg = "Exception ignored in"
                msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                msg += "".join(
                    traceback.format_exception(
                        cm.unraisable.exc_type,
                        cm.unraisable.exc_value,
                        cm.unraisable.exc_traceback,
                    )
                )
>               warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E               pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E               Traceback (most recent call last):
E                 File "/usr/lib64/python3.8/selectors.py", line 464, in select
E                   max_ev = max(len(self._fd_to_key), 1)
E               ResourceWarning: unclosed <socket.socket fd=35, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fc4e6e89ac0>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=35, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'

/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
=================================================================================== slowest 10 durations ====================================================================================
13.11s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
12.20s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
12.12s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
5.16s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_signal_kernel_subprocesses
2.88s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_start_new_async_kernel
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_callables[tcp]
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKMSubclass-tcp]
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKMSubclass-ipc]
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManager-ipc]
0.27s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManager-tcp]
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
FAILED tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================= 1 failed, 14 passed, 3 skipped in 48.06s ==========================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py .                                                                                                                                                         [  0%]
tests/test_kernelspec.py ........                                                                                                                                                     [  3%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
0.27s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_callables[ipc]
0.01s setup    tests/test_kernelspec.py::KernelSpecTests::test_allowed_kernel_names
0.01s setup    tests/test_kernelspec.py::KernelSpecTests::test_deprecated_whitelist
0.01s setup    tests/test_kernelspec.py::KernelSpecTests::test_find_all_specs
0.01s setup    tests/test_kernelspec.py::KernelSpecTests::test_cant_install_kernel_spec
0.01s call     tests/test_kernelspec.py::KernelSpecTests::test_find_all_specs

(4 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================================================== 10 passed in 0.64s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelspec.py ....                                                                                                                                                         [  1%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
0.53s call     tests/test_kernelspec.py::KernelSpecTests::test_remove_kernel_spec_app
0.02s call     tests/test_kernelspec.py::KernelSpecTests::test_subclass
0.01s setup    tests/test_kernelspec.py::KernelSpecTests::test_kernel_spec_priority

(7 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 5 passed in 0.94s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelspec.py .                                                                                                                                                            [  0%]
tests/test_kernelspecapp.py .                                                                                                                                                         [  0%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_kernelspec_sub_apps

(8 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 3 passed in 0.29s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelspecapp.py .                                                                                                                                                         [  0%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_kernelspec_app

(5 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 2 passed in 0.28s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelspecapp.py .                                                                                                                                                         [  0%]
tests/test_manager.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_list_provisioners_app

(5 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 2 passed in 0.28s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_provisioning.py .

=================================================================================== slowest 10 durations ====================================================================================
0.24s call     tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]

(1 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 1 passed in 0.50s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_ssh.py ..                                                                                                                                                                  [  0%]
tests/test_session.py .......................                                                                                                                                         [ 10%]
tests/test_provisioning.py .

=================================================================================== slowest 10 durations ====================================================================================
1.11s call     tests/test_session.py::TestSession::test_tracking
1.10s call     tests/test_session.py::TestSession::test_tracking_sync
0.50s call     tests/test_ssh.py::test_random_ports
0.18s call     tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.15s call     tests/test_ssh.py::test_open_tunnel
0.10s setup    tests/test_session.py::test_session_factory
0.02s call     tests/test_session.py::TestSession::test_unique_msg_ids
0.01s setup    tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s teardown tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]

(1 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================================================== 26 passed in 3.59s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_session.py ......                                                                                                                                                          [  2%]
tests/test_restarter.py ......                                                                                                                                                        [  5%]
tests/test_provisioning.py .

=================================================================================== slowest 10 durations ====================================================================================
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.09s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
9.02s call     tests/test_restarter.py::test_async_restart_check[ipc]
6.08s call     tests/test_restarter.py::test_async_restart_check[tcp]
6.08s call     tests/test_restarter.py::test_restarter_gives_up[tcp]
6.06s call     tests/test_restarter.py::test_restarter_gives_up[ipc]
0.15s call     tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_restarter.py::test_async_restart_check[ipc]
0.01s setup    tests/test_restarter.py::test_async_restarter_gives_up[tcp]
=============================================================================== 13 passed in 64.01s (0:01:04) ===============================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_restarter.py ..                                                                                                                                                            [  0%]
tests/test_public_api.py ....                                                                                                                                                         [  2%]
tests/test_provisioning.py .

=================================================================================== slowest 10 durations ====================================================================================
13.64s call     tests/test_restarter.py::test_restart_check[tcp]
13.62s call     tests/test_restarter.py::test_restart_check[ipc]
0.25s call     tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_restarter.py::test_restart_check[tcp]
0.01s setup    tests/test_public_api.py::test_connect
0.01s setup    tests/test_public_api.py::test_kms
0.01s setup    tests/test_public_api.py::test_launcher
0.01s setup    tests/test_public_api.py::test_kcs

(1 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================================================== 7 passed in 27.86s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_provisioning.py ...F

========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________ TestRuntime.test_existing[no_provisioner] _________________________________________________________________________

self = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ee0490>, kpf = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e6e739d0>
akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ea50d0>

    async def test_existing(self, kpf, akm):
>       await self.akm_test(akm)

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ea50d0>
kpf        = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e6e739d0>
self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ee0490>

tests/test_provisioning.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_provisioning.py:272: in akm_test
    TestRuntime.validate_provisioner(kernel_mgr)
        kernel_mgr = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ea50d0>
        self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ee0490>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ea50d0>

    @staticmethod
    def validate_provisioner(akm: AsyncKernelManager) -> None:
        # Ensure the provisioner is managing a process at this point
        assert akm.provisioner is not None and akm.provisioner.has_process

        # Validate provisioner config
        if akm.kernel_name in ["no_provisioner", "default_provisioner"]:
>           assert not hasattr(akm.provisioner, "config_var_1")
E           AssertionError: assert not True
E            +  where True = hasattr(<tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e6ea5d00>, 'config_var_1')
E            +    where <tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e6ea5d00> = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ea50d0>.provisioner

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ea50d0>

tests/test_provisioning.py:324: AssertionError
=================================================================================== slowest 10 durations ====================================================================================
0.26s call     tests/test_provisioning.py::TestRuntime::test_custom_lifecycle
0.15s call     tests/test_provisioning.py::TestRuntime::test_new
0.14s call     tests/test_provisioning.py::TestRuntime::test_default_provisioner_config
0.03s call     tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]
0.01s setup    tests/test_provisioning.py::TestRuntime::test_new

(4 durations < 0.005s hidden.  Use -vv to show these durations.)
================================================================================== short test summary info ==================================================================================
FAILED tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner] - AssertionError: assert not True
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================ 1 failed, 3 passed in 1.16s ================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_provisioning.py .F

========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________ TestRuntime.test_existing[no_provisioner] _________________________________________________________________________

self = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ee3400>, kpf = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e6e5e790>
akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ec06a0>

    async def test_existing(self, kpf, akm):
>       await self.akm_test(akm)

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ec06a0>
kpf        = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e6e5e790>
self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ee3400>

tests/test_provisioning.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_provisioning.py:272: in akm_test
    TestRuntime.validate_provisioner(kernel_mgr)
        kernel_mgr = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ec06a0>
        self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ee3400>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ec06a0>

    @staticmethod
    def validate_provisioner(akm: AsyncKernelManager) -> None:
        # Ensure the provisioner is managing a process at this point
        assert akm.provisioner is not None and akm.provisioner.has_process

        # Validate provisioner config
        if akm.kernel_name in ["no_provisioner", "default_provisioner"]:
>           assert not hasattr(akm.provisioner, "config_var_1")
E           AssertionError: assert not True
E            +  where True = hasattr(<tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e6ec0a90>, 'config_var_1')
E            +    where <tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e6ec0a90> = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ec06a0>.provisioner

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e6ec06a0>

tests/test_provisioning.py:324: AssertionError
=================================================================================== slowest 10 durations ====================================================================================
0.14s call     tests/test_provisioning.py::TestRuntime::test_default_provisioner_config
0.02s call     tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner]

(4 durations < 0.005s hidden.  Use -vv to show these durations.)
================================================================================== short test summary info ==================================================================================
FAILED tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner] - AssertionError: assert not True
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================ 1 failed, 1 passed in 0.62s ================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_list_provisioners_app

(2 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 1 passed in 0.29s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_ssh.py ..                                                                                                                                                                  [  0%]
tests/test_session.py .............................                                                                                                                                   [ 13%]
tests/test_restarter.py ........                                                                                                                                                      [ 16%]
tests/test_public_api.py ....                                                                                                                                                         [ 18%]
tests/test_provisioning.py ...                                                                                                                                                        [ 19%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
18.12s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
13.63s call     tests/test_restarter.py::test_restart_check[tcp]
13.63s call     tests/test_restarter.py::test_restart_check[ipc]
6.15s call     tests/test_restarter.py::test_async_restart_check[ipc]
6.08s call     tests/test_restarter.py::test_async_restart_check[tcp]
6.08s call     tests/test_restarter.py::test_restarter_gives_up[tcp]
6.06s call     tests/test_restarter.py::test_restarter_gives_up[ipc]
1.11s call     tests/test_session.py::TestSession::test_tracking
1.10s call     tests/test_session.py::TestSession::test_tracking_sync
=============================================================================== 47 passed in 92.37s (0:01:32) ===============================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_provisioning.py ........                                                                                                                                                   [  3%]
tests/test_multikernelmanager.py ...............                                                                                                                                      [  9%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.86s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_sequence_tcp_kernels
0.86s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_sequence_ipc_kernels
0.85s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_stream_on_recv
0.63s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_parallel_process_kernels
0.57s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_parallel_thread_kernels
0.30s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_use_after_shutdown_all
0.29s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_tcp_lifecycle
0.29s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_tcp_lifecycle_with_kernel_id
0.29s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_use_pending_kernels
0.25s call     tests/test_provisioning.py::TestRuntime::test_existing[default_provisioner]
==================================================================================== 24 passed in 7.49s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_multikernelmanager.py ............                                                                                                                                         [  5%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.87s call     tests/test_multikernelmanager.py::TestKernelManager::test_stream_on_recv
0.60s call     tests/test_multikernelmanager.py::TestKernelManager::test_start_sequence_tcp_kernels
0.59s call     tests/test_multikernelmanager.py::TestKernelManager::test_start_sequence_ipc_kernels
0.27s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_ipc_lifecycle
0.20s call     tests/test_multikernelmanager.py::TestKernelManager::test_tcp_lifecycle
0.20s call     tests/test_multikernelmanager.py::TestKernelManager::test_subclass_callables
0.18s call     tests/test_multikernelmanager.py::TestKernelManager::test_tcp_lifecycle_with_kernel_id
0.16s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_shutdown_all
0.15s call     tests/test_multikernelmanager.py::TestKernelManager::test_tcp_cinfo
0.15s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_ipc_cinfo
==================================================================================== 13 passed in 3.89s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_multikernelmanager.py .s...                                                                                                                                                [  2%]
tests/test_manager.py .                                                                                                                                                               [  2%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.39s call     tests/test_multikernelmanager.py::TestKernelManager::test_start_parallel_thread_kernels
0.19s call     tests/test_multikernelmanager.py::TestKernelManager::test_ipc_lifecycle
0.16s call     tests/test_multikernelmanager.py::TestKernelManager::test_shutdown_all
0.14s call     tests/test_multikernelmanager.py::TestKernelManager::test_ipc_cinfo
0.02s call     tests/test_kernelspecapp.py::test_list_provisioners_app
0.01s setup    tests/test_kernelspecapp.py::test_list_provisioners_app
0.01s setup    tests/test_multikernelmanager.py::TestKernelManager::test_ipc_lifecycle
0.01s setup    tests/test_multikernelmanager.py::TestKernelManager::test_ipc_cinfo
0.01s setup    tests/test_manager.py::test_env_update_launch_args_env_dic
0.01s setup    tests/test_multikernelmanager.py::TestKernelManager::test_shutdown_all
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
=============================================================================== 6 passed, 1 skipped in 1.36s ================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_manager.py ...                                                                                                                                                             [  1%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_list_provisioners_app

(9 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 4 passed in 0.28s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_manager.py .                                                                                                                                                               [  0%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_list_provisioners_app

(5 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 2 passed in 0.35s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_manager.py .                                                                                                                                                               [  0%]
tests/test_kernelspecapp.py .

=================================================================================== slowest 10 durations ====================================================================================
0.02s call     tests/test_kernelspecapp.py::test_list_provisioners_app

(5 durations < 0.005s hidden.  Use -vv to show these durations.)
===================================================================================== 2 passed in 0.27s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py .

=================================================================================== slowest 10 durations ====================================================================================
12.22s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]

(2 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================================================== 1 passed in 12.48s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_ssh.py ..                                                                                                                                                                  [  0%]
tests/test_session.py .............................                                                                                                                                   [ 13%]
tests/test_restarter.py ........                                                                                                                                                      [ 16%]
tests/test_public_api.py ....                                                                                                                                                         [ 18%]
tests/test_provisioning.py .......F...                                                                                                                                                [ 23%]
tests/test_multikernelmanager.py .........                                                                                                                                            [ 27%]
tests/test_kernelmanager.py .

========================================================================================= FAILURES ==========================================================================================
_________________________________________________________________________ TestRuntime.test_existing[no_provisioner] _________________________________________________________________________

self = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ed0d90>, kpf = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e5447250>
akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43d69d0>

    async def test_existing(self, kpf, akm):
>       await self.akm_test(akm)

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43d69d0>
kpf        = <jupyter_client.provisioning.factory.KernelProvisionerFactory object at 0x7fc4e5447250>
self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ed0d90>

tests/test_provisioning.py:279:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_provisioning.py:272: in akm_test
    TestRuntime.validate_provisioner(kernel_mgr)
        kernel_mgr = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43d69d0>
        self       = <tests.test_provisioning.TestRuntime object at 0x7fc4e6ed0d90>
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

akm = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43d69d0>

    @staticmethod
    def validate_provisioner(akm: AsyncKernelManager) -> None:
        # Ensure the provisioner is managing a process at this point
        assert akm.provisioner is not None and akm.provisioner.has_process

        # Validate provisioner config
        if akm.kernel_name in ["no_provisioner", "default_provisioner"]:
>           assert not hasattr(akm.provisioner, "config_var_1")
E           AssertionError: assert not True
E            +  where True = hasattr(<tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e43d66a0>, 'config_var_1')
E            +    where <tests.test_provisioning.CustomTestProvisioner object at 0x7fc4e43d66a0> = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43d69d0>.provisioner

akm        = <jupyter_client.manager.AsyncKernelManager object at 0x7fc4e43d69d0>

tests/test_provisioning.py:324: AssertionError
------------------------------------------------------------------------------------- Captured log call -------------------------------------------------------------------------------------
DEBUG    traitlets:factory.py:95 Instantiating kernel 'Signal Test Kernel w None' with kernel provisioner: custom-test-provisioner
DEBUG    traitlets:manager.py:438 Starting kernel: ['/usr/bin/python3', '-m', 'tests.signalkernel', '-f', '/tmp/tmp_q1qznnj.json']
DEBUG    traitlets:connect.py:653 Connecting to: tcp://127.0.0.1:54935
=================================================================================== slowest 10 durations ====================================================================================
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
16.63s call     tests/test_restarter.py::test_restart_check[tcp]
13.63s call     tests/test_restarter.py::test_restart_check[ipc]
12.10s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
9.05s call     tests/test_restarter.py::test_async_restart_check[tcp]
6.21s call     tests/test_restarter.py::test_async_restart_check[ipc]
6.08s call     tests/test_restarter.py::test_restarter_gives_up[tcp]
6.06s call     tests/test_restarter.py::test_restarter_gives_up[ipc]
1.10s call     tests/test_session.py::TestSession::test_tracking
================================================================================== short test summary info ==================================================================================
FAILED tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner] - AssertionError: assert not True
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
========================================================================= 1 failed, 63 passed in 113.40s (0:01:53) ==========================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_multikernelmanager.py ...................s...                                                                                                                              [  9%]
tests/test_manager.py ......                                                                                                                                                          [ 12%]
tests/test_localinterfaces.py .                                                                                                                                                       [ 12%]
tests/test_kernelspecapp.py .                                                                                                                                                         [ 13%]
tests/test_kernelmanager.py .

=================================================================================== slowest 10 durations ====================================================================================
12.22s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
1.21s call     tests/test_multikernelmanager.py::TestKernelManager::test_ipc_lifecycle
0.97s call     tests/test_multikernelmanager.py::TestKernelManager::test_stream_on_recv
0.87s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_sequence_ipc_kernels
0.85s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_sequence_tcp_kernels
0.78s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_stream_on_recv
0.63s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_parallel_process_kernels
0.60s call     tests/test_multikernelmanager.py::TestKernelManager::test_start_sequence_tcp_kernels
0.60s call     tests/test_multikernelmanager.py::TestKernelManager::test_start_sequence_ipc_kernels
0.59s call     tests/test_multikernelmanager.py::TestAsyncKernelManager::test_start_parallel_thread_kernels
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
============================================================================== 31 passed, 1 skipped in 22.59s ===============================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelspecapp.py ..                                                                                                                                                        [  0%]
tests/test_kernelspec.py .............                                                                                                                                                [  6%]
tests/test_kernelmanager.py ..

=================================================================================== slowest 10 durations ====================================================================================
12.09s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.53s call     tests/test_kernelspec.py::KernelSpecTests::test_remove_kernel_spec_app
0.26s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_callables[ipc]
0.02s call     tests/test_kernelspecapp.py::test_kernelspec_app
0.01s call     tests/test_kernelspecapp.py::test_kernelspec_sub_apps
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.01s teardown tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]

(3 durations < 0.005s hidden.  Use -vv to show these durations.)
==================================================================================== 17 passed in 13.27s ====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py .........

=================================================================================== slowest 10 durations ====================================================================================
12.15s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
5.10s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_signal_kernel_subprocesses
2.88s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_start_new_async_kernel
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_callables[tcp]
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKMSubclass-ipc]
0.12s teardown tests/test_kernelmanager.py::TestAsyncKernelManager::test_start_new_async_kernel
0.12s teardown tests/test_kernelmanager.py::TestAsyncKernelManager::test_signal_kernel_subprocesses
0.01s setup    tests/test_kernelmanager.py::TestAsyncKernelManager::test_get_connect_info[AsyncKMSubclass-ipc]
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.01s setup    tests/test_kernelmanager.py::TestAsyncKernelManager::test_get_connect_info[AsyncKernelManager-ipc]
==================================================================================== 9 passed in 21.31s =====================================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py ...s.

=================================================================================== slowest 10 durations ====================================================================================
12.18s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKMSubclass-tcp]
0.28s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManager-tcp]
0.27s call     tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManager-ipc]
0.01s setup    tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManager-tcp]
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[ipc]
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.01s setup    tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManager-ipc]

(2 durations < 0.005s hidden.  Use -vv to show these durations.)
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
=============================================================================== 4 passed, 1 skipped in 13.35s ===============================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py .s.

=================================================================================== slowest 10 durations ====================================================================================
13.13s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
12.15s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[ipc]
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]

(5 durations < 0.005s hidden.  Use -vv to show these durations.)
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
=============================================================================== 2 passed, 1 skipped in 25.60s ===============================================================================
Running pytest with arguments --find-dependencies-internal -raXs --durations=10 --color=yes --doctest-modules --showlocals --strict-markers --strict-config -ra -m not network
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.18, pytest-7.4.3, pluggy-1.3.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.0
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: flakes-4.0.5, find-dependencies-0.5.2, timeout-2.2.0, asyncio-0.23.1
timeout: 100.0s
timeout method: thread
timeout func_only: False
asyncio: mode=strict
collected 231 items

tests/test_kernelmanager.py .F

========================================================================================= FAILURES ==========================================================================================
___________________________________________________________________ TestParallel.test_start_parallel_thread_kernels[tcp] ____________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e6f99ca0>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 12.136418239912018
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...arning: unclosed <socket.socket fd=29, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=7>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x7fc4e6f99ca0>
precise_start = 2050128.699445564
precise_stop = 2050140.835863804
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1701656454.3896573
stop       = 1701656466.5260782
when       = 'call'

/usr/lib/python3.8/site-packages/_pytest/runner.py:341:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.8/site-packages/_pytest/runner.py:262: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
        ihook      = <HookCaller 'pytest_runtest_call'>
        item       = <Function test_start_parallel_thread_kernels[tcp]>
        kwds       = {}
/usr/lib/python3.8/site-packages/pluggy/_hooks.py:493: in __call__
    return self._hookexec(self.name, self._hookimpls, kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_start_parallel_thread_kernels[tcp]>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.8/site-packages/pluggy/_manager.py:115: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_start_parallel_thread_kernels[tcp]>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.8/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fc4e92f4670>
/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:88: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            yield
            if cm.unraisable:
                if cm.unraisable.err_msg is not None:
                    err_msg = cm.unraisable.err_msg
                else:
                    err_msg = "Exception ignored in"
                msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                msg += "".join(
                    traceback.format_exception(
                        cm.unraisable.exc_type,
                        cm.unraisable.exc_value,
                        cm.unraisable.exc_traceback,
                    )
                )
>               warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E               pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E               Traceback (most recent call last):
E                 File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 633, in get
E                   value = obj._trait_values[self.name]
E               KeyError: 'session'
E
E               During handling of the above exception, another exception occurred:
E
E               Traceback (most recent call last):
E                 File "/usr/lib/python3.8/site-packages/traitlets/traitlets.py", line 223, in __init__
E                   self.value = value
E               ResourceWarning: unclosed <socket.socket fd=29, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fc4e6e63a90>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=29, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'

/usr/lib/python3.8/site-packages/_pytest/unraisableexception.py:78: PytestUnraisableExceptionWarning
=================================================================================== slowest 10 durations ====================================================================================
12.21s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
12.14s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
0.01s setup    tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]

(3 durations < 0.005s hidden.  Use -vv to show these durations.)
================================================================================== short test summary info ==================================================================================
FAILED tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================== 1 failed, 1 passed in 25.02s ================================================================================

============================== Results ===============================
Run dependency analysis for 231 tests.
Executed 894 tests in 32 test runs.
Dependent tests:
  tests/test_manager.py::test_connection_file_real_path depends on tests/test_localinterfaces.py::test_load_ips
  tests/test_provisioning.py::TestRuntime::test_existing[no_provisioner] depends on tests/test_provisioning.py::TestRuntime::test_default_provisioner_config
  tests/test_kernelspecapp.py::test_list_provisioners_app depends on tests/test_localinterfaces.py::test_load_ips
  tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp] depends on tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]

Dependency test FAILED
======================================================================

@kloczek
Copy link
Author

kloczek commented Mar 22, 2024

I've moved to python 3.9 and pytest 8.1.1 and with 8.6.1 I have only now one failing unit

Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.1-2.fc36.x86_64/usr/lib64/python3.9/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-8.6.1-2.fc36.x86_64/usr/lib/python3.9/site-packages
+ /usr/bin/pytest -ra -m 'not network'
============================= test session starts ==============================
platform linux -- Python 3.9.18, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-8.6.1
configfile: pyproject.toml
testpaths: jupyter_client, tests/
plugins: asyncio-0.23.6, timeout-2.3.1
asyncio: mode=strict
timeout: 100.0s
timeout method: thread
timeout func_only: False
collected 231 items

tests/test_adapter.py ...........................                        [ 11%]
tests/test_client.py .....................s......                        [ 23%]
tests/test_connect.py ...............                                    [ 30%]
tests/test_consoleapp.py ...                                             [ 31%]
tests/test_jsonutil.py ..........                                        [ 35%]
tests/test_kernelapp.py .                                                [ 36%]
tests/test_kernelmanager.py .....................s.s.s............       [ 52%]
tests/test_kernelspec.py .............                                   [ 58%]
tests/test_kernelspecapp.py F..                                          [ 59%]
tests/test_localinterfaces.py .                                          [ 60%]
tests/test_manager.py ......                                             [ 62%]
tests/test_multikernelmanager.py ...s............................        [ 76%]
tests/test_provisioning.py ...........                                   [ 81%]
tests/test_public_api.py ....                                            [ 83%]
tests/test_restarter.py ........                                         [ 86%]
tests/test_session.py .............................                      [ 99%]
tests/test_ssh.py ..                                                     [100%]

=================================== FAILURES ===================================
___________________________ test_kernelspec_sub_apps ___________________________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7fd0a61aaa60>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @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()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.030088617000728846
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_U...rning: unclosed <socket.socket fd=31, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=12>
func       = <function call_and_report.<locals>.<lambda> at 0x7fd0a61aaa60>
precise_start = 1164667.966333722
precise_stop = 1164667.996422339
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1711021645.4491625
stop       = 1711021645.4792528
when       = 'call'

/usr/lib/python3.9/site-packages/_pytest/runner.py:340:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.9/site-packages/_pytest/runner.py:240: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
        item       = <Function test_kernelspec_sub_apps>
        kwds       = {}
        runtest_hook = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.9/site-packages/pluggy/_hooks.py:501: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_kernelspec_sub_apps>}
        self       = <HookCaller 'pytest_runtest_call'>
/usr/lib/python3.9/site-packages/pluggy/_manager.py:119: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_kernelspec_sub_apps>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/usr/lib/python3.9/site-packages/_pytest/runner...in=<module '_pytest.unraisableexception' from '/usr/lib/python3.9/site-packages/_pytest/unraisableexception.py'>>, ...]
        self       = <_pytest.config.PytestPluginManager object at 0x7fd0aa382f10>
/usr/lib/python3.9/site-packages/_pytest/threadexception.py:87: in pytest_runtest_call
    yield from thread_exception_runtest_hook()
/usr/lib/python3.9/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook
    yield
        cm         = <_pytest.threadexception.catch_threading_exception object at 0x7fd0a6197df0>
/usr/lib/python3.9/site-packages/_pytest/unraisableexception.py:90: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def unraisable_exception_runtest_hook() -> Generator[None, None, None]:
        with catch_unraisable_exception() as cm:
            try:
                yield
            finally:
                if cm.unraisable:
                    if cm.unraisable.err_msg is not None:
                        err_msg = cm.unraisable.err_msg
                    else:
                        err_msg = "Exception ignored in"
                    msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                    msg += "".join(
                        traceback.format_exception(
                            cm.unraisable.exc_type,
                            cm.unraisable.exc_value,
                            cm.unraisable.exc_traceback,
                        )
                    )
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E                   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E
E                   Traceback (most recent call last):
E                     File "/usr/lib/python3.9/site-packages/traitlets/traitlets.py", line 632, in get
E                       value = obj._trait_values[self.name]
E                   KeyError: 'kernel_spec_manager'
E
E                   During handling of the above exception, another exception occurred:
E
E                   Traceback (most recent call last):
E                     File "/usr/lib/python3.9/site-packages/traitlets/traitlets.py", line 1931, in traits
E                       for name, trait in traits.items():
E                   ResourceWarning: unclosed <socket.socket fd=31, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fd0a61971f0>
err_msg    = 'Exception ignored in'
msg        = 'Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n\nTr...nResourceWarning: unclosed <socket.socket fd=31, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n'

/usr/lib/python3.9/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning
----------------------------- Captured stdout call -----------------------------
Available kernels:
  python3        /usr/lib/python3.9/site-packages/ipykernel/resources
  echo           /tmp/pytest-of-tkloczko/pytest-1064/test_kernelspec_sub_apps0/data/kernels/echo
  coconut_py     /home/tkloczko/.local/share/jupyter/kernels/coconut_py
  coconut_py2    /home/tkloczko/.local/share/jupyter/kernels/coconut_py2
  coconut_py3    /home/tkloczko/.local/share/jupyter/kernels/coconut_py3
Removed /tmp/pytest-of-tkloczko/pytest-1064/test_kernelspec_sub_apps0/data/kernels/echo
Available kernels:
  python3        /usr/lib/python3.9/site-packages/ipykernel/resources
  coconut_py     /home/tkloczko/.local/share/jupyter/kernels/coconut_py
  coconut_py2    /home/tkloczko/.local/share/jupyter/kernels/coconut_py2
  coconut_py3    /home/tkloczko/.local/share/jupyter/kernels/coconut_py3
------------------------------ Captured log call -------------------------------
INFO     traitlets:kernelspec.py:407 Installed kernelspec kernels in /tmp/pytest-of-tkloczko/pytest-1064/test_kernelspec_sub_apps0/share/jupyter/kernels/kernels
============================= slowest 10 durations =============================
19.06s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
18.11s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.02s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
16.63s call     tests/test_restarter.py::test_restart_check[ipc]
16.62s call     tests/test_restarter.py::test_restart_check[tcp]
12.97s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
12.25s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
12.12s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
9.22s call     tests/test_restarter.py::test_async_restart_check[tcp]
=========================== short test summary info ============================
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
FAILED tests/test_kernelspecapp.py::test_kernelspec_sub_apps - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.sock...
============= 1 failed, 225 passed, 5 skipped in 357.40s (0:05:57) =============
/usr/lib/python3.9/site-packages/_pytest/pathlib.py:97: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9c1b49fe-b11d-45f4-a421-b5df7bd8c021/test_safe_get_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_get_no_perms0'
  warnings.warn(
/usr/lib/python3.9/site-packages/_pytest/pathlib.py:97: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9c1b49fe-b11d-45f4-a421-b5df7bd8c021/test_safe_set_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_set_no_perms0'
  warnings.warn(
/usr/lib/python3.9/site-packages/_pytest/pathlib.py:97: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9c1b49fe-b11d-45f4-a421-b5df7bd8c021/test_safe_delete_no_perms0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_safe_delete_no_perms0'
  warnings.warn(
/usr/lib/python3.9/site-packages/_pytest/pathlib.py:97: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9c1b49fe-b11d-45f4-a421-b5df7bd8c021/test_rmtree_errorhandler_rerai0
<class 'OSError'>: [Errno 39] Directory not empty: 'test_rmtree_errorhandler_rerai0'
  warnings.warn(
/usr/lib/python3.9/site-packages/_pytest/pathlib.py:97: PytestWarning: (rm_rf) error removing /tmp/pytest-of-tkloczko/garbage-9c1b49fe-b11d-45f4-a421-b5df7bd8c021
<class 'OSError'>: [Errno 39] Directory not empty: '/tmp/pytest-of-tkloczko/garbage-9c1b49fe-b11d-45f4-a421-b5df7bd8c021'
  warnings.warn(

@Apteryks
Copy link

I see 3 failing tests (4 if I include a skipped one):

[gw26] node down: Not properly terminated
[gw26] [ 99%] FAILED tests/test_client.py::TestThreadedKernelClient::test_shutdown /gnu/store/2nm8j4jwrcgcw0y51v64by4jp9cyz08a-python-pytest-asyncio-0.24.0/lib/python3.10/site-packages/pytest_asyncio/plugin.py:208: PytestDeprecationWarning: The configuration option "asyncio_default_fixture_loop_scope" is unset.
The event loop scope for asynchronous fixtures will default to the fixture caching scope. Future versions of pytest-asyncio will default the loop scope for asynchronous fixtures to function scope. Set the default fixture loop scope explicitly in order to avoid unexpected behavior in the future. Valid fixture loop scopes are: "function", "class", "module", "package", "session"

  warnings.warn(PytestDeprecationWarning(_DEFAULT_FIXTURE_LOOP_SCOPE_UNSET))


replacing crashed worker gw26

tests/test_client.py::TestThreadedKernelClient::test_shutdown_id 
[gw32] [100%] PASSED tests/test_client.py::TestThreadedKernelClient::test_shutdown_id 

=================================== FAILURES ===================================
________________ TestParallel.test_start_sequence_kernels[ipc] _________________
[gw12] linux -- Python 3.10.7 /gnu/store/jjzbav1s0x8lqg1aal13irspwwblwdf4-python-wrapper-3.10.7/bin/python

self = <tests.test_kernelmanager.TestParallel object at 0x7fffefb27100>
config = {'KernelManager': {'transport': 'ipc', 'ip': 'test'}}
install_kernel = None

    @pytest.mark.timeout(TIMEOUT)
    def test_start_sequence_kernels(self, config, install_kernel):
        """Ensure that a sequence of kernel startups doesn't break anything."""
>       self._run_signaltest_lifecycle(config)

config     = {'KernelManager': {'ip': 'test', 'transport': 'ipc'}}
install_kernel = None
self       = <tests.test_kernelmanager.TestParallel object at 0x7fffefb27100>

tests/test_kernelmanager.py:326: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/test_kernelmanager.py:386: in _run_signaltest_lifecycle
    kc = self._prepare_kernel(km, stdout=PIPE, stderr=PIPE)
        config     = {'KernelManager': {'ip': 'test', 'transport': 'ipc'}}
        km         = <jupyter_client.manager.KernelManager object at 0x7fffef8b1090>
        self       = <tests.test_kernelmanager.TestParallel object at 0x7fffefb27100>
tests/test_kernelmanager.py:376: in _prepare_kernel
    kc.wait_for_ready(timeout=startup_timeout)
        kc         = <jupyter_client.blocking.client.BlockingKernelClient object at 0x7fffef8b13c0>
        km         = <jupyter_client.manager.KernelManager object at 0x7fffef8b1090>
        kwargs     = {'stderr': -1, 'stdout': -1}
        self       = <tests.test_kernelmanager.TestParallel object at 0x7fffefb27100>
        startup_timeout = 60
/gnu/store/brb3nbjc8qfhr7hvygaqww8b5zirxciz-python-jupyter-core-5.7.2/lib/python3.10/site-packages/jupyter_core/utils/__init__.py:165: in wrapped
    return loop.run_until_complete(inner)
        args       = (<jupyter_client.blocking.client.BlockingKernelClient object at 0x7fffef8b13c0>,)
        coro       = <function KernelClient._async_wait_for_ready at 0x7ffff513cb80>
        inner      = <coroutine object KernelClient._async_wait_for_ready at 0x7fffef8714d0>
        kwargs     = {'timeout': 60}
        loop       = <_UnixSelectorEventLoop running=False closed=False debug=False>
        name       = 'MainThread'
/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
    return future.result()
        future     = <Task finished name='Task-11' coro=<KernelClient._async_wait_for_ready() done, defined at /tmp/guix-build-python-jupyter-client-8.6.3.drv-0/jupyter_client-8.6.3/jupyter_client/client.py:157> exception=ValueError("Invalid Signature: b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e'")>
        new_task   = True
        self       = <_UnixSelectorEventLoop running=False closed=False debug=False>
jupyter_client/client.py:194: in _async_wait_for_ready
    await ensure_async(self.iopub_channel.get_msg(timeout=0.2))
        KernelManager = <class 'jupyter_client.manager.KernelManager'>
        abs_timeout = 1732931434.8388157
        msg        = {'buffers': [],
 'content': {'banner': '',
             'help_links': [],
             'implementation': 'signaltest',
             'implementation_version': '0.0',
             'language_info': {},
             'protocol_version': '5.3',
             'status': 'ok'},
 'header': {'date': datetime.datetime(2024, 11, 30, 1, 49, 37, 155749, tzinfo=tzutc()),
            'msg_id': '6438c888-b36d1bf8e94517fa8ae02157_456_2',
            'msg_type': 'kernel_info_reply',
            'session': '6438c888-b36d1bf8e94517fa8ae02157',
            'username': 'username',
            'version': '5.3'},
 'metadata': {},
 'msg_id': '6438c888-b36d1bf8e94517fa8ae02157_456_2',
 'msg_type': 'kernel_info_reply',
 'parent_header': {'date': datetime.datetime(2024, 11, 30, 1, 49, 35, 839734, tzinfo=tzutc()),
                   'msg_id': 'e5b18c6b-f234552d630a59b5157f5bb3_90_1',
                   'msg_type': 'kernel_info_request',
                   'session': 'e5b18c6b-f234552d630a59b5157f5bb3',
                   'username': 'username',
                   'version': '5.3'}}
        self       = <jupyter_client.blocking.client.BlockingKernelClient object at 0x7fffef8b13c0>
        timeout    = 60
jupyter_client/channels.py:229: in get_msg
    res = self._recv()
        ready      = 1
        self       = <jupyter_client.channels.ZMQSocketChannel object at 0x7fffef8b28c0>
        timeout    = 0.2
        timeout_ms = 200
jupyter_client/channels.py:221: in _recv
    return self.session.deserialize(smsg)
        ident      = [b'kernel.90b4d2d9-8779-41f6-b5c2-6f4e42d4d1dc.status']
        kwargs     = {}
        msg        = [b'kernel.90b4d2d9-8779-41f6-b5c2-6f4e42d4d1dc.status',
 b'<IDS|MSG>',
 b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e',
 b'{"msg_id": "f46d8c07-c2b676cbb53353958a4f75b1_454_0", "msg_type": "status", '
 b'"username": "username", "session": "f46d8c07-c2b676cbb53353958a4f75b1", "dat'
 b'e": "2024-11-30T01:49:35.141396Z", "version": "5.3"}',
 b'{}',
 b'{}',
 b'{"execution_state": "starting"}']
        self       = <jupyter_client.channels.ZMQSocketChannel object at 0x7fffef8b28c0>
        smsg       = [b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e',
 b'{"msg_id": "f46d8c07-c2b676cbb53353958a4f75b1_454_0", "msg_type": "status", '
 b'"username": "username", "session": "f46d8c07-c2b676cbb53353958a4f75b1", "dat'
 b'e": "2024-11-30T01:49:35.141396Z", "version": "5.3"}',
 b'{}',
 b'{}',
 b'{"execution_state": "starting"}']
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <jupyter_client.session.Session object at 0x7fffef8b2830>
msg_list = [b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e', b'{"msg_id": "f46d8c07-c2b676cbb53353958a4f75b1_...8a4f75b1", "date": "2024-11-30T01:49:35.141396Z", "version": "5.3"}', b'{}', b'{}', b'{"execution_state": "starting"}']
content = True, copy = True

    def deserialize(
        self,
        msg_list: list[bytes] | list[zmq.Message],
        content: bool = True,
        copy: bool = True,
    ) -> dict[str, t.Any]:
        """Unserialize a msg_list to a nested message dict.
    
        This is roughly the inverse of serialize. The serialize/deserialize
        methods work with full message lists, whereas pack/unpack work with
        the individual message parts in the message list.
    
        Parameters
        ----------
        msg_list : list of bytes or Message objects
            The list of message parts of the form [HMAC,p_header,p_parent,
            p_metadata,p_content,buffer1,buffer2,...].
        content : bool (True)
            Whether to unpack the content dict (True), or leave it packed
            (False).
        copy : bool (True)
            Whether msg_list contains bytes (True) or the non-copying Message
            objects in each place (False).
    
        Returns
        -------
        msg : dict
            The nested message dict with top-level keys [header, parent_header,
            content, buffers].  The buffers are returned as memoryviews.
        """
        minlen = 5
        message = {}
        if not copy:
            # pyzmq didn't copy the first parts of the message, so we'll do it
            msg_list = t.cast(t.List[zmq.Message], msg_list)
            msg_list_beginning = [bytes(msg.bytes) for msg in msg_list[:minlen]]
            msg_list = t.cast(t.List[bytes], msg_list)
            msg_list = msg_list_beginning + msg_list[minlen:]
        msg_list = t.cast(t.List[bytes], msg_list)
        if self.auth is not None:
            signature = msg_list[0]
            if not signature:
                msg = "Unsigned Message"
                raise ValueError(msg)
            if signature in self.digest_history:
                raise ValueError("Duplicate Signature: %r" % signature)
            if content:
                # Only store signature if we are unpacking content, don't store if just peeking.
                self._add_digest(signature)
            check = self.sign(msg_list[1:5])
            if not compare_digest(signature, check):
                msg = "Invalid Signature: %r" % signature
>               raise ValueError(msg)
E               ValueError: Invalid Signature: b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e'

check      = b'a3e7c2cda22e8d843141df3cad0c2e50a2aae3c37a1a843cdd1fdc5dd64bbcf5'
content    = True
copy       = True
message    = {}
minlen     = 5
msg        = ('Invalid Signature: '
 "b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e'")
msg_list   = [b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e',
 b'{"msg_id": "f46d8c07-c2b676cbb53353958a4f75b1_454_0", "msg_type": "status", '
 b'"username": "username", "session": "f46d8c07-c2b676cbb53353958a4f75b1", "dat'
 b'e": "2024-11-30T01:49:35.141396Z", "version": "5.3"}',
 b'{}',
 b'{}',
 b'{"execution_state": "starting"}']
self       = <jupyter_client.session.Session object at 0x7fffef8b2830>
signature  = b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e'

jupyter_client/session.py:1074: ValueError
________________________ test_async_restart_check[ipc] _________________________
[gw6] linux -- Python 3.10.7 /gnu/store/jjzbav1s0x8lqg1aal13irspwwblwdf4-python-wrapper-3.10.7/bin/python

config = {'KernelManager': {'transport': 'ipc', 'ip': 'test'}, 'KernelRestarter': {'restart_limit': 1, 'debug': True}}
install_kernel = 'problemtest', debug_logging = None

    async def test_async_restart_check(config, install_kernel, debug_logging):
        """Test that the kernel is restarted and recovers"""
        # If this test fails, run it with --log-cli-level=DEBUG to inspect
        N_restarts = 1
        config.KernelRestarter.restart_limit = N_restarts
        config.KernelRestarter.debug = True
        km = AsyncIOLoopKernelManager(kernel_name=install_kernel, config=config)
    
        cbs = 0
        restarts: list = [asyncio.Future() for i in range(N_restarts)]
    
        def cb():
            nonlocal cbs
            if cbs >= N_restarts:
                raise RuntimeError("Kernel restarted more than %d times!" % N_restarts)
            restarts[cbs].set_result(True)
            cbs += 1
    
        try:
            await km.start_kernel()
            km.add_restart_callback(cb, "restart")
        except BaseException:
            if km.has_kernel:
                await km.shutdown_kernel()
            raise
    
        try:
            for i in range(N_restarts + 1):
                kc = km.client()
                kc.start_channels()
>               await kc.wait_for_ready(timeout=60)

N_restarts = 1
cb         = <function test_async_restart_check.<locals>.cb at 0x7fffef940940>
cbs        = 0
config     = {'KernelManager': {'ip': 'test', 'transport': 'ipc'},
 'KernelRestarter': {'debug': True, 'restart_limit': 1}}
debug_logging = None
i          = 0
install_kernel = 'problemtest'
kc         = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7fffef8b28c0>
km         = <jupyter_client.ioloop.manager.AsyncIOLoopKernelManager object at 0x7fffef8b1930>
restarts   = [<Future pending>]

tests/test_restarter.py:219: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
jupyter_client/client.py:194: in _async_wait_for_ready
    await ensure_async(self.iopub_channel.get_msg(timeout=0.2))
        KernelManager = <class 'jupyter_client.manager.KernelManager'>
        abs_timeout = 1732931437.6960826
        msg        = {'buffers': [],
 'content': {'banner': '',
             'help_links': [],
             'implementation': 'problemtest',
             'implementation_version': '0.0',
             'language_info': {},
             'protocol_version': '5.3',
             'status': 'ok'},
 'header': {'date': datetime.datetime(2024, 11, 30, 1, 49, 39, 977515, tzinfo=tzutc()),
            'msg_id': '08b7dde4-14d6ca65b798a636e0029306_1158_2',
            'msg_type': 'kernel_info_reply',
            'session': '08b7dde4-14d6ca65b798a636e0029306',
            'username': 'username',
            'version': '5.3'},
 'metadata': {},
 'msg_id': '08b7dde4-14d6ca65b798a636e0029306_1158_2',
 'msg_type': 'kernel_info_reply',
 'parent_header': {'date': datetime.datetime(2024, 11, 30, 1, 49, 38, 697480, tzinfo=tzutc()),
                   'msg_id': 'd2d9f91f-fb41fd0296ad2e292961d657_67_1',
                   'msg_type': 'kernel_info_request',
                   'session': 'd2d9f91f-fb41fd0296ad2e292961d657',
                   'username': 'username',
                   'version': '5.3'}}
        self       = <jupyter_client.asynchronous.client.AsyncKernelClient object at 0x7fffef8b28c0>
        timeout    = 60
/gnu/store/brb3nbjc8qfhr7hvygaqww8b5zirxciz-python-jupyter-core-5.7.2/lib/python3.10/site-packages/jupyter_core/utils/__init__.py:198: in ensure_async
    result = await obj
        obj        = <coroutine object AsyncZMQSocketChannel.get_msg at 0x7fffef89b060>
jupyter_client/channels.py:310: in get_msg
    res = await self._recv()
        ready      = 1
        self       = <jupyter_client.channels.AsyncZMQSocketChannel object at 0x7fffef8b0100>
        timeout    = 0.2
        timeout_ms = 200
jupyter_client/channels.py:300: in _recv
    return self.session.deserialize(smsg)
        _          = [b'kernel.62ed45c0-a83e-4a62-b7b1-93eec77b07e6.status']
        kwargs     = {}
        msg        = [b'kernel.62ed45c0-a83e-4a62-b7b1-93eec77b07e6.status',
 b'<IDS|MSG>',
 b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92',
 b'{"msg_id": "cdd75985-aaeece18165ad0d3db1b4c30_1123_4", "msg_type": "status",'
 b' "username": "username", "session": "cdd75985-aaeece18165ad0d3db1b4c30", "da'
 b'te": "2024-11-30T01:49:37.874315Z", "version": "5.3"}',
 b'{"msg_id": "bae9a159-9554c0a492d5d6050f54422f_163_0", "msg_type": "shutdown_'
 b'request", "username": "username", "session": "bae9a159-9554c0a492d5d6050f544'
 b'22f", "date": "2024-11-30T01:49:37.550464Z", "version": "5.3"}',
 b'{}',
 b'{"execution_state": "idle"}']
        self       = <jupyter_client.channels.AsyncZMQSocketChannel object at 0x7fffef8b0100>
        smsg       = [b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92',
 b'{"msg_id": "cdd75985-aaeece18165ad0d3db1b4c30_1123_4", "msg_type": "status",'
 b' "username": "username", "session": "cdd75985-aaeece18165ad0d3db1b4c30", "da'
 b'te": "2024-11-30T01:49:37.874315Z", "version": "5.3"}',
 b'{"msg_id": "bae9a159-9554c0a492d5d6050f54422f_163_0", "msg_type": "shutdown_'
 b'request", "username": "username", "session": "bae9a159-9554c0a492d5d6050f544'
 b'22f", "date": "2024-11-30T01:49:37.550464Z", "version": "5.3"}',
 b'{}',
 b'{"execution_state": "idle"}']
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <jupyter_client.session.Session object at 0x7fffef8b3e80>
msg_list = [b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92', b'{"msg_id": "cdd75985-aaeece18165ad0d3db1b4c30_...0a492d5d6050f54422f", "date": "2024-11-30T01:49:37.550464Z", "version": "5.3"}', b'{}', b'{"execution_state": "idle"}']
content = True, copy = True

    def deserialize(
        self,
        msg_list: list[bytes] | list[zmq.Message],
        content: bool = True,
        copy: bool = True,
    ) -> dict[str, t.Any]:
        """Unserialize a msg_list to a nested message dict.
    
        This is roughly the inverse of serialize. The serialize/deserialize
        methods work with full message lists, whereas pack/unpack work with
        the individual message parts in the message list.
    
        Parameters
        ----------
        msg_list : list of bytes or Message objects
            The list of message parts of the form [HMAC,p_header,p_parent,
            p_metadata,p_content,buffer1,buffer2,...].
        content : bool (True)
            Whether to unpack the content dict (True), or leave it packed
            (False).
        copy : bool (True)
            Whether msg_list contains bytes (True) or the non-copying Message
            objects in each place (False).
    
        Returns
        -------
        msg : dict
            The nested message dict with top-level keys [header, parent_header,
            content, buffers].  The buffers are returned as memoryviews.
        """
        minlen = 5
        message = {}
        if not copy:
            # pyzmq didn't copy the first parts of the message, so we'll do it
            msg_list = t.cast(t.List[zmq.Message], msg_list)
            msg_list_beginning = [bytes(msg.bytes) for msg in msg_list[:minlen]]
            msg_list = t.cast(t.List[bytes], msg_list)
            msg_list = msg_list_beginning + msg_list[minlen:]
        msg_list = t.cast(t.List[bytes], msg_list)
        if self.auth is not None:
            signature = msg_list[0]
            if not signature:
                msg = "Unsigned Message"
                raise ValueError(msg)
            if signature in self.digest_history:
                raise ValueError("Duplicate Signature: %r" % signature)
            if content:
                # Only store signature if we are unpacking content, don't store if just peeking.
                self._add_digest(signature)
            check = self.sign(msg_list[1:5])
            if not compare_digest(signature, check):
                msg = "Invalid Signature: %r" % signature
>               raise ValueError(msg)
E               ValueError: Invalid Signature: b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92'

check      = b'bcc1fdaa8346cb5cd6ebde89cac0a28efc397d13a1f00567b2e1cc5fcbc25947'
content    = True
copy       = True
message    = {}
minlen     = 5
msg        = ('Invalid Signature: '
 "b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92'")
msg_list   = [b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92',
 b'{"msg_id": "cdd75985-aaeece18165ad0d3db1b4c30_1123_4", "msg_type": "status",'
 b' "username": "username", "session": "cdd75985-aaeece18165ad0d3db1b4c30", "da'
 b'te": "2024-11-30T01:49:37.874315Z", "version": "5.3"}',
 b'{"msg_id": "bae9a159-9554c0a492d5d6050f54422f_163_0", "msg_type": "shutdown_'
 b'request", "username": "username", "session": "bae9a159-9554c0a492d5d6050f544'
 b'22f", "date": "2024-11-30T01:49:37.550464Z", "version": "5.3"}',
 b'{}',
 b'{"execution_state": "idle"}']
self       = <jupyter_client.session.Session object at 0x7fffef8b3e80>
signature  = b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92'

jupyter_client/session.py:1074: ValueError
------------------------------ Captured log call -------------------------------
DEBUG    traitlets:factory.py:95 Instantiating kernel 'Problematic Test Kernel' with kernel provisioner: local-provisioner
DEBUG    traitlets:manager.py:438 Starting kernel: ['/gnu/store/jjzbav1s0x8lqg1aal13irspwwblwdf4-python-wrapper-3.10.7/bin/python', '-m', 'tests.problemkernel', '-f', '/tmp/guix-build-python-jupyter-client-8.6.3.drv-0/tmp326tua4z.json']
DEBUG    traitlets:connect.py:653 Connecting to: ipc://test-9
DEBUG    traitlets:client.py:366 connecting iopub channel to ipc://test-7
DEBUG    traitlets:connect.py:653 Connecting to: ipc://test-7
DEBUG    traitlets:client.py:354 connecting shell channel to ipc://test-6
DEBUG    traitlets:connect.py:653 Connecting to: ipc://test-6
DEBUG    traitlets:client.py:378 connecting stdin channel to ipc://test-8
DEBUG    traitlets:connect.py:653 Connecting to: ipc://test-8
DEBUG    traitlets:client.py:390 connecting heartbeat channel to ipc://test-10
DEBUG    traitlets:client.py:401 connecting control channel to ipc://test-9
DEBUG    traitlets:connect.py:653 Connecting to: ipc://test-9
_____________________________ tests/test_client.py _____________________________
[gw26] linux -- Python 3.10.7 /gnu/store/jjzbav1s0x8lqg1aal13irspwwblwdf4-python-wrapper-3.10.7/bin/python
worker 'gw26' crashed while running 'tests/test_client.py::TestThreadedKernelClient::test_shutdown'
============================= slowest 10 durations =============================
18.05s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.05s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
15.73s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
13.53s call     tests/test_restarter.py::test_restart_check[ipc]
13.50s call     tests/test_restarter.py::test_restart_check[tcp]
12.03s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
11.11s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
7.98s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_signal_kernel_subprocesses[signaltest-no-terminate-install_kernel_dont_terminate-_ShutdownStatus.SigkillRequest]
7.80s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_async_signal_kernel_subprocesses[signaltest-no-terminate-install_kernel_dont_terminate-_ShutdownStatus.SigkillRequest]
6.03s call     tests/test_restarter.py::test_restarter_gives_up[ipc]
=========================== short test summary info ============================
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_session.py:433: could not import 'msgpack': No module named 'msgpack'
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
FAILED tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc] - ValueError: Invalid Signature: b'85e4db6bff067e1e1a7ef1a8ec6b0f728def7b6c4f5886e44e99da95e81ebe1e'
FAILED tests/test_restarter.py::test_async_restart_check[ipc] - ValueError: Invalid Signature: b'266f0e935464492dba301def55a392d07a12549308571aa2e4e81e035019ba92'
FAILED tests/test_client.py::TestThreadedKernelClient::test_shutdown
============= 3 failed, 220 passed, 4 skipped in 106.55s (0:01:46) =============
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "pytest" arguments: ("-vv" "-n" "32" "-k" "not test_start_parallel_process_kernels") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `check' failed after 106.8 seconds

This is with Python 3.10, Jupyter-client 8.6.3 and the following dependencies:

@Apteryks
Copy link

Apteryks commented Nov 30, 2024

Note that I use pytest-xdist to run the test suite, as it's otherwise rather long. Perhaps there are some concurrency issues between the tests, as suggested by this new failure:

FAILED tests/test_restarter.py::test_restart_check[tcp] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

Traceback (most recent call last):
  File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/threading.py", line 241, in __init__
    self.acquire = lock.acquire
ResourceWarning: unclosed <socket.socket fd=21, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
FAILED tests/test_restarter.py::test_restart_check[ipc] - RuntimeError: This event loop is already running

@Apteryks
Copy link

Reverting the use of pytest-xdist (running tests serially), and updating python-traitlets to its latest version I'm down to a single test failure:

=================================== FAILURES ===================================
________ TestAsyncKernelManager.test_lifecycle[AsyncKernelManager-ipc] _________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_and_report.<locals>.<lambda> at 0x7ffff5a01b40>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
    ) -> CallInfo[TResult]:
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :type func: Callable[[], _pytest.runner.TResult]
        :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: TResult | None = func()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.24741219799034297
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=Socke...ResourceWarning: unclosed <socket.socket fd=33, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=12>
func       = <function call_and_report.<locals>.<lambda> at 0x7ffff5a01b40>
precise_start = 478575.254886651
precise_stop = 478575.502298849
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1732933881.1904986
stop       = 1732933881.4379115
when       = 'call'

/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/runner.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/runner.py:242: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
        item       = <Function test_lifecycle[AsyncKernelManager-ipc]>
        kwds       = {}
        runtest_hook = <HookCaller 'pytest_runtest_call'>
/gnu/store/6bf3jgn97is89karcsvdshfv3cy7syrg-python-pluggy-1.5.0/lib/python3.10/site-packages/pluggy/_hooks.py:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_lifecycle[AsyncKernelManager-ipc]>}
        self       = <HookCaller 'pytest_runtest_call'>
/gnu/store/6bf3jgn97is89karcsvdshfv3cy7syrg-python-pluggy-1.5.0/lib/python3.10/site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_lifecycle[AsyncKernelManager-ipc]>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/runner.py'>>,
 <HookImpl plugin_name='skipping', plugin=<module '_pytest.skipping' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/skipping.py'>>,
 <HookImpl plugin_name='hypothesispytest', plugin=<module '_hypothesis_pytestplugin' from '/gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/_hypothesis_pytestplugin.py'>>,
 <HookImpl plugin_name='timeout', plugin=<module 'pytest_timeout' from '/gnu/store/ifyg2862z8llcmhmi9mz10x7x41m6fsz-python-pytest-timeout-2.3.1/lib/python3.10/site-packages/pytest_timeout.py'>>,
 <HookImpl plugin_name='capturemanager', plugin=<CaptureManager _method='fd' _global_capturing=<MultiCapture out=<FDCapture 1 oldfd=5 _state='suspended' tmpfile=<_io.TextIOWrapper name="<_io.FileIO name=6 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>> err=<FDCapture 2 oldfd=7 _state='suspended' tmpfile=<_io.TextIOWrapper name="<_io.FileIO name=8 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>> in_=<FDCapture 0 oldfd=3 _state='started' tmpfile=<_io.TextIOWrapper name='/dev/null' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>,
 <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7ffff599cac0>>,
 <HookImpl plugin_name='unraisableexception', plugin=<module '_pytest.unraisableexception' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/unraisableexception.py'>>,
 <HookImpl plugin_name='threadexception', plugin=<module '_pytest.threadexception' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/threadexception.py'>>]
        self       = <_pytest.config.PytestPluginManager object at 0x7ffff7689d50>
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/threadexception.py:92: in pytest_runtest_call
    yield from thread_exception_runtest_hook()
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/threadexception.py:68: in thread_exception_runtest_hook
    yield
        cm         = <_pytest.threadexception.catch_threading_exception object at 0x7ffff431a230>
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/unraisableexception.py:95: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def unraisable_exception_runtest_hook() -> Generator[None]:
        with catch_unraisable_exception() as cm:
            try:
                yield
            finally:
                if cm.unraisable:
                    if cm.unraisable.err_msg is not None:
                        err_msg = cm.unraisable.err_msg
                    else:
                        err_msg = "Exception ignored in"
                    msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                    msg += "".join(
                        traceback.format_exception(
                            cm.unraisable.exc_type,
                            cm.unraisable.exc_value,
                            cm.unraisable.exc_traceback,
                        )
                    )
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E                   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E                   
E                   Traceback (most recent call last):
E                     File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/subprocess.py", line 1698, in _execute_child
E                       elif isinstance(args, os.PathLike):
E                   ResourceWarning: unclosed <socket.socket fd=33, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7ffff4319240>
err_msg    = 'Exception ignored in'
msg        = ('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, '
 'type=SocketKind.SOCK_STREAM, proto=0>\n'
 '\n'
 'Traceback (most recent call last):\n'
 '  File '
 '"/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/subprocess.py", '
 'line 1698, in _execute_child\n'
 '    elif isinstance(args, os.PathLike):\n'
 'ResourceWarning: unclosed <socket.socket fd=33, '
 'family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n')

/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning

@Apteryks
Copy link

The test_lifecycle test failure shown above appears to happen only when the test is run in a container isolated from the network (basic local networking, but no resolver or external connectivity); but I've now seen this one failing:

================================================== FAILURES ==================================================
____________________________ TestAsyncKernelManager.test_subclass_callables[ipc] _____________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_and_report.<locals>.<lambda> at 0x7fac2c592680>
when = 'call', reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: Callable[[], TResult],
        when: Literal["collect", "setup", "call", "teardown"],
        reraise: type[BaseException] | tuple[type[BaseException], ...] | None = None,
    ) -> CallInfo[TResult]:
        """Call func, wrapping the result in a CallInfo.
    
        :param func:
            The function to call. Called without arguments.
        :type func: Callable[[], _pytest.runner.TResult]
        :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: TResult | None = func()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.2478470389614813
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=Socke...ResourceWarning: unclosed <socket.socket fd=40, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n') tblen=12>
func       = <function call_and_report.<locals>.<lambda> at 0x7fac2c592680>
precise_start = 479228.140075783
precise_stop = 479228.387922822
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1732934534.0756876
stop       = 1732934534.3235357
when       = 'call'

/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/runner.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/runner.py:242: in <lambda>
    lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise
        item       = <Function test_subclass_callables[ipc]>
        kwds       = {}
        runtest_hook = <HookCaller 'pytest_runtest_call'>
/gnu/store/6bf3jgn97is89karcsvdshfv3cy7syrg-python-pluggy-1.5.0/lib/python3.10/site-packages/pluggy/_hooks.py:513: in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
        firstresult = False
        kwargs     = {'item': <Function test_subclass_callables[ipc]>}
        self       = <HookCaller 'pytest_runtest_call'>
/gnu/store/6bf3jgn97is89karcsvdshfv3cy7syrg-python-pluggy-1.5.0/lib/python3.10/site-packages/pluggy/_manager.py:120: in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
        firstresult = False
        hook_name  = 'pytest_runtest_call'
        kwargs     = {'item': <Function test_subclass_callables[ipc]>}
        methods    = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/runner.py'>>,
 <HookImpl plugin_name='skipping', plugin=<module '_pytest.skipping' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/skipping.py'>>,
 <HookImpl plugin_name='hypothesispytest', plugin=<module '_hypothesis_pytestplugin' from '/gnu/store/fxbzrh50d30d0digfi61azzz0hc9j2qx-python-hypothesis-6.121.0/lib/python3.10/site-packages/_hypothesis_pytestplugin.py'>>,
 <HookImpl plugin_name='timeout', plugin=<module 'pytest_timeout' from '/gnu/store/ifyg2862z8llcmhmi9mz10x7x41m6fsz-python-pytest-timeout-2.3.1/lib/python3.10/site-packages/pytest_timeout.py'>>,
 <HookImpl plugin_name='capturemanager', plugin=<CaptureManager _method='fd' _global_capturing=<MultiCapture out=<FDCapture 1 oldfd=5 _state='suspended' tmpfile=<_io.TextIOWrapper name="<_io.FileIO name=6 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>> err=<FDCapture 2 oldfd=7 _state='suspended' tmpfile=<_io.TextIOWrapper name="<_io.FileIO name=8 mode='rb+' closefd=True>" mode='r+' encoding='utf-8'>> in_=<FDCapture 0 oldfd=3 _state='started' tmpfile=<_io.TextIOWrapper name='/dev/null' mode='r' encoding='utf-8'>> _state='suspended' _in_suspended=False> _capture_fixture=None>>,
 <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7fac3076cac0>>,
 <HookImpl plugin_name='unraisableexception', plugin=<module '_pytest.unraisableexception' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/unraisableexception.py'>>,
 <HookImpl plugin_name='threadexception', plugin=<module '_pytest.threadexception' from '/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/threadexception.py'>>]
        self       = <_pytest.config.PytestPluginManager object at 0x7fac32426da0>
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/threadexception.py:92: in pytest_runtest_call
    yield from thread_exception_runtest_hook()
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/threadexception.py:68: in thread_exception_runtest_hook
    yield
        cm         = <_pytest.threadexception.catch_threading_exception object at 0x7fac2f028f10>
/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/unraisableexception.py:95: in pytest_runtest_call
    yield from unraisable_exception_runtest_hook()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    def unraisable_exception_runtest_hook() -> Generator[None]:
        with catch_unraisable_exception() as cm:
            try:
                yield
            finally:
                if cm.unraisable:
                    if cm.unraisable.err_msg is not None:
                        err_msg = cm.unraisable.err_msg
                    else:
                        err_msg = "Exception ignored in"
                    msg = f"{err_msg}: {cm.unraisable.object!r}\n\n"
                    msg += "".join(
                        traceback.format_exception(
                            cm.unraisable.exc_type,
                            cm.unraisable.exc_value,
                            cm.unraisable.exc_traceback,
                        )
                    )
>                   warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
E                   pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
E                   
E                   Traceback (most recent call last):
E                     File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/contextlib.py", line 501, in callback
E                       _exit_wrapper = self._create_cb_wrapper(callback, *args, **kwds)
E                   ResourceWarning: unclosed <socket.socket fd=40, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

cm         = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fac2f02a4a0>
err_msg    = 'Exception ignored in'
msg        = ('Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, '
 'type=SocketKind.SOCK_STREAM, proto=0>\n'
 '\n'
 'Traceback (most recent call last):\n'
 '  File '
 '"/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/contextlib.py", '
 'line 501, in callback\n'
 '    _exit_wrapper = self._create_cb_wrapper(callback, *args, **kwds)\n'
 'ResourceWarning: unclosed <socket.socket fd=40, '
 'family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>\n')

/gnu/store/8n90wgqnr0ndvpcdpa768yncxkb8fg72-python-pytest-8.3.3/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning
============================================ slowest 10 durations ============================================
18.05s call     tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.05s call     tests/test_restarter.py::test_async_restarter_gives_up[tcp]
17.05s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
16.60s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
13.54s call     tests/test_restarter.py::test_restart_check[tcp]
13.54s call     tests/test_restarter.py::test_restart_check[ipc]
11.13s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
11.04s call     tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
10.13s call     tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
7.77s call     tests/test_kernelmanager.py::TestKernelManagerShutDownGracefully::test_async_signal_kernel_subprocesses[signaltest-no-terminate-install_kernel_dont_terminate-_ShutdownStatus.SigkillRequest]
========================================== short test summary info ===========================================
SKIPPED [1] tests/test_client.py:238: Not supported
SKIPPED [1] tests/test_kernelmanager.py:333: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:349: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_kernelmanager.py:365: IPC transport is currently not working for this test!
SKIPPED [1] tests/test_multikernelmanager.py:167: Kernel refuses to start in process pool
SKIPPED [1] tests/test_session.py:433: could not import 'msgpack': No module named 'msgpack'
FAILED tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_callables[ipc] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

Traceback (most recent call last):
  File "/gnu/store/jjcka1g6sk2cvwx8nm4fdwpdq3vll0v0-python-3.10.7/lib/python3.10/contextlib.py", line 501, in callback
    _exit_wrapper = self._create_cb_wrapper(callback, *args, **kwds)
ResourceWarning: unclosed <socket.socket fd=40, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
============================ 1 failed, 224 passed, 6 skipped in 291.59s (0:04:51) ============================

@Apteryks
Copy link

Ugh, it seems some tests fail non-deterministically (flaky); I've just seen now:

FAILED tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>

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

No branches or pull requests

2 participants