Open auxsvr opened 6 months ago
Very annoying indeed. It's polluting my xonsh sessions on python 3.12.3 (and prompt toolkit 3.0.36).
Until a suitable solution is found:
# to be added at the top of the definition of the prompt-toolkit shell
# in: xonsh.ptk_shell.shell
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning, module="prompt_toolkit.eventloop.utils", lineno=118)
To silence:
.../lib/python3.12/site-packages/prompt_toolkit/eventloop/utils.py:118: DeprecationWarning: There is no current event loop
return asyncio.get_event_loop_policy().get_event_loop()
This won't fix op's runtime error but it will keep your shell clean if you'r using xonsh/0.16.0.
EDIT: updating to version 3.0.43 (>3.0.36) of the toolkit should fix it from my understanding of the code and this review on op's PR
Using prompt-toolkit 3.0.41, every time I launch scrapy shell (Scrapy 2.11.0) with ipython 8.18.0 and Python 3.10.12, the following stacktrace is produced:
The cause seems to be using
asyncio.get_event_loop()
, which will soon be deprecated. This is related to https://github.com/scrapy/scrapy/issues/6160.