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

Tests in version 1.13.3 need jupyter_client 7.1 #666

Closed
bnavigator opened this issue Jan 15, 2022 · 3 comments · Fixed by #669
Closed

Tests in version 1.13.3 need jupyter_client 7.1 #666

bnavigator opened this issue Jan 15, 2022 · 3 comments · Fixed by #669
Assignees
Labels

Comments

@bnavigator
Copy link

#662 is already released in 1.13.3, but something seems to be missing:

[   74s] ____________________ test_delete[AsyncMappingKernelManager] ____________________
[   74s] 
[   74s] session_client = <jupyter_server.tests.services.sessions.test_api.SessionClient object at 0x7f9fedea0b50>
[   74s] jp_cleanup_subprocesses = <function jp_cleanup_subprocesses.<locals>._ at 0x7f9fee0fd040>
[   74s] jp_serverapp = <jupyter_server.serverapp.ServerApp object at 0x7f9fede37e80>
[   74s] session_is_ready = <function session_is_ready.<locals>._ at 0x7f9fee0fd8b0>
[   74s] 
[   74s]     async def test_delete(session_client, jp_cleanup_subprocesses, jp_serverapp, session_is_ready):
[   74s]         resp = await session_client.create("foo/nb1.ipynb")
[   74s]     
[   74s]         newsession = j(resp)
[   74s]         sid = newsession["id"]
[   74s] >       await session_is_ready(sid)
[   74s] 
[   74s] jupyter_server/tests/services/sessions/test_api.py:351: 
[   74s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
[   74s] 
[   74s] session_id = 'b18d21b6-8285-4266-8918-66e478322faa'
[   74s] 
[   74s]     async def _(session_id):
[   74s]         sm = jp_serverapp.session_manager
[   74s]         mkm = jp_serverapp.kernel_manager
[   74s]         session = await sm.get_session(session_id=session_id)
[   74s]         kernel_id = session["kernel"]["id"]
[   74s]         kernel = mkm.get_kernel(kernel_id)
[   74s] >       await kernel.ready
[   74s] E       AttributeError: 'AsyncIOLoopKernelManager' object has no attribute 'ready'
[   74s] 
[   74s] jupyter_server/tests/services/sessions/test_api.py:129: AttributeError
[   74s] ---------------------------- Captured stderr setup -----------------------------
[   74s] [D 2022-01-15 20:40:57.593 ServerApp] Config changed: {'NotebookNotary': {'db_file': ':memory:'}}
[   74s] ------------------------------ Captured log setup ------------------------------
[   74s] DEBUG    asyncio:selector_events.py:59 Using selector: EpollSelector
[   74s] DEBUG    ServerApp:application.py:174 Searching ['/home/abuild/rpmbuild/BUILD/jupyter_server-1.13.3', '/tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/config', '/home/abuild/.local/etc/jupyter', '/tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/env/etc/jupyter', '/tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/etc/jupyter'] for config files
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_config in /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/etc/jupyter
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_config in /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/env/etc/jupyter
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_config in /home/abuild/.local/etc/jupyter
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_config in /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/config
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_config in /home/abuild/rpmbuild/BUILD/jupyter_server-1.13.3
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_server_config in /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/etc/jupyter
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_server_config in /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/env/etc/jupyter
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_server_config in /home/abuild/.local/etc/jupyter
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_server_config in /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/config
[   74s] DEBUG    ServerApp:application.py:731 Looking for jupyter_server_config in /home/abuild/rpmbuild/BUILD/jupyter_server-1.13.3
[   74s] DEBUG    traitlets:config_manager.py:97 Paths used for configuration of jupyter_server_config: 
[   74s]        /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/etc/jupyter/jupyter_server_config.json
[   74s] DEBUG    traitlets:config_manager.py:97 Paths used for configuration of jupyter_server_config: 
[   74s]        /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/env/etc/jupyter/jupyter_server_config.json
[   74s] DEBUG    traitlets:config_manager.py:97 Paths used for configuration of jupyter_server_config: 
[   74s]        /home/abuild/.local/etc/jupyter/jupyter_server_config.json
[   74s] DEBUG    traitlets:config_manager.py:97 Paths used for configuration of jupyter_server_config: 
[   74s]        /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/config/jupyter_server_config.json
[   74s] INFO     ServerApp:serverapp.py:2581 Serving notebooks from local directory: /tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/root_dir
[   74s] INFO     ServerApp:serverapp.py:2581 Jupyter Server 1.13.3 is running at:
[   74s] INFO     ServerApp:serverapp.py:2581 http://localhost:45243/a%40b/?token=...
[   74s] INFO     ServerApp:serverapp.py:2581  or http://127.0.0.1:45243/a%40b/?token=...
[   74s] INFO     ServerApp:serverapp.py:2582 Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[   74s] ------------------------------ Captured log call -------------------------------
[   74s] DEBUG    ServerApp:login.py:212 Accepting token-authenticated connection from 127.0.0.1
[   74s] DEBUG    ServerApp:handlers.py:61 No kernel specified, using default kernel
[   74s] DEBUG    ServerApp:factory.py:96 Instantiating kernel 'Python 3 (ipykernel)' with kernel provisioner: local-provisioner
[   74s] DEBUG    ServerApp:manager.py:335 Starting kernel: ['/usr/bin/python3.9', '-m', 'ipykernel_launcher', '-f', '/tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/runtime/kernel-fc9b4e07-066b-47ff-8b2a-ec7731ad59ba.json']
[   74s] DEBUG    ServerApp:connect.py:616 Connecting to: tcp://127.0.0.1:59645
[   74s] DEBUG    ServerApp:connect.py:616 Connecting to: tcp://127.0.0.1:49671
[   74s] INFO     ServerApp:kernelmanager.py:221 Kernel started: fc9b4e07-066b-47ff-8b2a-ec7731ad59ba
[   74s] DEBUG    ServerApp:kernelmanager.py:222 Kernel args: {'kernel_name': None, 'cwd': '/tmp/pytest-of-abuild/pytest-2/test_delete_AsyncMappingKernel0/root_dir/foo'}
[   74s] DEBUG    ServerApp:log.py:55 201 POST /a%40b/api/sessions (127.0.0.1) 8.11ms
[   74s] __________________ test_delete[NewPortsMappingKernelManager] ___________________
[   74s] 
[   74s] session_client = <jupyter_server.tests.services.sessions.test_api.SessionClient object at 0x7f9fee1ed970>
[   74s] jp_cleanup_subprocesses = <function jp_cleanup_subprocesses.<locals>._ at 0x7f9fee0fd940>
[   74s] jp_serverapp = <jupyter_server.serverapp.ServerApp object at 0x7f9fee307a90>
[   74s] session_is_ready = <function session_is_ready.<locals>._ at 0x7f9fee0fdaf0>
[   74s] 
[   74s]     async def test_delete(session_client, jp_cleanup_subprocesses, jp_serverapp, session_is_ready):
[   74s]         resp = await session_client.create("foo/nb1.ipynb")
[   74s]     
[   74s]         newsession = j(resp)
[   74s]         sid = newsession["id"]
[   74s] >       await session_is_ready(sid)
[   74s] 

...

[   74s] =========================== short test summary info ============================
[   74s] FAILED jupyter_server/tests/services/sessions/test_api.py::test_delete[MappingKernelManager]
[   74s] FAILED jupyter_server/tests/services/sessions/test_api.py::test_delete[AsyncMappingKernelManager]
[   74s] FAILED jupyter_server/tests/services/sessions/test_api.py::test_delete[NewPortsMappingKernelManager]
[   74s] ======= 3 failed, 567 passed, 11 skipped, 8 warnings in 71.18s (0:01:11) =======

This is with jupyter_client 7.0.6. Installing 7.1.1 fixes the problem, but the declaration is not present in jupyter-server setup.cfg

@bnavigator bnavigator added the bug label Jan 15, 2022
@welcome
Copy link

welcome bot commented Jan 15, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@Zsailer Zsailer self-assigned this Jan 18, 2022
@Zsailer
Copy link
Member

Zsailer commented Jan 18, 2022

Thanks, @bnavigator. I'll look into this first thing tomorrow.

@Zsailer
Copy link
Member

Zsailer commented Jan 18, 2022

We should probably bump our dependency in jupyter_client, anyways.

That said, this test should check if the .ready attribute exists until we enforce a jupyter_client upgrade.

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

Successfully merging a pull request may close this issue.

2 participants