Skip to content

Conversation

@dandavison
Copy link
Contributor

Many of the samples have not worked with 3.9 for months now due to #37.

3.9 reaches EOL at the end of October 2025, and so this commit drops official support for it from the sample repo.

If you are in a situation where it is necessary to run a sample under 3.9 and it is not working due to #37, a workaround is to delete the code below from the sample:

interrupt_event = asyncio.Event()

...
        await interrupt_event.wait()
...

if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    asyncio.set_event_loop(loop)
    try:
        loop.run_until_complete(main())
    except KeyboardInterrupt:
        interrupt_event.set()
        loop.run_until_complete(loop.shutdown_asyncgens())

and replace it with

...
    async with Worker(
        client,
        task_queue=TASK_QUEUE,
        workflows=[Workflow],
    ):
        # Wait forever
        await asyncio.Future()
        ...


if __name__ == "__main__":
    asyncio.run(main())

@dandavison dandavison requested a review from a team as a code owner July 17, 2025 15:32
@dandavison dandavison merged commit a5ee599 into main Jul 22, 2025
12 checks passed
@dandavison dandavison deleted the dan-0002-drop-3.9 branch July 22, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants