-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix event loop handling for Windows platform in compose_up function #1149
Fix event loop handling for Windows platform in compose_up function #1149
Conversation
Signed-off-by: Alexandre Pita <[email protected]>
Reading through the stackoverflow post and linked pages, seems like WindowsSelectorEventLoopPolicy was needed for aio-dns library which we don't use. Maybe it is enough for podman-compose to simply not call add_signal_handler and not touch the event loop policy? |
Signed-off-by: Alexandre Pita <[email protected]>
I investigated further and found that the default event loop policy on Windows is WindowsProactorEventLoop for Python versions 3.8 and above. This policy is more efficient than the manually set selector-based loop. Since Python versions below 3.8 already default to WindowsSelectorEventLoop, explicitly setting it is unnecessary and may cause compatibility issues across different versions. Therefore, it should be removed. |
Looks good, please add release note in newsfragments directory. |
Sorry, I'm kind of new to project contribution, how should be the news fragment type for this modification? |
bugfix ? We need to figure out how to catch ctrl-c and cancel tasks on windows though, but this can be sometime in the future. |
Signed-off-by: Alexandre Pita <[email protected]>
Sorry, for these extra commits, I was trying to sign off them to pass all the checks. |
@AlexandreAANP No problems at all, I have been newbie some time ago as well :-) What you need to do is to use interactive rebase to combine the commits into one. Then you would need to amend the commit to adjust its commit message so that the Here is tutorial on how to use amend and rebase https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history |
9b7bfaa
to
fd40133
Compare
Thanks! |
Hi,
I tried to run podman-compose on Windows and always break the script because of NotImplementedError in asyncio/events.
After a fast search, I noted that Windows doesn't have support for signals, and I found a code solution to solve this issue in this stack overflow link: https://stackoverflow.com/questions/58014623/python-asyncio-notimplementederror
I added an if condition to check if it's a Windows system or not, not sure if the best way to compare, but it works.