-
Notifications
You must be signed in to change notification settings - Fork 725
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
DeprecationWarning: There is no current event loop #1696
Comments
The issue appears to be that the deprecation warning was re-introduced in Python 3.11.1?
In one case, I'm using Python 3.11.0 on my mac. In another, I'm using Python 3.11.1 on Ubuntu, because I don't have ready access to minor version changes on the same platform. |
Likely relevant is python/cpython#93453. |
For those of us whose package managers dumped us to python 3.10.9 and who use xonsh and are now getting warnings on every xonsh invocation, is there a workaround while the Python folks get this sorted out? Thanks for any thoughts. |
Oh, to answer my own question, I installed |
In the previous issue, I found that adding the following to my
It's also possible to configure a filter by setting a However, now that the warnings are on another line (687), it may be necessary to tune the filter and make it less sensitive to line number. I'll loop back here once homebrew updates the mac to 3.11.1 and I need to apply the change. |
Today homebrew updated and the deprecation error returned. The workaround working for me is:
|
This problem occurred for me as well when using xonsh. |
This was the faulty code last time: python-prompt-toolkit/src/prompt_toolkit/eventloop/utils.py Lines 106 to 118 in 65c3d06
I think something must've changed that causes it to hit that |
I am also observing a DepreciationWarning every time xonsh starts (xonsh 0.13.4 with python 3.11.1). The same A quick search in the asyncio documentation leads to this note:
I didn't push the investigation further yet, but my guess is that when the Filtering the warning might not be a good idea in the long term, as the underlying cause will end up triggering an error in future versions of asyncio. |
I believe the relevant bit of code in CPython is:
which is warning when the |
Is this fix released? I'm still getting the DeprecationWarning for v3.0.37 on Python 3.10.6. |
Indeed. I reinstalled xonsh today and my workaround is no longer working. The new workaround is:
Please re-open. |
I just ran into this issue with Python 3.10.9, prompt-toolkit 3.0.38, and xonsh 0.13.4, and can confirm that @jaraco's most recent fix hides the warning. |
Very similar to #1440, I've started getting a renewed deprecation warning on Python 3.11.1 when running xonsh.
Using jaraco/multipy-tox, which recently updated to Python 3.11.1, it's started to emit deprecation warnings:
The text was updated successfully, but these errors were encountered: