]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Test] Fix Python 3.12+ compatibility in dummy_http.py
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 6 Dec 2025 09:02:13 +0000 (09:02 +0000)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 6 Dec 2025 09:02:13 +0000 (09:02 +0000)
Replace deprecated asyncio.get_event_loop() with asyncio.run() to fix functional test failures on Fedora with newer Python.

test/functional/util/dummy_http.py

index c1abf7eb864b4d04be4d57388602266fe41c420c..832dbdc7975f414af369cc9ab15ce661bcaa06d1 100755 (executable)
@@ -141,5 +141,4 @@ async def main():
     await asyncio.Event().wait()
 
 if __name__ == "__main__":
-    loop = asyncio.get_event_loop()
-    loop.run_until_complete(main())
+    asyncio.run(main())