`prompt_async` is blocking on windows
See original GitHub issueConsider the following:
import asyncio
from prompt_toolkit.shortcuts import prompt_async
async def spam():
while True:
print("hello");
await asyncio.sleep(0.1);
print("World");
await asyncio.sleep(0.1);
async def my_coroutine():
while True:
result = await prompt_async('Say something: ', patch_stdout=True)
print('You said: %s' % result)
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.gather(my_coroutine(), spam()))
loop.close()
What I expect to happen: The prompt is pushed down by a continual stream of Hello
and World
What actually happens: Each time I push a single character, an extra Hello
or World
is printed - the output does not advance while waiting for a single character.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
AuthSession not working for Authorization Code Flow #8300
Under the hood, code exchange is performing a fetch request so I wouldn't consider this to be explicitly blocking anyone. Generally ...
Read more >Login blocking on Windows 10 browsers - Microsoft Community
So if I install some kind of OS in between Windows and my browsers the login works, but will not work on any...
Read more >Authentication - Expo Documentation
Build requests using AuthSession.useAuthRequest() , the hook allows for async setup which means mobile browsers won't block the authentication. Be sure to ...
Read more >Turn Off "Block Third-Party Cookies" in Chrome for Windows
Use the following procedure to ensure that the setting “Block third-party cookies” is turned off. Solution. In the Chrome browser window, click the...
Read more >Configuring your web browser to allow pop-up windows
Most web browsers include a feature to block pop-up windows.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
eventloop.utils.AsyncioTimeout
is also missing, even though'AsyncioTimeout' in eventloop.utils.__all__
.Are there no automated tests on the 2.0 branch to catch these things?
Tested this with the modernized version of the initial case:
Seems to be working as expected (prompt line is continuously pushed down even when typing).