When I run a python module with asyncio, it works as intended when executed from cmd, but not when executed from git bash.
The code is intended to print "hello", wait 3 seconds, then print "world". It does this correctly in cmd, but in git bash, it waits three seconds first, and then prints both statements back to back.
Here is the code:
import asyncio
async def main():
print('hello')
await asyncio.sleep(3)
print('world')
asyncio.run(main())
Is there something inherent in how git bash treats I/O, that causes this behaviour?
I'm using Python 3.10.2 on Windows 10. Git version 2.24.1.windows.2.