xonsh / xonsh

:shell: Python-powered shell. Full-featured and cross-platform.
http://xon.sh
Other
8.35k stars 637 forks source link

Depreciation warnings Python 3.10 Still there! #5175

Closed jfmoulin closed 1 year ago

jfmoulin commented 1 year ago

On a fresh install (prompt-toolkit in ./.local/lib/python3.10/site-packages (3.0.39)) I still get the issue mentioned in https://github.com/xonsh/xonsh/issues/4513

On starting xonsh a DeprecationWarning is raised:

~$ xonsh
~/.local/lib/python3.10/site-packages/prompt_toolkit/application/application.py:961: DeprecationWarning: There is no current event loop 
loop = asyncio.get_event_loop()

I used the workaround https://github.com/xonsh/xonsh/issues/4513#issuecomment-1522724843 from @CaseyBaileyPDX: downgrading to prompt-toolkit-3.0.36 wcwidth-0.2.6 "solves" the problem.

The following stackoverflow thread mentions that in python 3.11 the Warning will actually become an Error...: https://stackoverflow.com/questions/73361664/asyncio-get-event-loop-deprecationwarning-there-is-no-current-event-loop

anki-code commented 1 year ago

This is upstream issue. Try this - https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1696#issuecomment-1464013479