asyncio.get_event_loop() got deprecated. So we can't install an event loop with inputhook upfront and then use in in prompt_toolkit. Instead, we can take the inputhook as an argument in Application.run() and PromptSession.run(), and install it in the event loop that we create ourselves using asyncio.run().
asyncio.get_event_loop()
got deprecated. So we can't install an event loop with inputhook upfront and then use in in prompt_toolkit. Instead, we can take the inputhook as an argument inApplication.run()
andPromptSession.run()
, and install it in the event loop that we create ourselves usingasyncio.run()
.