mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
Ignore ptk warning (#5410)
Because we downgraded ptk in https://github.com/xonsh/xonsh/pull/5403 ### Before ```xsh xonsh --no-rc # /Users/pc/.local/mamba-envs/lib/python3.12/site-packages/prompt_toolkit/application/application.py:961: DeprecationWarning: There is no current event loop # loop = asyncio.get_event_loop() #@ ``` ### After ```xsh xonsh --no-rc #@ ``` ## For community ⬇️ **Please click the 👍 reaction instead of leaving a `+1` or 👍 comment** --------- Co-authored-by: a <1@1.1> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
fd5304fb87
commit
ef578c1ca6
1 changed files with 8 additions and 0 deletions
|
@ -185,6 +185,14 @@ class PromptToolkitShell(BaseShell):
|
|||
}
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
if not XSH.env.get("XONSH_DEBUG", False):
|
||||
__import__("warnings").filterwarnings(
|
||||
"ignore",
|
||||
"There is no current event loop",
|
||||
DeprecationWarning,
|
||||
module="prompt_toolkit.application.application",
|
||||
)
|
||||
|
||||
ptk_args = kwargs.pop("ptk_args", {})
|
||||
super().__init__(**kwargs)
|
||||
if ON_WINDOWS:
|
||||
|
|
Loading…
Add table
Reference in a new issue