Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
310 stars 59 forks source link

Fix "Event loop is closed" error on windows #127

Closed mpearson closed 8 months ago

mpearson commented 1 year ago

Switched from asyncio.run() to the older style asyncio.get_event_loop.run_until_complete(). Tested on Ubuntu 22.04 and Windows 10. I also tried raising an exception inside main() in revup.py to ensure that errors aren't hidden. The only difference seems to be to avoid the premature closing of the event loop in the ProactorEventLoop (which is the only event loop that works with subprocess on Windows). See Asyncio event loop is closed when using asyncio.run() for some discussion.