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

get_event_loop is deprecated in Python 3.10+ #1669

Closed
blink1073 opened this issue Mar 7, 2022 · 7 comments
Closed

get_event_loop is deprecated in Python 3.10+ #1669

blink1073 opened this issue Mar 7, 2022 · 7 comments

Comments

@blink1073
Copy link
Contributor

cf https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop.

I believe this needs to be changed to:

def _default_loop(self):
    try:
		return asyncio.get_running_loop()
    except RuntimeError:
        return asyncio.new_event_loop()
@minrk
Copy link
Member

minrk commented Mar 7, 2022

Must be something in the air: #1668

@minrk
Copy link
Member

minrk commented Mar 7, 2022

closed by #1668

@minrk minrk closed this as completed Mar 7, 2022
@blink1073
Copy link
Contributor Author

Haha, thanks!

@minrk
Copy link
Member

minrk commented Mar 7, 2022

btw, 23.0.0b1 is publishing right now if you want to do some testing. The new enums shouldn't break anything, but it would be good to give folks testing with pip install --pre before making the final release.

@blink1073
Copy link
Contributor Author

Yep, I'm testing it now in jupyter/jupyter_client#751. We had to remove a usage of strutils.

@blink1073
Copy link
Contributor Author

Cool, passing now with no warnings from zmq.

@blink1073
Copy link
Contributor Author

I spoke too soon, we're still seeing DeprecationWarning: There is no current event loop, but it comes from creating a Future outside of a running event loop, which is now a general problem.

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