-
Notifications
You must be signed in to change notification settings - Fork 304
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
Better Handling of Asyncio #1035
Conversation
Currently working with $ pytest test_gateway.py
================================================= test session starts ==================================================
platform darwin -- Python 3.10.7, pytest-7.1.3, pluggy-1.0.0
rootdir: /Users/steve.silvester/workspace/jupyter_server, configfile: pyproject.toml
plugins: anyio-3.6.1, asyncio-0.19.0, timeout-2.1.0, console-scripts-1.3.1
asyncio: mode=auto
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 23 items
test_gateway.py ....................... [100%]
================================================= slowest 10 durations =================================================
1.00s call tests/test_gateway.py::test_channel_queue_get_msg_without_timeout
0.10s call tests/test_gateway.py::test_channel_queue_get_msg_raises_empty_after_timeout
0.07s setup tests/test_gateway.py::test_gateway_env_options
0.05s setup tests/test_gateway.py::test_gateway_session_lifecycle
0.05s setup tests/test_gateway.py::test_gateway_get_kernelspecs
0.05s setup tests/test_gateway.py::test_gateway_shutdown[True]
0.05s setup tests/test_gateway.py::test_gateway_get_named_kernelspec
0.05s setup tests/test_gateway.py::test_kernel_client_response_router_notifies_channel_queue_when_finished
0.05s setup tests/test_gateway.py::test_gateway_shutdown[False]
0.05s setup tests/test_gateway.py::test_gateway_kernel_lifecycle
================================================== 23 passed in 2.14s ================================================== |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1035 +/- ##
==========================================
+ Coverage 72.60% 73.10% +0.50%
==========================================
Files 64 64
Lines 8257 8274 +17
Branches 1259 1643 +384
==========================================
+ Hits 5995 6049 +54
+ Misses 1847 1816 -31
+ Partials 415 409 -6 ☔ View full report in Codecov by Sentry. |
Cool, that gets the downstream tests passing again. |
] | ||
requires-python = ">=3.7" | ||
requires-python = ">=3.8" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flagging for public awareness! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for flagging, @vidartf.
@blink1073 you mentioned that SciPy ecosystem has a policy where they support the last few versions, even if the oldest version hasn't reach end-of-life. Do you have a link to something stating this policy? It would be nice to point to it, in case folks have concerns about this bump.
I found this support table from Numpy: https://numpy.org/neps/nep-0029-deprecation_policy.html
This shows that Numpy will drop support for 3.7 in December.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the link from conda-forge: https://conda-forge.org/docs/user/announcements.html#dropping-python-3-7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note this drop is only for the 2.x branch, we will still keep support in 1.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
This is ready for review. I'll follow up with a PR to make the base manager classes async, and deprecate the sync managers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @blink1073. You are the man.
These changes look good to me!
pytest-tornasync
fixtures with better handling of event loopsio_loop
earlier (cf initialize ioloop earlier #934)utils.run_sync
function (was only used in one test).utils.run_sync_in_loop
, was used byjupyter_server_terminals