-
Notifications
You must be signed in to change notification settings - Fork 283
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
Make run_sync compatible with python 3.10.9 #902
Conversation
jupyter_client/utils.py
Outdated
except RuntimeError: | ||
# In python 3.10.9 this workaround breaks some tests | ||
# test_client.TestKernelClient | ||
# https://docs.python.org/3.10/whatsnew/changelog.html#id3 |
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.
Maybe add a more specific link?
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.
Updated, I've used the link to the cpython github issue: python/cpython#83710
except RuntimeError: | ||
loop = asyncio.new_event_loop() | ||
asyncio.set_event_loop(loop) | ||
else: |
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.
I think this changes the behavior. In the else
, should we try to use get_running_loop
before creating a new event loop?
Note that the deprecation warning will be reverted in the next patch release of 3.10 and 3.11. I think we should ignore the warning instead of adding a workaround for a single patch release. cf python/cpython#93453 (comment) |
I tested against 3.10.10 and verified that it passes now. |
Make run_sync compatible with python 3.10.9
Fix #901