1
0
Fork 0

Adding upstream version 3.0.25.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 18:31:25 +01:00
parent 6444a924bf
commit f1b95081af
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
26 changed files with 770 additions and 530 deletions

View file

@ -19,7 +19,7 @@ loop = asyncio.get_event_loop()
counter = [0]
async def print_counter():
async def print_counter() -> None:
"""
Coroutine that prints counters and saves it in a global variable.
"""
@ -29,7 +29,7 @@ async def print_counter():
await asyncio.sleep(3)
async def interactive_shell():
async def interactive_shell() -> None:
"""
Coroutine that starts a Python REPL from which we can access the global
counter variable.
@ -44,13 +44,10 @@ async def interactive_shell():
loop.stop()
def main():
asyncio.ensure_future(print_counter())
asyncio.ensure_future(interactive_shell())
loop.run_forever()
loop.close()
async def main() -> None:
asyncio.create_task(print_counter())
await interactive_shell()
if __name__ == "__main__":
main()
asyncio.run(main())