Manually set event loop on windows

The behaviour of get_event_loop changed in 3.14 and no longer creates
one. Instead, it will crash.
This commit is contained in:
I-Al-Istannen
2025-10-27 12:43:51 +01:00
parent 6353571eb4
commit bd7b384e8f
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,9 @@ ambiguous situations.
## Added
- Store the description when using the `internet-shortcut` link format
## Fixed
- Event loop errors on Windows with Python 3.14
## 3.8.3 - 2025-07-01
## Added

View File

@@ -133,7 +133,8 @@ def main() -> None:
# https://bugs.python.org/issue39232
# https://github.com/encode/httpx/issues/914#issuecomment-780023632
# TODO Fix this properly
loop = asyncio.get_event_loop()
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(pferd.run(args.debug_transforms))
loop.run_until_complete(asyncio.sleep(1))
loop.close()