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

6.2.0: pytest warnings #661

Closed
kloczek opened this issue Jun 20, 2021 · 4 comments
Closed

6.2.0: pytest warnings #661

kloczek opened this issue Jun 20, 2021 · 4 comments

Comments

@kloczek
Copy link

kloczek commented Jun 20, 2021

After deselecting all units which are failing because missing ikenel module in build env I found some wanrings:

=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-6.2.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, Faker-8.8.1
collected 165 items / 62 deselected / 103 selected

. .                                                                                                                                                                  [  0%]
jupyter_client/tests/test_adapter.py ...........................                                                                                                     [ 27%]
jupyter_client/tests/test_client.py ssssssss                                                                                                                         [ 35%]
jupyter_client/tests/test_connect.py ...........                                                                                                                     [ 46%]
jupyter_client/tests/test_jsonutil.py ....                                                                                                                           [ 50%]
jupyter_client/tests/test_kernelmanager.py .....s......                                                                                                              [ 62%]
jupyter_client/tests/test_kernelspec.py ..........                                                                                                                   [ 72%]
jupyter_client/tests/test_localinterfaces.py .                                                                                                                       [ 73%]
jupyter_client/tests/test_manager.py .                                                                                                                               [ 74%]
jupyter_client/tests/test_public_api.py ....                                                                                                                         [ 78%]
jupyter_client/tests/test_session.py .....................                                                                                                           [ 99%]
jupyter_client/tests/test_ssh.py .                                                                                                                                   [100%]

============================================================================= warnings summary =============================================================================
jupyter_client/tests/test_session.py::TestSession::test_tracking
  /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:101: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
    self.io_loop = io_loop or IOLoop.current()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [8] jupyter_client/tests/test_client.py:29: Skipped
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:390: IPC transport is currently not working for this test!
========================================================= 92 passed, 9 skipped, 62 deselected, 1 warning in 8.69s ==========================================================
[tkloczko@barrel SPECS]$ pip show pyzmq| grep Version
Version: 22.1.0
@kloczek
Copy link
Author

kloczek commented Jun 20, 2021

pytest errors and warnings when ikernel is installed

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-6.2.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-6.2.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ PYTHONDONTWRITEBYTECODE=1
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
benchmark: 3.4.1 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-6.2.0
plugins: forked-1.3.0, shutil-1.7.0, virtualenv-1.7.0, expect-1.1.0, httpbin-1.0.0, flake8-1.0.7, timeout-1.4.2, betamax-0.8.1, freezegun-0.4.2, case-1.5.3, isort-1.3.0, aspectlib-1.5.2, asyncio-0.15.1, toolbox-0.5, xprocess-0.17.1, aiohttp-0.3.0, checkdocs-2.7.0, mock-3.6.1, rerunfailures-9.1.1, requests-mock-1.9.3, cov-2.12.1, pyfakefs-4.5.0, cases-3.6.1, flaky-3.7.0, hypothesis-6.14.0, benchmark-3.4.1, xdist-2.3.0, Faker-8.8.1
collected 165 items

. .                                                                                                                                                                  [  0%]
jupyter_client/tests/test_adapter.py ...........................                                                                                                     [ 17%]
jupyter_client/tests/test_client.py ........                                                                                                                         [ 22%]
jupyter_client/tests/test_connect.py ...........                                                                                                                     [ 28%]
jupyter_client/tests/test_jsonutil.py ....                                                                                                                           [ 31%]
jupyter_client/tests/test_kernelapp.py .                                                                                                                             [ 31%]
jupyter_client/tests/test_kernelmanager.py .....................s.s.s..................FF..                                                                          [ 61%]
jupyter_client/tests/test_kernelspec.py ...........                                                                                                                  [ 68%]
jupyter_client/tests/test_localinterfaces.py .                                                                                                                       [ 68%]
jupyter_client/tests/test_manager.py .                                                                                                                               [ 69%]
jupyter_client/tests/test_multikernelmanager.py ........................                                                                                             [ 84%]
jupyter_client/tests/test_public_api.py ....                                                                                                                         [ 86%]
jupyter_client/tests/test_session.py .....................                                                                                                           [ 99%]
jupyter_client/tests/test_ssh.py .                                                                                                                                   [100%]

================================================================================= FAILURES =================================================================================
__________________________________________________________ TestAsyncKernelManager.test_signal_kernel_subprocesses __________________________________________________________

self = <jupyter_client.tests.test_kernelmanager.TestAsyncKernelManager object at 0x7f48cd5f07f0>, install_kernel = None
start_async_kernel = <async_generator._impl.AsyncGenerator object at 0x7f48cd5e5160>

    @pytest.mark.timeout(10)
    @pytest.mark.skipif(sys.platform == "win32", reason="Windows doesn't support signals")
    async def test_signal_kernel_subprocesses(self, install_kernel, start_async_kernel):

>       km, kc = start_async_kernel
E       TypeError: cannot unpack non-iterable AsyncGenerator object

jupyter_client/tests/test_kernelmanager.py:491: TypeError
____________________________________________________________ TestAsyncKernelManager.test_start_new_async_kernel ____________________________________________________________

self = <jupyter_client.tests.test_kernelmanager.TestAsyncKernelManager object at 0x7f48cd5f0e20>, install_kernel = None
start_async_kernel = <async_generator._impl.AsyncGenerator object at 0x7f48cd5f0d90>

    @pytest.mark.timeout(10)
    async def test_start_new_async_kernel(self, install_kernel, start_async_kernel):
>       km, kc = start_async_kernel
E       TypeError: cannot unpack non-iterable AsyncGenerator object

jupyter_client/tests/test_kernelmanager.py:536: TypeError
============================================================================= warnings summary =============================================================================
jupyter_client/tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManagerWithCleanup-tcp]
jupyter_client/tests/test_kernelmanager.py::TestAsyncKernelManager::test_lifecycle[AsyncKernelManagerWithCleanup-ipc]
jupyter_client/tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_deprecations[AsyncKernelManagerWithCleanup-tcp]
jupyter_client/tests/test_kernelmanager.py::TestAsyncKernelManager::test_subclass_deprecations[AsyncKernelManagerWithCleanup-ipc]
  /home/tkloczko/rpmbuild/BUILD/jupyter_client-6.2.0/jupyter_client/manager.py:440: FutureWarning: Method cleanup(connection_file=True) is deprecated, use cleanup_resources(restart=False).
    warnings.warn(

jupyter_client/tests/test_session.py::TestSession::test_tracking
  /usr/lib64/python3.8/site-packages/zmq/eventloop/zmqstream.py:101: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
    self.io_loop = io_loop or IOLoop.current()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================= short test summary info ==========================================================================
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:358: IPC transport is currently not working for this test!
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:374: IPC transport is currently not working for this test!
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:390: IPC transport is currently not working for this test!
FAILED jupyter_client/tests/test_kernelmanager.py::TestAsyncKernelManager::test_signal_kernel_subprocesses - TypeError: cannot unpack non-iterable AsyncGenerator object
FAILED jupyter_client/tests/test_kernelmanager.py::TestAsyncKernelManager::test_start_new_async_kernel - TypeError: cannot unpack non-iterable AsyncGenerator object
===================================================== 2 failed, 158 passed, 3 skipped, 5 warnings in 144.03s (0:02:24) =====================================================

@bnavigator
Copy link

Fixed by #646

@kloczek
Copy link
Author

kloczek commented Jun 28, 2021

Just tested that patch and looks like warnings gone.
My understanding is that fixing those two ikernel dependent units is in kind of WIP state ..

Thank you.

@kloczek
Copy link
Author

kloczek commented Apr 25, 2022

Just tested 7.3.0 and all loos clean now 😄
Thank you

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-7.3.0-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-jupyter-client-7.3.0-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/jupyter_client-7.3.0, configfile: pyproject.toml, testpaths: jupyter_client/tests/
plugins: timeout-2.1.0, asyncio-0.18.2
timeout: 300.0s
timeout method: signal
timeout func_only: False
asyncio: mode=auto
collected 180 items

jupyter_client/tests/test_adapter.py ...........................                                                                                                     [ 15%]
jupyter_client/tests/test_client.py ........                                                                                                                         [ 19%]
jupyter_client/tests/test_connect.py ...........                                                                                                                     [ 25%]
jupyter_client/tests/test_jsonutil.py .....                                                                                                                          [ 28%]
jupyter_client/tests/test_kernelapp.py .                                                                                                                             [ 28%]
jupyter_client/tests/test_kernelmanager.py .....................s.s.s............                                                                                    [ 50%]
jupyter_client/tests/test_kernelspec.py .............                                                                                                                [ 57%]
jupyter_client/tests/test_localinterfaces.py .                                                                                                                       [ 57%]
jupyter_client/tests/test_manager.py .                                                                                                                               [ 58%]
jupyter_client/tests/test_multikernelmanager.py ..............................                                                                                       [ 75%]
jupyter_client/tests/test_provisioning.py ...........                                                                                                                [ 81%]
jupyter_client/tests/test_public_api.py ....                                                                                                                         [ 83%]
jupyter_client/tests/test_restarter.py ........                                                                                                                      [ 87%]
jupyter_client/tests/test_session.py .........s...........                                                                                                           [ 99%]
jupyter_client/tests/test_ssh.py .                                                                                                                                   [100%]

=========================================================================== slowest 10 durations ===========================================================================
20.28s call     jupyter_client/tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[ipc]
19.89s call     jupyter_client/tests/test_kernelmanager.py::TestParallel::test_start_sequence_kernels[tcp]
18.14s call     jupyter_client/tests/test_restarter.py::test_async_restarter_gives_up[ipc]
18.14s call     jupyter_client/tests/test_restarter.py::test_async_restarter_gives_up[tcp]
13.26s call     jupyter_client/tests/test_kernelmanager.py::TestParallel::test_start_parallel_thread_kernels[tcp]
13.25s call     jupyter_client/tests/test_kernelmanager.py::TestParallel::test_start_parallel_process_kernels[tcp]
13.06s call     jupyter_client/tests/test_kernelmanager.py::TestParallel::test_start_sequence_process_kernels[tcp]
9.48s call     jupyter_client/tests/test_restarter.py::test_restart_check[tcp]
9.44s call     jupyter_client/tests/test_restarter.py::test_restart_check[ipc]
9.40s call     jupyter_client/tests/test_restarter.py::test_async_restart_check[tcp]
========================================================================= short test summary info ==========================================================================
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:369: IPC transport is currently not working for this test!
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:385: IPC transport is currently not working for this test!
SKIPPED [1] jupyter_client/tests/test_kernelmanager.py:401: IPC transport is currently not working for this test!
SKIPPED [1] jupyter_client/tests/test_session.py:309: could not import 'msgpack': No module named 'msgpack'
================================================================ 176 passed, 4 skipped in 261.82s (0:04:21) ================================================================

@kloczek kloczek closed this as completed Apr 25, 2022
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