diff --git a/proxy/core/acceptor/threadless.py b/proxy/core/acceptor/threadless.py index 7d6e770e80..2e25673ac3 100644 --- a/proxy/core/acceptor/threadless.py +++ b/proxy/core/acceptor/threadless.py @@ -195,7 +195,7 @@ def run(self) -> None: try: self.selector = selectors.DefaultSelector() self.selector.register(self.client_queue, selectors.EVENT_READ) - self.loop = asyncio.get_event_loop() + self.loop = asyncio.get_event_loop_policy().get_event_loop() while not self.running.is_set(): self.run_once() except KeyboardInterrupt: diff --git a/pytest.ini b/pytest.ini index 1557bcfdd4..720d3180e3 100644 --- a/pytest.ini +++ b/pytest.ini @@ -57,7 +57,7 @@ filterwarnings = error # FIXME: Address the deprecation warning in Python 3.10 and revert this ignore - ignore:There is no current event loop:DeprecationWarning:proxy.core.acceptor.threadless + # ignore:There is no current event loop:DeprecationWarning:proxy.core.acceptor.threadless junit_duration_report = call # xunit1 contains more metadata than xunit2 so it's better for CI UIs: