+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-proxy-py-2.4.4-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-proxy-py-2.4.4-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' -q ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0 rootdir: /home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4 configfile: pytest.ini testpaths: tests/ plugins: timeout-2.3.1, anyio-4.3.0, mock-3.14.0, asyncio-0.23.6 asyncio: mode=strict collected 237 items tests/common/test_flags.py ................ [ 6%] tests/common/test_pki.py .......... [ 10%] tests/common/test_text_bytes.py ...... [ 13%] tests/common/test_utils.py ..... [ 15%] tests/core/test_acceptor.py .. [ 16%] tests/core/test_acceptor_pool.py . [ 16%] tests/core/test_conn_pool.py .... [ 18%] tests/core/test_connection.py .......... [ 22%] tests/core/test_event_dispatcher.py ... [ 24%] tests/core/test_event_manager.py . [ 24%] tests/core/test_event_queue.py ... [ 25%] tests/core/test_event_subscriber.py . [ 26%] tests/core/test_listener.py .. [ 27%] tests/core/test_listener_pool.py ... [ 28%] tests/http/exceptions/test_http_proxy_auth_failed.py EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' EE [ 29%] tests/http/exceptions/test_http_request_rejected.py ... [ 31%] tests/http/parser/test_chunk_parser.py ... [ 32%] tests/http/parser/test_http_parser.py .................................. [ 46%] .......... [ 51%] tests/http/parser/test_proxy_protocol.py ........ [ 54%] tests/http/parser/test_tls_parser.py .. [ 55%] tests/http/proxy/test_http2.py F [ 55%] tests/http/proxy/test_http_proxy.py .EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) AttributeError: '_UnixSelectorEventLoop' object has no attribute '_ssock' EE........E.... [ 62%] tests/http/proxy/test_http_proxy_tls_interception.py .E [ 62%] tests/http/test_protocol_handler.py Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) E [ 66%] tests/http/test_responses.py ..... [ 68%] tests/http/test_url.py .................. [ 75%] tests/http/web/test_web_server.py .Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EE [ 78%] tests/http/websocket/test_websocket_client.py ... [ 79%] tests/http/websocket/test_websocket_frame.py .. [ 80%] tests/integration/test_integration.py ......FFException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) FFFFFFF [ 86%] tests/plugin/test_http_proxy_plugins.py EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEEEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEEEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EE [ 91%] tests/plugin/test_http_proxy_plugins_with_tls_interception.py Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EEException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) EException ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0) E [ 92%] tests/socks/test_handler.py . [ 93%] tests/socks/test_packet.py .. [ 94%] tests/test_main.py ....... [ 97%] tests/test_set_open_file_limit.py ... [ 98%] tests/testing/test_embed.py ... [ 99%] tests/testing/test_test_case.py . [100%] ==================================== ERRORS ==================================== _ ERROR at setup of TestHttpProxyAuthFailed.test_proxy_auth_fails_without_cred _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 16) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 16) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 16) kwargs = {} effect = . at 0x7fbbe36da830> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 16) effect = . at 0x7fbbe36da830> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe36d9990> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.01649784203618765 excinfo = func = . at 0x7fbbe36d9990> precise_start = 2572159.934251011 precise_stop = 2572159.950748853 reraise = (, ) result = None start = 1715353045.8703344 stop = 1715353045.8868341 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe36734c0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe3672050> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=0 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=0 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyAuthFailed.test_proxy_auth_fails_without_cred _ + Exception Group Traceback (most recent call last): | File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 340, in from_call | result: Optional[TResult] = func() | File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 240, in | lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise | File "/usr/lib/python3.10/site-packages/pluggy/_hooks.py", line 501, in __call__ | return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) | File "/usr/lib/python3.10/site-packages/pluggy/_manager.py", line 119, in _hookexec | return self._inner_hookexec(hook_name, methods, kwargs, firstresult) | File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 138, in _multicall | raise exception.with_traceback(exception.__traceback__) | File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 121, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | File "/usr/lib/python3.10/site-packages/_pytest/threadexception.py", line 92, in pytest_runtest_teardown | yield from thread_exception_runtest_hook() | File "/usr/lib/python3.10/site-packages/_pytest/threadexception.py", line 63, in thread_exception_runtest_hook | yield | File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 121, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | File "/usr/lib/python3.10/site-packages/_pytest/unraisableexception.py", line 95, in pytest_runtest_teardown | yield from unraisable_exception_runtest_hook() | File "/usr/lib/python3.10/site-packages/_pytest/unraisableexception.py", line 65, in unraisable_exception_runtest_hook | yield | File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 121, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | File "/usr/lib/python3.10/site-packages/_pytest/logging.py", line 856, in pytest_runtest_teardown | yield from self._runtest_for(item, "teardown") | File "/usr/lib/python3.10/site-packages/_pytest/logging.py", line 832, in _runtest_for | yield | File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 121, in _multicall | teardown.throw(exception) # type: ignore[union-attr] | File "/usr/lib/python3.10/site-packages/_pytest/capture.py", line 888, in pytest_runtest_teardown | return (yield) | File "/usr/lib/python3.10/site-packages/pluggy/_callers.py", line 102, in _multicall | res = hook_impl.function(*args) | File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 187, in pytest_runtest_teardown | item.session._setupstate.teardown_exact(nextitem) | File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 555, in teardown_exact | raise exceptions[0] | File "/usr/lib/python3.10/site-packages/_pytest/runner.py", line 544, in teardown_exact | fin() | File "/usr/lib/python3.10/site-packages/_pytest/fixtures.py", line 1049, in finish | raise BaseExceptionGroup(msg, exceptions[::-1]) | exceptiongroup.ExceptionGroup: errors while tearing down fixture "event_loop" of (2 sub-exceptions) +-+---------------- 1 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.10/site-packages/_pytest/fixtures.py", line 1035, in finish | fin() | File "/usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 844, in _provide_clean_event_loop | new_loop = policy.new_event_loop() | File "/usr/lib64/python3.10/asyncio/events.py", line 673, in new_event_loop | return self._loop_factory() | File "/usr/lib64/python3.10/asyncio/unix_events.py", line 64, in __init__ | super().__init__(selector) | File "/usr/lib64/python3.10/asyncio/selector_events.py", line 56, in __init__ | self._make_self_pipe() | File "/usr/lib64/python3.10/asyncio/selector_events.py", line 103, in _make_self_pipe | self._ssock, self._csock = socket.socketpair() | File "/usr/lib64/python3.10/socket.py", line 608, in socketpair | a = socket(family, type, proto, a.detach()) | File "/usr/lib64/python3.10/unittest/mock.py", line 1114, in __call__ | return self._mock_call(*args, **kwargs) | File "/usr/lib64/python3.10/unittest/mock.py", line 1118, in _mock_call | return self._execute_mock_call(*args, **kwargs) | File "/usr/lib64/python3.10/unittest/mock.py", line 1179, in _execute_mock_call | result = effect(*args, **kwargs) | TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given +---------------- 2 ---------------- | Traceback (most recent call last): | File "/usr/lib/python3.10/site-packages/_pytest/fixtures.py", line 1035, in finish | fin() | File "/usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py", line 812, in _close_event_loop | warnings.warn( | DeprecationWarning: pytest-asyncio detected an unclosed event loop when tearing down the event_loop | fixture: <_UnixSelectorEventLoop running=False closed=False debug=False> | pytest-asyncio will close the event loop for you, but future versions of the | library will no longer do so. In order to ensure compatibility with future | versions, please make sure that: | 1. Any custom "event_loop" fixture properly closes the loop after yielding it | 2. The scopes of your custom "event_loop" fixtures do not overlap | 3. Your code does not modify the event loop in async fixtures or tests | +------------------------------------ _ ERROR at setup of TestHttpProxyAuthFailed.test_proxy_auth_fails_with_invalid_cred _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 14) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 14) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 14) kwargs = {} effect = . at 0x7fbbe35c5870> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 14) effect = . at 0x7fbbe35c5870> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError During handling of the above exception, another exception occurred: def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1caab30> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n File...2181, in __init__\n self.name = name\nResourceWarning: unclosed \n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1caaad0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=2 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=2 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe45b9900> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.00555824488401413 excinfo = \n') tblen=8> func = . at 0x7fbbe45b9900> precise_start = 2572160.688371784 precise_stop = 2572160.693930029 reraise = (, ) result = None start = 1715353046.6244555 stop = 1715353046.6300147 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: yield finally: if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib64/python3.10/unittest/mock.py", line 2181, in __init__ E self.name = name E ResourceWarning: unclosed cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1caab30> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n File...2181, in __init__\n self.name = name\nResourceWarning: unclosed \n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning _ ERROR at teardown of TestHttpProxyAuthFailed.test_proxy_auth_fails_with_invalid_cred _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 17) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 17) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 17) kwargs = {} effect = . at 0x7fbbe35c5870> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 17) effect = . at 0x7fbbe35c5870> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError _ ERROR at setup of TestHttpProxyAuthFailed.test_proxy_auth_works_with_valid_cred _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 19) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 19) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 19) kwargs = {} effect = . at 0x7fbbe1d20af0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 19) effect = . at 0x7fbbe1d20af0> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe2159d80> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.004994348157197237 excinfo = func = . at 0x7fbbe2159d80> precise_start = 2572161.311819917 precise_stop = 2572161.316814265 reraise = (, ) result = None start = 1715353047.2479036 stop = 1715353047.2528994 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe41b0d60> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe41b0f70> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=4 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=4 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyAuthFailed.test_proxy_auth_works_with_valid_cred _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 15) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 15) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 15) kwargs = {} effect = . at 0x7fbbe1d20af0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 15) effect = . at 0x7fbbe1d20af0> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError _ ERROR at setup of TestHttpProxyAuthFailed.test_proxy_auth_works_with_mixed_case_basic_string _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 23) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 23) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 23) kwargs = {} effect = . at 0x7fbbe1d22c20> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 23) effect = . at 0x7fbbe1d22c20> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1d231c0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005054987967014313 excinfo = func = . at 0x7fbbe1d231c0> precise_start = 2572161.902299617 precise_stop = 2572161.907354605 reraise = (, ) result = None start = 1715353047.838383 stop = 1715353047.8434396 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe374d960> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe374d7b0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=6 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=6 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = TypeError('TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyAuthFailed.test_proxy_auth_works_with_mixed_case_basic_string _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 18) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 18) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 18) kwargs = {} effect = . at 0x7fbbe1d22c20> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyAuthFailed._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 18) effect = . at 0x7fbbe1d22c20> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError _ ERROR at setup of TestHttpProxyPlugin.test_proxy_plugin_on_and_before_upstream_connection _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 21) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 21) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 21) kwargs = {} effect = . at 0x7fbbe351add0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 21) effect = . at 0x7fbbe351add0> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError During handling of the above exception, another exception occurred: def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe456c550> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n File...(_type, entry, MagicProxy(entry, self))\nResourceWarning: unclosed \n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe456dba0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=9 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=9 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = TypeError('TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E TypeError: TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = TypeError('TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe41a76d0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.03695631120353937 excinfo = \n') tblen=8> func = . at 0x7fbbe41a76d0> precise_start = 2572163.646714407 precise_stop = 2572163.683670718 reraise = (, ) result = None start = 1715353049.582798 stop = 1715353049.6197555 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: yield finally: if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib64/python3.10/unittest/mock.py", line 2135, in _mock_set_magics E setattr(_type, entry, MagicProxy(entry, self)) E ResourceWarning: unclosed cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe456c550> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n File...(_type, entry, MagicProxy(entry, self))\nResourceWarning: unclosed \n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning _ ERROR at teardown of TestHttpProxyPlugin.test_proxy_plugin_on_and_before_upstream_connection _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 25) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 25) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 25) kwargs = {} effect = . at 0x7fbbe351add0> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 25) effect = . at 0x7fbbe351add0> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError _ ERROR at setup of TestHttpProxyPlugin.test_proxy_plugin_before_upstream_connection_can_teardown _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 27) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 27) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 27) kwargs = {} effect = . at 0x7fbbe3710550> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 27) effect = . at 0x7fbbe3710550> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe351b0a0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005332854110747576 excinfo = func = . at 0x7fbbe351b0a0> precise_start = 2572164.282617929 precise_stop = 2572164.287950783 reraise = (, ) result = None start = 1715353050.2187014 stop = 1715353050.2240355 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1c42350> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1c43310> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=11 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=11 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = TypeError('TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E TypeError: TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = TypeError('TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPlugin.test_proxy_plugin_before_upstream_connection_can_teardown _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:103: in _make_self_pipe self._ssock, self._csock = socket.socketpair() self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/socket.py:608: in socketpair a = socket(family, type, proto, a.detach()) a = b = family = proto = 0 type = /usr/lib64/python3.10/unittest/mock.py:1114: in __call__ return self._mock_call(*args, **kwargs) args = (, , 0, 24) kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1118: in _mock_call return self._execute_mock_call(*args, **kwargs) args = (, , 0, 24) kwargs = {} self = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = args = (, , 0, 24) kwargs = {} effect = . at 0x7fbbe3710550> def _execute_mock_call(self, /, *args, **kwargs): # separate from _increment_mock_call so that awaited functions are # executed separately from their call, also AsyncMock overrides this method effect = self.side_effect if effect is not None: if _is_exception(effect): raise effect elif not _callable(effect): result = next(effect) if _is_exception(result): raise result else: > result = effect(*args, **kwargs) E TypeError: TestHttpProxyPlugin._setUp..() takes 0 positional arguments but 4 were given args = (, , 0, 24) effect = . at 0x7fbbe3710550> kwargs = {} self = /usr/lib64/python3.10/unittest/mock.py:1179: TypeError _ ERROR at setup of TestHttpProxyPlugin.test_proxy_plugin_skips_server_teardown_when_client_closes_and_server_never_initialized _ cls = func = . at 0x7fbbe3710f70> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.03377571003511548 excinfo = \n') tblen=8> func = . at 0x7fbbe3710f70> precise_start = 2572164.960973789 precise_stop = 2572164.994749499 reraise = (, ) result = None start = 1715353050.8970575 stop = 1715353050.9308345 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: yield finally: if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib64/python3.10/unittest/mock.py", line 2181, in __init__ E self.name = name E ResourceWarning: unclosed cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe2bb6bf0> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n File...2181, in __init__\n self.name = name\nResourceWarning: unclosed \n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning __________ ERROR at teardown of TestHttpProxyTlsInterception.test_e2e __________ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fd = 26 callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = 26 handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProtocolHandlerWithoutServerMock.test_proxy_connection_failed _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe217ed40> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005760504398494959 excinfo = func = . at 0x7fbbe217ed40> precise_start = 2572165.170273469 precise_stop = 2572165.176033973 reraise = (, ) result = None start = 1715353051.1063573 stop = 1715353051.1121185 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1fe7f70> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1fe7e80> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=15 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=15 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProtocolHandlerWithoutServerMock.test_proxy_connection_failed _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProtocolHandlerWithoutServerMock.test_proxy_authentication_failed _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe217ef80> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005983339622616768 excinfo = func = . at 0x7fbbe217ef80> precise_start = 2572165.645219764 precise_stop = 2572165.651203104 reraise = (, ) result = None start = 1715353051.5813034 stop = 1715353051.5872881 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1b1c340> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1b1c490> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=17 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=17 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProtocolHandlerWithoutServerMock.test_proxy_authentication_failed _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProtocolHandlerWithoutServerMock.test_proxy_bails_out_for_unknown_schemes _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe2b0ca60> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005815239157527685 excinfo = func = . at 0x7fbbe2b0ca60> precise_start = 2572166.080601939 precise_stop = 2572166.086417178 reraise = (, ) result = None start = 1715353052.0166855 stop = 1715353052.022502 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe170c070> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe170c100> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=19 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=19 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProtocolHandlerWithoutServerMock.test_proxy_bails_out_for_unknown_schemes _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProtocolHandlerWithoutServerMock.test_proxy_bails_out_for_sip_request_lines _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe2b0e950> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005788690410554409 excinfo = func = . at 0x7fbbe2b0e950> precise_start = 2572166.506796614 precise_stop = 2572166.512585304 reraise = (, ) result = None start = 1715353052.4428802 stop = 1715353052.4486701 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe2b47100> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe2b46fb0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=21 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=21 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProtocolHandlerWithoutServerMock.test_proxy_bails_out_for_sip_request_lines _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError ___________ ERROR at setup of TestHttpProtocolHandler.test_http_get ____________ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe2b0fb50> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.00622625881806016 excinfo = func = . at 0x7fbbe2b0fb50> precise_start = 2572166.92663141 precise_stop = 2572166.932857669 reraise = (, ) result = None start = 1715353052.8627148 stop = 1715353052.8689425 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe161b880> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe161b970> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=23 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=23 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning __________ ERROR at teardown of TestHttpProtocolHandler.test_http_get __________ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError __________ ERROR at setup of TestHttpProtocolHandler.test_http_tunnel __________ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe2b0cd30> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.0062675559893250465 excinfo = func = . at 0x7fbbe2b0cd30> precise_start = 2572167.388040634 precise_stop = 2572167.39430819 reraise = (, ) result = None start = 1715353053.324124 stop = 1715353053.330393 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe17d0340> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe17d0400> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=25 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=25 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning ________ ERROR at teardown of TestHttpProtocolHandler.test_http_tunnel _________ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProtocolHandler.test_authenticated_proxy_http_get __ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1f05ab0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006229950115084648 excinfo = func = . at 0x7fbbe1f05ab0> precise_start = 2572167.825270703 precise_stop = 2572167.831500653 reraise = (, ) result = None start = 1715353053.7613542 stop = 1715353053.7675853 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1782500> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1782560> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=27 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=27 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProtocolHandler.test_authenticated_proxy_http_get _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProtocolHandler.test_authenticated_proxy_http_tunnel _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1f05b40> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.007093361578881741 excinfo = func = . at 0x7fbbe1f05b40> precise_start = 2572168.265478825 precise_stop = 2572168.272572187 reraise = (, ) result = None start = 1715353054.2015624 stop = 1715353054.2086568 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe121a110> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1219690> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=29 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=29 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProtocolHandler.test_authenticated_proxy_http_tunnel _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestWebServerPluginWithPacFilePlugin.test_pac_file_served_from_disk[/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/helper/proxy.pac] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1de8280> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.007182508707046509 excinfo = func = . at 0x7fbbe1de8280> precise_start = 2572168.790231447 precise_stop = 2572168.797413956 reraise = (, ) result = None start = 1715353054.726315 stop = 1715353054.7334986 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1440850> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe13c9ba0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=31 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=31 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': '/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/helper/proxy.pac'}, indices={'_setUp': 0}, _...p': }, _idlist=['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/helper/proxy.pac'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestWebServerPluginWithPacFilePlugin.test_pac_file_served_from_disk[/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/helper/proxy.pac] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestWebServerPluginWithPacFilePlugin.test_pac_file_served_from_disk[function FindProxyForURL(url, host) { return "PROXY localhost:8899; DIRECT"; }] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1de9cf0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.0063327401876449585 excinfo = func = . at 0x7fbbe1de9cf0> precise_start = 2572169.235532297 precise_stop = 2572169.241865037 reraise = (, ) result = None start = 1715353055.1716158 stop = 1715353055.1779497 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1a0dc00> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1a0d870> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=33 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=33 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': b'function FindProxyForURL(url, host) { return "PROXY localhost:8899; DIRECT"; }'}, indice...on: 'function'>}, _idlist=['function FindProxyForURL(url, host) { return "PROXY localhost:8899; DIRECT"; }'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestWebServerPluginWithPacFilePlugin.test_pac_file_served_from_disk[function FindProxyForURL(url, host) { return "PROXY localhost:8899; DIRECT"; }] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError __ ERROR at setup of TestStaticWebServerPlugin.test_static_web_server_serves ___ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1debb50> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005887249018996954 excinfo = func = . at 0x7fbbe1debb50> precise_start = 2572169.671178799 precise_stop = 2572169.677066048 reraise = (, ) result = None start = 1715353055.6072624 stop = 1715353055.6131508 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe136b730> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe136ab60> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=35 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=35 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestStaticWebServerPlugin.test_static_web_server_serves _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestStaticWebServerPlugin.test_static_web_server_serves_404 _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1deb370> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.005865573883056641 excinfo = func = . at 0x7fbbe1deb370> precise_start = 2572170.1001104 precise_stop = 2572170.105975974 reraise = (, ) result = None start = 1715353056.0361936 stop = 1715353056.0420609 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1908130> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe19082b0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=37 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=37 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestStaticWebServerPlugin.test_static_web_server_serves_404 _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError __ ERROR at setup of TestWebServerPlugin.test_default_web_server_returns_404 ___ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1af8c10> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.0057900091633200645 excinfo = func = . at 0x7fbbe1af8c10> precise_start = 2572170.573659131 precise_stop = 2572170.57944914 reraise = (, ) result = None start = 1715353056.5097425 stop = 1715353056.5155342 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe12063b0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1206650> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=39 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=39 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = None fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestWebServerPlugin.test_default_web_server_returns_404 _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_modify_post_data_plugin[test_modify_post_data_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1afa9e0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.008437502197921276 excinfo = func = . at 0x7fbbe1afa9e0> precise_start = 2572278.493729369 precise_stop = 2572278.502166871 reraise = (, ) result = None start = 1715353164.4298127 stop = 1715353164.4382517 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1376fe0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe13743d0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=50 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=50 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_modify_post_data_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_modify_post_data_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_modify_post_data_plugin[test_modify_post_data_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_proposed_rest_api_plugin[test_proposed_rest_api_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1b87010> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006658376194536686 excinfo = func = . at 0x7fbbe1b87010> precise_start = 2572278.954423796 precise_stop = 2572278.961082172 reraise = (, ) result = None start = 1715353164.8905072 stop = 1715353164.8971667 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe10a7910> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe10a7940> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=52 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=52 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_proposed_rest_api_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_proposed_rest_api_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_proposed_rest_api_plugin[test_proposed_rest_api_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_redirect_to_custom_server_plugin[test_redirect_to_custom_server_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1b865f0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006519107613712549 excinfo = func = . at 0x7fbbe1b865f0> precise_start = 2572279.395108837 precise_stop = 2572279.401627945 reraise = (, ) result = None start = 1715353165.3311925 stop = 1715353165.3377125 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe18f7430> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe18f6290> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=54 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=54 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_redirect_to_custom_server_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_redirect_to_custom_server_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_redirect_to_custom_server_plugin[test_redirect_to_custom_server_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_redirect_to_custom_server_plugin_skips_https[test_redirect_to_custom_server_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe13dd1e0> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n Fil..., source=self)\nResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>\n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe13dd300> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=56 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=56 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_redirect_to_custom_server_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_redirect_to_custom_server_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1b87130> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.06370161101222038 excinfo = \n') tblen=8> func = . at 0x7fbbe1b87130> precise_start = 2572279.829867039 precise_stop = 2572279.89356865 reraise = (, ) result = None start = 1715353165.7659507 stop = 1715353165.8296535 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: yield finally: if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib64/python3.10/asyncio/base_events.py", line 688, in __del__ E _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self) E ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False> cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe13dd1e0> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n Fil..., source=self)\nResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>\n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_redirect_to_custom_server_plugin_skips_https[test_redirect_to_custom_server_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_filter_by_upstream_host_plugin[test_filter_by_upstream_host_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1b276d0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006492102053016424 excinfo = func = . at 0x7fbbe1b276d0> precise_start = 2572280.321090084 precise_stop = 2572280.327582186 reraise = (, ) result = None start = 1715353166.2571735 stop = 1715353166.263667 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe10905b0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1090190> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=58 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=58 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_filter_by_upstream_host_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_filter_by_upstream_host_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_filter_by_upstream_host_plugin[test_filter_by_upstream_host_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1b269e0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.0064566656947135925 excinfo = func = . at 0x7fbbe1b269e0> precise_start = 2572280.76877745 precise_stop = 2572280.775234116 reraise = (, ) result = None start = 1715353166.704861 stop = 1715353166.7113192 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe1b62fb0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe1b62fe0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=60 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=60 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_man_in_the_middle_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_man_in_the_middle_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_filter_by_url_regex_plugin[test_filter_by_url_regex_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe1b26440> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006446261890232563 excinfo = func = . at 0x7fbbe1b26440> precise_start = 2572281.20277351 precise_stop = 2572281.209219772 reraise = (, ) result = None start = 1715353167.138857 stop = 1715353167.1453042 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe16f5ea0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe16f5d20> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=62 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=62 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_filter_by_url_regex_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_filter_by_url_regex_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_filter_by_url_regex_plugin[test_filter_by_url_regex_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_shortlink_plugin[test_shortlink_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe17cdbd0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006500463932752609 excinfo = func = . at 0x7fbbe17cdbd0> precise_start = 2572281.695374135 precise_stop = 2572281.701874599 reraise = (, ) result = None start = 1715353167.6314576 stop = 1715353167.6379595 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe14c1210> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe14c1360> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=64 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=64 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_shortlink_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_shortlink_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_shortlink_plugin[test_shortlink_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_shortlink_plugin_unknown[test_shortlink_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe17cea70> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006623939145356417 excinfo = func = . at 0x7fbbe17cea70> precise_start = 2572282.145951572 precise_stop = 2572282.152575511 reraise = (, ) result = None start = 1715353168.0820353 stop = 1715353168.0886602 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe10be0b0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe10be0e0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=66 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=66 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_shortlink_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_shortlink_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_shortlink_plugin_unknown[test_shortlink_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_shortlink_plugin_external[test_shortlink_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe17cdf30> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006550107151269913 excinfo = func = . at 0x7fbbe17cdf30> precise_start = 2572282.587187258 precise_stop = 2572282.593737365 reraise = (, ) result = None start = 1715353168.5232706 stop = 1715353168.5298219 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe125cdf0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe125d510> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=68 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=68 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_shortlink_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_shortlink_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_shortlink_plugin_external[test_shortlink_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_auth_plugin[test_auth_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: > yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe125bf70> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n Fil..., source=self)\nResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>\n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe125beb0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=70 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=70 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_auth_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_auth_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe183cdc0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.06586539698764682 excinfo = \n') tblen=8> func = . at 0x7fbbe183cdc0> precise_start = 2572283.023950899 precise_stop = 2572283.089816296 reraise = (, ) result = None start = 1715353168.9600344 stop = 1715353169.025901 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def unraisable_exception_runtest_hook() -> Generator[None, None, None]: with catch_unraisable_exception() as cm: try: yield finally: if cm.unraisable: if cm.unraisable.err_msg is not None: err_msg = cm.unraisable.err_msg else: err_msg = "Exception ignored in" msg = f"{err_msg}: {cm.unraisable.object!r}\n\n" msg += "".join( traceback.format_exception( cm.unraisable.exc_type, cm.unraisable.exc_value, cm.unraisable.exc_traceback, ) ) > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) E pytest.PytestUnraisableExceptionWarning: Exception ignored in: E E Traceback (most recent call last): E File "/usr/lib64/python3.10/asyncio/base_events.py", line 688, in __del__ E _warn(f"unclosed event loop {self!r}", ResourceWarning, source=self) E ResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False> cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe125bf70> err_msg = 'Exception ignored in' msg = 'Exception ignored in: \n\nTraceback (most recent call last):\n Fil..., source=self)\nResourceWarning: unclosed event loop <_UnixSelectorEventLoop running=False closed=False debug=False>\n' /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:80: PytestUnraisableExceptionWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_auth_plugin[test_auth_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamples.test_auth_plugin_bypass[test_auth_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe183d990> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.006479554809629917 excinfo = func = . at 0x7fbbe183d990> precise_start = 2572283.520142611 precise_stop = 2572283.526622166 reraise = (, ) result = None start = 1715353169.4562263 stop = 1715353169.462707 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe0caafb0> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe0cab8b0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=72 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=72 testscollected=237>, , , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_auth_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_auth_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamples.test_auth_plugin_bypass[test_auth_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False> fd = callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamplesWithTlsInterception.test_modify_post_data_plugin[test_modify_post_data_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fd = 127 callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = 127 handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe196e4d0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.013337410986423492 excinfo = func = . at 0x7fbbe196e4d0> precise_start = 2572283.96890664 precise_stop = 2572283.982244051 reraise = (, ) result = None start = 1715353169.9049902 stop = 1715353169.9183288 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe0c2ae00> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe0c2aef0> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=74 testscollected=237>, , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=74 testscollected=237>, , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_modify_post_data_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_modify_post_data_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamplesWithTlsInterception.test_modify_post_data_plugin[test_modify_post_data_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fd = 129 callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = 129 handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError _ ERROR at setup of TestHttpProxyPluginExamplesWithTlsInterception.test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] _ fixturedef = @pytest.hookimpl(hookwrapper=True) def pytest_fixture_setup( fixturedef: FixtureDef, ) -> Generator[None, Any, None]: """Adjust the event loop policy when an event loop is produced.""" if fixturedef.argname == "event_loop": # The use of a fixture finalizer is preferred over the # pytest_fixture_post_finalizer hook. The fixture finalizer is invoked once # for each fixture, whereas the hook may be invoked multiple times for # any specific fixture. # see https://github.com/pytest-dev/pytest/issues/5848 _add_finalizers( fixturedef, _close_event_loop, _restore_event_loop_policy(asyncio.get_event_loop_policy()), _provide_clean_event_loop, ) outcome = yield > loop: asyncio.AbstractEventLoop = outcome.get_result() fixturedef = outcome = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:747: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:963: in event_loop loop = asyncio.get_event_loop_policy().new_event_loop() new_loop_policy = request = > /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fd = 131 callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = 131 handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError During handling of the above exception, another exception occurred: cls = func = . at 0x7fbbe183cdc0> when = 'setup' reraise = (, ) @classmethod def from_call( cls, func: Callable[[], TResult], when: Literal["collect", "setup", "call", "teardown"], reraise: Optional[ Union[Type[BaseException], Tuple[Type[BaseException], ...]] ] = None, ) -> "CallInfo[TResult]": """Call func, wrapping the result in a CallInfo. :param func: The function to call. Called without arguments. :param when: The phase in which the function is called. :param reraise: Exception or exceptions that shall propagate if raised by the function, instead of being wrapped in the CallInfo. """ excinfo = None start = timing.time() precise_start = timing.perf_counter() try: > result: Optional[TResult] = func() cls = duration = 0.012937006074935198 excinfo = func = . at 0x7fbbe183cdc0> precise_start = 2572284.417769197 precise_stop = 2572284.430706203 reraise = (, ) result = None start = 1715353170.3538527 stop = 1715353170.366791 when = 'setup' /usr/lib/python3.10/site-packages/_pytest/runner.py:340: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/_pytest/runner.py:240: in lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise item = kwds = {} runtest_hook = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = False kwargs = {'item': } self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = False hook_name = 'pytest_runtest_setup' kwargs = {'item': } methods = [>, >, ...] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:85: in pytest_runtest_setup yield from unraisable_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/unraisableexception.py:65: in unraisable_exception_runtest_hook yield cm = <_pytest.unraisableexception.catch_unraisable_exception object at 0x7fbbe0fed690> /usr/lib/python3.10/site-packages/_pytest/logging.py:843: in pytest_runtest_setup yield from self._runtest_for(item, "setup") empty = {'setup': []} item = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> /usr/lib/python3.10/site-packages/_pytest/logging.py:832: in _runtest_for yield caplog_handler = item = log = '' report_handler = self = <_pytest.logging.LoggingPlugin object at 0x7fbbe5674c10> when = 'setup' /usr/lib/python3.10/site-packages/_pytest/capture.py:878: in pytest_runtest_setup return (yield) item = self = > _state='suspended' _in_suspended=False> _capture_fixture=None> /usr/lib/python3.10/site-packages/_pytest/threadexception.py:82: in pytest_runtest_setup yield from thread_exception_runtest_hook() /usr/lib/python3.10/site-packages/_pytest/threadexception.py:63: in thread_exception_runtest_hook yield cm = <_pytest.threadexception.catch_threading_exception object at 0x7fbbe0fed660> /usr/lib/python3.10/site-packages/_pytest/runner.py:158: in pytest_runtest_setup item.session._setupstate.setup(item) item = /usr/lib/python3.10/site-packages/_pytest/runner.py:515: in setup raise exc col = finalizers = [>] item = needed_collectors = [ testsfailed=76 testscollected=237>, , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/runner.py:512: in setup col.setup() col = finalizers = [>] item = needed_collectors = [ testsfailed=76 testscollected=237>, , , , , ...] self = <_pytest.runner.SetupState object at 0x7fbbe51fd3c0> /usr/lib/python3.10/site-packages/_pytest/python.py:1780: in setup self._request._fillfixtures() self = /usr/lib/python3.10/site-packages/_pytest/fixtures.py:687: in _fillfixtures item.funcargs[argname] = self.getfixturevalue(argname) argname = 'event_loop' item = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:541: in getfixturevalue fixturedef = self._get_active_fixturedef(argname) argname = 'event_loop' self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:570: in _get_active_fixturedef self._compute_fixture_value(fixturedef) argname = 'event_loop' fixturedef = self = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:647: in _compute_fixture_value fixturedef.execute(request=subrequest) argname = 'event_loop' callspec = CallSpec2(params={'_setUp': 'test_man_in_the_middle_plugin'}, indices={'_setUp': 0}, _arg2scope={'_setUp': }, _idlist=['test_man_in_the_middle_plugin'], marks=[]) fixturedef = fixtures_not_supported = False funcitem = has_params = False param = param_index = 0 scope = self = > subrequest = > /usr/lib/python3.10/site-packages/_pytest/fixtures.py:1079: in execute result = ihook.pytest_fixture_setup(fixturedef=self, request=request) argname = 'request' fixturedef = PseudoFixtureDef(cached_result=(>, [0], None), _scope=) ihook = <_pytest.config.compat.PathAwareHookProxy object at 0x7fbbe577cd00> my_cache_key = 0 request = > self = /usr/lib/python3.10/site-packages/pluggy/_hooks.py:501: in __call__ return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) firstresult = True kwargs = {'fixturedef': , 'request': >} self = /usr/lib/python3.10/site-packages/pluggy/_manager.py:119: in _hookexec return self._inner_hookexec(hook_name, methods, kwargs, firstresult) firstresult = True hook_name = 'pytest_fixture_setup' kwargs = {'fixturedef': , 'request': >} methods = [>] self = <_pytest.config.PytestPluginManager object at 0x7fbbe6178340> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ hook_name = 'pytest_fixture_setup' hook_impl = > e = ValueError('not enough values to unpack (expected 2, got 0)') def _warn_teardown_exception( hook_name: str, hook_impl: HookImpl, e: BaseException ) -> None: msg = "A plugin raised an exception during an old-style hookwrapper teardown.\n" msg += f"Plugin: {hook_impl.plugin_name}, Hook: {hook_name}\n" msg += f"{type(e).__name__}: {e}\n" msg += "For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning" # noqa: E501 > warnings.warn(PluggyTeardownRaisedWarning(msg), stacklevel=5) E pluggy.PluggyTeardownRaisedWarning: A plugin raised an exception during an old-style hookwrapper teardown. E Plugin: asyncio, Hook: pytest_fixture_setup E ValueError: not enough values to unpack (expected 2, got 0) E For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning e = ValueError('not enough values to unpack (expected 2, got 0)') hook_impl = > hook_name = 'pytest_fixture_setup' msg = 'A plugin raised an exception during an old-style hookwrapper teardown.\nPlugin: asyncio, Hook: pytest_fixture_setup\n...For more information see https://pluggy.readthedocs.io/en/stable/api_reference.html#pluggy.PluggyTeardownRaisedWarning' /usr/lib/python3.10/site-packages/pluggy/_callers.py:49: PluggyTeardownRaisedWarning _ ERROR at teardown of TestHttpProxyPluginExamplesWithTlsInterception.test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] _ def _provide_clean_event_loop() -> None: # At this point, the event loop for the current thread is closed. # When a user calls asyncio.get_event_loop(), they will get a closed loop. # In order to avoid this side effect from pytest-asyncio, we need to replace # the current loop with a fresh one. # Note that we cannot set the loop to None, because get_event_loop only creates # a new loop, when set_event_loop has not been called. policy = asyncio.get_event_loop_policy() > new_loop = policy.new_event_loop() policy = /usr/lib/python3.10/site-packages/pytest_asyncio/plugin.py:844: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib64/python3.10/asyncio/events.py:673: in new_event_loop return self._loop_factory() self = /usr/lib64/python3.10/asyncio/unix_events.py:64: in __init__ super().__init__(selector) __class__ = selector = None self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:56: in __init__ self._make_self_pipe() __class__ = selector = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:107: in _make_self_pipe self._add_reader(self._ssock.fileno(), self._read_from_self) self = <_UnixSelectorEventLoop running=False closed=False debug=False> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <_UnixSelectorEventLoop running=False closed=False debug=False>, fd = 127 callback = > args = (), handle = key = mask = def _add_reader(self, fd, callback, *args): self._check_closed() handle = events.Handle(callback, args, self, None) try: key = self._selector.get_key(fd) except KeyError: self._selector.register(fd, selectors.EVENT_READ, (handle, None)) else: > mask, (reader, writer) = key.events, key.data E ValueError: not enough values to unpack (expected 2, got 0) args = () callback = > fd = 127 handle = key = mask = self = <_UnixSelectorEventLoop running=False closed=False debug=False> /usr/lib64/python3.10/asyncio/selector_events.py:261: ValueError =================================== FAILURES =================================== ___________________ TestHttp2WithProxy.test_http2_via_proxy ____________________ self = def test_http2_via_proxy(self) -> None: assert self.PROXY proxy_url = 'http://localhost:%d' % self.PROXY.flags.port proxies: Dict[str, Any] = ( { 'proxies': { 'all://': proxy_url, }, } # For Python>=3.11, proxies keyword is deprecated by httpx if sys.version_info < (3, 11, 0) else {'proxy': proxy_url} ) > response = httpx.get( 'https://www.google.com', headers={'accept': 'application/json'}, verify=httpx.create_ssl_context(http2=True), timeout=httpx.Timeout(timeout=5.0), **proxies, ) proxies = {'proxies': {'all://': 'http://localhost:43269'}} proxy_url = 'http://localhost:43269' self = tests/http/proxy/test_http2.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/lib/python3.10/site-packages/httpx/_api.py:198: in get return request( auth = None cert = None cookies = None follow_redirects = False headers = {'accept': 'application/json'} params = None proxies = {'all://': 'http://localhost:43269'} proxy = None timeout = Timeout(timeout=5.0) trust_env = True url = 'https://www.google.com' verify = /usr/lib/python3.10/site-packages/httpx/_api.py:97: in request with Client( auth = None cert = None content = None cookies = None data = None files = None follow_redirects = False headers = {'accept': 'application/json'} json = None method = 'GET' params = None proxies = {'all://': 'http://localhost:43269'} proxy = None timeout = Timeout(timeout=5.0) trust_env = True url = 'https://www.google.com' verify = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = def __init__( self, *, auth: AuthTypes | None = None, params: QueryParamTypes | None = None, headers: HeaderTypes | None = None, cookies: CookieTypes | None = None, verify: VerifyTypes = True, cert: CertTypes | None = None, http1: bool = True, http2: bool = False, proxy: ProxyTypes | None = None, proxies: ProxiesTypes | None = None, mounts: None | (typing.Mapping[str, BaseTransport | None]) = None, timeout: TimeoutTypes = DEFAULT_TIMEOUT_CONFIG, follow_redirects: bool = False, limits: Limits = DEFAULT_LIMITS, max_redirects: int = DEFAULT_MAX_REDIRECTS, event_hooks: None | (typing.Mapping[str, list[EventHook]]) = None, base_url: URLTypes = "", transport: BaseTransport | None = None, app: typing.Callable[..., typing.Any] | None = None, trust_env: bool = True, default_encoding: str | typing.Callable[[bytes], str] = "utf-8", ) -> None: super().__init__( auth=auth, params=params, headers=headers, cookies=cookies, timeout=timeout, follow_redirects=follow_redirects, max_redirects=max_redirects, event_hooks=event_hooks, base_url=base_url, trust_env=trust_env, default_encoding=default_encoding, ) if http2: try: import h2 # noqa except ImportError: # pragma: no cover raise ImportError( "Using http2=True, but the 'h2' package is not installed. " "Make sure to install httpx using `pip install httpx[http2]`." ) from None if proxies: message = ( "The 'proxies' argument is now deprecated." " Use 'proxy' or 'mounts' instead." ) > warnings.warn(message, DeprecationWarning) E DeprecationWarning: The 'proxies' argument is now deprecated. Use 'proxy' or 'mounts' instead. __class__ = app = None auth = None base_url = '' cert = None cookies = None default_encoding = 'utf-8' event_hooks = None follow_redirects = False headers = None http1 = True http2 = False limits = Limits(max_connections=100, max_keepalive_connections=20, keepalive_expiry=5.0) max_redirects = 20 message = "The 'proxies' argument is now deprecated. Use 'proxy' or 'mounts' instead." mounts = None params = None proxies = {'all://': 'http://localhost:43269'} proxy = None self = timeout = Timeout(timeout=5.0) transport = None trust_env = True verify = /usr/lib/python3.10/site-packages/httpx/_client.py:671: DeprecationWarning _ test_integration_with_interception_flags[--threaded --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] _ proxy_py_subprocess = 40069 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_TLS_INTERCEPTION, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_integration_with_interception_flags(proxy_py_subprocess: int) -> None: """An acceptance test for TLS interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_interception.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 40069 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh') tests/integration/test_integration.py:267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '40069', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '40069', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '40069', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '40069', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:03,373 - pid:1779717 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:03,373 - pid:1779717 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:03,376 - pid:1779717 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:03,376 - pid:1779717 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:03,376 - pid:1779717 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:03,377 - pid:1779717 [D] tcp.listen:95 - Listening on 127.0.0.1:40069 2024-05-10 14:59:03,380 - pid:1779717 [D] pool._start:153 - Started acceptor#0 process 1779718 2024-05-10 14:59:03,384 - pid:1779717 [D] pool._start:153 - Started acceptor#1 process 1779719 2024-05-10 14:59:03,387 - pid:1779717 [D] pool._start:153 - Started acceptor#2 process 1779720 2024-05-10 14:59:03,388 - pid:1779717 [D] pool.setup:109 - Started 3 acceptors in threaded mode ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:03,978 - pid:1779720 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:03,978 - pid:1779720 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:53492 2024-05-10 14:59:03,980 - pid:1779720 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:03,984 - pid:1779720 [D] acceptor._work:248 - Started work#12.2.0 in thread#140526015743680 2024-05-10 14:59:03,985 - pid:1779720 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53492 2024-05-10 14:59:03,985 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:03,985 - pid:1779720 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:03,986 - pid:1779720 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:40069 2024-05-10 14:59:03,986 - pid:1779720 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:40069 2024-05-10 14:59:03,987 - pid:1779720 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:03,987 - pid:1779720 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:03,987 - pid:1779719 [D] acceptor.accept:115 - Accepting new work#8 2024-05-10 14:59:03,988 - pid:1779719 [D] tcp_server.__init__:119 - Work#8 accepted from 127.0.0.1:53502 2024-05-10 14:59:03,989 - pid:1779719 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:03,990 - pid:1779719 [D] acceptor._work:248 - Started work#8.1.0 in thread#140526015743680 2024-05-10 14:59:03,994 - pid:1779719 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53502 2024-05-10 14:59:03,994 - pid:1779719 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:03,994 - pid:1779719 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:03,996 - pid:1779719 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:53502 2024-05-10 14:59:03,996 - pid:1779719 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:53502 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:03,996 - pid:1779719 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:03,996 - pid:1779719 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53502 2024-05-10 14:59:03,996 - pid:1779719 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:03,996 - pid:1779720 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:03,997 - pid:1779719 [I] web.access_log:266 - 127.0.0.1:53502 - GET / - curl/8.7.1 - 1.77ms 2024-05-10 14:59:03,997 - pid:1779719 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53502 has buffer False 2024-05-10 14:59:03,997 - pid:1779720 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:03,997 - pid:1779719 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:03,997 - pid:1779719 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:03,997 - pid:1779720 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:03,997 - pid:1779720 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53492 2024-05-10 14:59:03,997 - pid:1779720 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:03,997 - pid:1779720 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:03,997 - pid:1779720 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:03,997 - pid:1779720 [I] server.access_log:388 - 127.0.0.1:53492 - GET 127.0.0.1:40069/ - 404 NOT FOUND - 89 bytes - 11.43ms 2024-05-10 14:59:03,997 - pid:1779720 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:03,997 - pid:1779720 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53492 has buffer False 2024-05-10 14:59:03,998 - pid:1779720 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:03,998 - pid:1779720 [D] handler.shutdown:113 - Client connection closed [Test HTTP Request via Proxy] 2024-05-10 14:59:04,009 - pid:1779720 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:04,009 - pid:1779720 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:53512 2024-05-10 14:59:04,010 - pid:1779720 [D] acceptor._work:248 - Started work#12.2.1 in thread#140526015743680 2024-05-10 14:59:04,010 - pid:1779720 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:04,010 - pid:1779720 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53512 2024-05-10 14:59:04,011 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,011 - pid:1779720 [D] connection.recv:62 - received 136 bytes from client 2024-05-10 14:59:04,011 - pid:1779720 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:80 2024-05-10 14:59:04,021 - pid:1779720 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:80 2024-05-10 14:59:04,022 - pid:1779720 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:04,022 - pid:1779720 [D] connection.flush:101 - flushed 112 bytes to server 2024-05-10 14:59:04,175 - pid:1779720 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:04,175 - pid:1779720 [D] connection.recv:62 - received 319 bytes from server 2024-05-10 14:59:04,176 - pid:1779720 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:04,176 - pid:1779720 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53512 2024-05-10 14:59:04,176 - pid:1779720 [D] connection.flush:101 - flushed 319 bytes to client 2024-05-10 14:59:04,177 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,177 - pid:1779720 [D] tcp_server.handle_readables:203 - Connection closed by client 127.0.0.1:53512 2024-05-10 14:59:04,177 - pid:1779720 [I] server.access_log:388 - 127.0.0.1:53512 - GET httpbingo.org:80/robots.txt - 200 OK - 319 bytes - 166.58ms 2024-05-10 14:59:04,178 - pid:1779720 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:04,178 - pid:1779720 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53512 has buffer False 2024-05-10 14:59:04,178 - pid:1779720 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:04,178 - pid:1779720 [D] handler.shutdown:113 - Client connection closed Ok [Test HTTPS Request via Proxy] 2024-05-10 14:59:04,190 - pid:1779720 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:04,190 - pid:1779720 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:53518 2024-05-10 14:59:04,191 - pid:1779720 [D] acceptor._work:248 - Started work#12.2.2 in thread#140526015743680 2024-05-10 14:59:04,191 - pid:1779720 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:04,192 - pid:1779720 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53518 2024-05-10 14:59:04,192 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,192 - pid:1779720 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:04,192 - pid:1779720 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:04,199 - pid:1779720 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:04,202 - pid:1779720 [W] handler.handle_readables:240 - Exception when receiving from client connection#12 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:04,205 - pid:1779720 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:04,205 - pid:1779720 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53518 2024-05-10 14:59:04,205 - pid:1779720 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:04,205 - pid:1779720 [I] server.access_log:388 - 127.0.0.1:53518 - CONNECT httpbingo.org:443 - 0 bytes - 13.11ms 2024-05-10 14:59:04,206 - pid:1779720 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:04,206 - pid:1779720 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53518 has buffer False 2024-05-10 14:59:04,206 - pid:1779720 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:04,206 - pid:1779720 [D] handler.shutdown:113 - Client connection closed Empty response [Test Internal Web Server via Proxy] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:40069... * Connected to 127.0.0.1 (127.0.0.1) port 40069 > GET http://127.0.0.1:40069/ HTTP/1.1 > Host: 127.0.0.1:40069 > User-Agent: curl/8.7.1 > Accept: */* > Proxy-Connection: Keep-Alive > * Request completely sent off 2024-05-10 14:59:04,220 - pid:1779719 [D] acceptor.accept:115 - Accepting new work#8 2024-05-10 14:59:04,221 - pid:1779719 [D] tcp_server.__init__:119 - Work#8 accepted from 127.0.0.1:53526 2024-05-10 14:59:04,221 - pid:1779719 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:04,222 - pid:1779719 [D] acceptor._work:248 - Started work#8.1.1 in thread#140526015743680 2024-05-10 14:59:04,222 - pid:1779719 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53526 2024-05-10 14:59:04,222 - pid:1779719 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,222 - pid:1779719 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:04,223 - pid:1779719 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:40069 2024-05-10 14:59:04,223 - pid:1779719 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:40069 2024-05-10 14:59:04,223 - pid:1779720 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:04,223 - pid:1779719 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:04,223 - pid:1779719 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:04,224 - pid:1779720 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:53532 2024-05-10 14:59:04,224 - pid:1779720 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:04,224 - pid:1779720 [D] acceptor._work:248 - Started work#12.2.3 in thread#140526015743680 2024-05-10 14:59:04,225 - pid:1779720 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53532 2024-05-10 14:59:04,225 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,225 - pid:1779720 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:04,227 - pid:1779720 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:53532 2024-05-10 14:59:04,227 - pid:1779720 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:53532 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:04,227 - pid:1779720 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:04,227 - pid:1779720 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53532 2024-05-10 14:59:04,227 - pid:1779720 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:04,227 - pid:1779719 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:04,227 - pid:1779720 [I] web.access_log:266 - 127.0.0.1:53532 - GET / - curl/8.7.1 - 1.74ms 2024-05-10 14:59:04,227 - pid:1779719 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:04,227 - pid:1779720 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53532 has buffer False 2024-05-10 14:59:04,227 - pid:1779720 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:04,227 - pid:1779720 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:04,228 - pid:1779719 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:04,228 - pid:1779719 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53526 2024-05-10 14:59:04,228 - pid:1779719 [D] connection.flush:101 - flushed 89 bytes to client < HTTP/1.1 404 NOT FOUND < Server: proxy.py v2.4.4 < Content-Length: 0 < Connection: close < 2024-05-10 14:59:04,228 - pid:1779719 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 0 0 0 0 2024-05-10 14:59:04,228 - pid:1779719 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection 2024-05-10 14:59:04,228 - pid:1779719 [I] server.access_log:388 - 127.0.0.1:53526 - GET 127.0.0.1:40069/ - 404 NOT FOUND - 89 bytes - 5.44ms 2024-05-10 14:59:04,228 - pid:1779719 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:04,228 - pid:1779719 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53526 has buffer False 2024-05-10 14:59:04,228 - pid:1779719 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:04,228 - pid:1779719 [D] handler.shutdown:113 - Client connection closed [Test Download File Hash Verifies 1] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:40069... * Connected to 127.0.0.1 (127.0.0.1) port 40069 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to files.pythonhosted.org:443 > CONNECT files.pythonhosted.org:443 HTTP/1.1 > Host: files.pythonhosted.org:443 > User-Agent: curl/8.7.1 > Proxy-Connection: Keep-Alive > 2024-05-10 14:59:04,245 - pid:1779720 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:04,245 - pid:1779720 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:53540 2024-05-10 14:59:04,246 - pid:1779720 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:04,246 - pid:1779720 [D] acceptor._work:248 - Started work#12.2.4 in thread#140526015743680 2024-05-10 14:59:04,247 - pid:1779720 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53540 2024-05-10 14:59:04,247 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,247 - pid:1779720 [D] connection.recv:62 - received 135 bytes from client 2024-05-10 14:59:04,247 - pid:1779720 [D] server.connect_upstream:571 - Connecting to upstream files.pythonhosted.org:443 2024-05-10 14:59:04,268 - pid:1779720 [D] server.connect_upstream:606 - Connected to upstream files.pythonhosted.org:443 2024-05-10 14:59:04,269 - pid:1779720 [W] handler.handle_readables:240 - Exception when receiving from client connection#12 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:04,270 - pid:1779720 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:04,270 - pid:1779720 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53540 2024-05-10 14:59:04,270 - pid:1779720 [D] connection.flush:101 - flushed 39 bytes to client < HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 2024-05-10 14:59:04,270 - pid:1779720 [I] server.access_log:388 - 127.0.0.1:53540 - CONNECT files.pythonhosted.org:443 - 0 bytes - 22.99ms 2024-05-10 14:59:04,270 - pid:1779720 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:04,270 - pid:1779720 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53540 has buffer False 2024-05-10 14:59:04,270 - pid:1779720 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:04,270 - pid:1779720 [D] handler.shutdown:113 - Client connection closed * ALPN: curl offers h2,http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * CAfile: /tmp/certificates/ca-cert.pem * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 cat: downloaded.whl: No such file or directory -: FAILED sha256sum: WARNING: 1 computed checksum did NOT match rm: cannot remove 'downloaded.whl': No such file or directory [Test Download File Hash Verifies 2] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:40069... * Connected to 127.0.0.1 (127.0.0.1) port 40069 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to files.pythonhosted.org:443 > CONNECT files.pythonhosted.org:443 HTTP/1.1 > Host: files.pythonhosted.org:443 > User-Agent: curl/8.7.1 > Proxy-Connection: Keep-Alive > 2024-05-10 14:59:04,294 - pid:1779720 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:04,294 - pid:1779720 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:53546 2024-05-10 14:59:04,295 - pid:1779720 [D] acceptor._work:248 - Started work#12.2.5 in thread#140526015743680 2024-05-10 14:59:04,295 - pid:1779720 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:04,295 - pid:1779720 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:53546 2024-05-10 14:59:04,296 - pid:1779720 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:04,296 - pid:1779720 [D] connection.recv:62 - received 135 bytes from client 2024-05-10 14:59:04,296 - pid:1779720 [D] server.connect_upstream:571 - Connecting to upstream files.pythonhosted.org:443 2024-05-10 14:59:04,303 - pid:1779720 [D] server.connect_upstream:606 - Connected to upstream files.pythonhosted.org:443 2024-05-10 14:59:04,304 - pid:1779720 [W] handler.handle_readables:240 - Exception when receiving from client connection#12 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:04,305 - pid:1779720 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:04,305 - pid:1779720 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:53546 2024-05-10 14:59:04,305 - pid:1779720 [D] connection.flush:101 - flushed 39 bytes to client < HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 2024-05-10 14:59:04,305 - pid:1779720 [I] server.access_log:388 - 127.0.0.1:53546 - CONNECT files.pythonhosted.org:443 - 0 bytes - 9.17ms 2024-05-10 14:59:04,305 - pid:1779720 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:04,305 - pid:1779720 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:53546 has buffer False 2024-05-10 14:59:04,305 - pid:1779720 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:04,305 - pid:1779720 [D] handler.shutdown:113 - Client connection closed * ALPN: curl offers h2,http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * CAfile: /tmp/certificates/ca-cert.pem * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 cat: downloaded.whl: No such file or directory -: FAILED sha256sum: WARNING: 1 computed checksum did NOT match rm: cannot remove 'downloaded.whl': No such file or directory --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:04,413 - pid:1779717 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:04,414 - pid:1779717 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:05,295 - pid:1779719 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:05,296 - pid:1779720 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:05,296 - pid:1779718 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:05,302 - pid:1779717 [D] pool.shutdown:135 - Acceptors shutdown _ test_integration_with_interception_flags[--threadless --local-executor 0 --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] _ proxy_py_subprocess = 34121 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_TLS_INTERCEPTION, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_integration_with_interception_flags(proxy_py_subprocess: int) -> None: """An acceptance test for TLS interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_interception.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 34121 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh') tests/integration/test_integration.py:267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '34121', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '34121', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '34121', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '34121', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:05,653 - pid:1779748 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:05,653 - pid:1779748 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:05,655 - pid:1779748 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:05,655 - pid:1779748 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:05,655 - pid:1779748 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:05,655 - pid:1779748 [D] tcp.listen:95 - Listening on 127.0.0.1:34121 2024-05-10 14:59:05,658 - pid:1779748 [D] pool._start_worker:136 - Started threadless#0 process#1779749 2024-05-10 14:59:05,660 - pid:1779748 [D] pool._start_worker:136 - Started threadless#1 process#1779750 2024-05-10 14:59:05,661 - pid:1779749 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:05,662 - pid:1779749 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:05,663 - pid:1779750 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:05,664 - pid:1779748 [D] pool._start_worker:136 - Started threadless#2 process#1779751 2024-05-10 14:59:05,664 - pid:1779748 [I] pool.setup:102 - Started 3 threadless workers 2024-05-10 14:59:05,664 - pid:1779750 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:05,667 - pid:1779748 [D] pool._start:153 - Started acceptor#0 process 1779752 2024-05-10 14:59:05,666 - pid:1779751 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:05,667 - pid:1779751 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:05,669 - pid:1779748 [D] pool._start:153 - Started acceptor#1 process 1779753 2024-05-10 14:59:05,674 - pid:1779748 [D] pool._start:153 - Started acceptor#2 process 1779754 2024-05-10 14:59:05,674 - pid:1779748 [D] pool.setup:109 - Started 3 acceptors in threadless (remote) mode ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:06,379 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,380 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.0 to worker#2 2024-05-10 14:59:06,381 - pid:1779751 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:36282 2024-05-10 14:59:06,382 - pid:1779751 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36282 2024-05-10 14:59:06,382 - pid:1779751 [D] threadless._update_work_events:197 - fd#21 registered for mask#1 by work#22 2024-05-10 14:59:06,383 - pid:1779751 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,383 - pid:1779751 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:06,384 - pid:1779751 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:34121 2024-05-10 14:59:06,385 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,385 - pid:1779751 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:34121 2024-05-10 14:59:06,385 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.1 to worker#0 2024-05-10 14:59:06,386 - pid:1779751 [D] threadless._update_work_events:197 - fd#23 registered for mask#3 by work#22 2024-05-10 14:59:06,386 - pid:1779751 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:06,386 - pid:1779749 [D] tcp_server.__init__:119 - Work#13 accepted from 127.0.0.1:36298 2024-05-10 14:59:06,386 - pid:1779751 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:06,386 - pid:1779749 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36298 2024-05-10 14:59:06,386 - pid:1779749 [D] threadless._update_work_events:197 - fd#13 registered for mask#1 by work#14 2024-05-10 14:59:06,387 - pid:1779751 [D] threadless._update_work_events:166 - fd#23 modified for mask#1 by work#22 2024-05-10 14:59:06,387 - pid:1779749 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,387 - pid:1779749 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:06,392 - pid:1779749 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:36298 2024-05-10 14:59:06,392 - pid:1779749 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:36298 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:06,392 - pid:1779749 [D] threadless._update_work_events:166 - fd#13 modified for mask#2 by work#14 2024-05-10 14:59:06,393 - pid:1779749 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,393 - pid:1779749 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36298 2024-05-10 14:59:06,393 - pid:1779749 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:06,393 - pid:1779749 [D] threadless._cleanup:311 - fd#13 unregistered by work#14 2024-05-10 14:59:06,393 - pid:1779749 [I] web.access_log:266 - 127.0.0.1:36298 - GET / - curl/8.7.1 - 5.59ms 2024-05-10 14:59:06,393 - pid:1779751 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:06,393 - pid:1779749 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36298 has buffer False 2024-05-10 14:59:06,393 - pid:1779749 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,393 - pid:1779749 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:06,393 - pid:1779751 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:06,394 - pid:1779751 [D] threadless._update_work_events:166 - fd#21 modified for mask#3 by work#22 2024-05-10 14:59:06,394 - pid:1779751 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,394 - pid:1779751 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36282 2024-05-10 14:59:06,394 - pid:1779751 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:06,395 - pid:1779751 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:06,395 - pid:1779751 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:06,395 - pid:1779751 [D] threadless._cleanup:311 - fd#21 unregistered by work#22 2024-05-10 14:59:06,395 - pid:1779751 [D] threadless._cleanup:311 - fd#23 unregistered by work#22 2024-05-10 14:59:06,395 - pid:1779751 [I] server.access_log:388 - 127.0.0.1:36282 - GET 127.0.0.1:34121/ - 404 NOT FOUND - 89 bytes - 11.14ms 2024-05-10 14:59:06,396 - pid:1779751 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:06,396 - pid:1779751 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36282 has buffer False 2024-05-10 14:59:06,396 - pid:1779751 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,396 - pid:1779751 [D] handler.shutdown:113 - Client connection closed [Test HTTP Request via Proxy] 2024-05-10 14:59:06,406 - pid:1779753 [D] acceptor.accept:115 - Accepting new work#20 2024-05-10 14:59:06,408 - pid:1779753 [D] acceptor._work:234 - Dispatched work#20.1.0 to worker#1 2024-05-10 14:59:06,409 - pid:1779750 [D] tcp_server.__init__:119 - Work#17 accepted from 127.0.0.1:36302 2024-05-10 14:59:06,410 - pid:1779750 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36302 2024-05-10 14:59:06,414 - pid:1779750 [D] threadless._update_work_events:197 - fd#17 registered for mask#1 by work#18 2024-05-10 14:59:06,414 - pid:1779750 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,414 - pid:1779750 [D] connection.recv:62 - received 136 bytes from client 2024-05-10 14:59:06,415 - pid:1779750 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:80 2024-05-10 14:59:06,426 - pid:1779750 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:80 2024-05-10 14:59:06,427 - pid:1779750 [D] threadless._update_work_events:197 - fd#19 registered for mask#3 by work#18 2024-05-10 14:59:06,428 - pid:1779750 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:06,428 - pid:1779750 [D] connection.flush:101 - flushed 112 bytes to server 2024-05-10 14:59:06,428 - pid:1779750 [D] threadless._update_work_events:166 - fd#19 modified for mask#1 by work#18 2024-05-10 14:59:06,587 - pid:1779750 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:06,587 - pid:1779750 [D] connection.recv:62 - received 319 bytes from server 2024-05-10 14:59:06,588 - pid:1779750 [D] threadless._update_work_events:166 - fd#17 modified for mask#3 by work#18 2024-05-10 14:59:06,588 - pid:1779750 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,588 - pid:1779750 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36302 2024-05-10 14:59:06,588 - pid:1779750 [D] connection.flush:101 - flushed 319 bytes to client 2024-05-10 14:59:06,589 - pid:1779750 [D] threadless._update_work_events:166 - fd#17 modified for mask#1 by work#18 2024-05-10 14:59:06,589 - pid:1779750 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,589 - pid:1779750 [D] tcp_server.handle_readables:203 - Connection closed by client 127.0.0.1:36302 2024-05-10 14:59:06,590 - pid:1779750 [D] threadless._cleanup:311 - fd#17 unregistered by work#18 2024-05-10 14:59:06,590 - pid:1779750 [D] threadless._cleanup:311 - fd#19 unregistered by work#18 2024-05-10 14:59:06,590 - pid:1779750 [I] server.access_log:388 - 127.0.0.1:36302 - GET httpbingo.org:80/robots.txt - 200 OK - 319 bytes - 175.26ms 2024-05-10 14:59:06,590 - pid:1779750 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:06,590 - pid:1779750 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36302 has buffer False 2024-05-10 14:59:06,591 - pid:1779750 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,591 - pid:1779750 [D] handler.shutdown:113 - Client connection closed Ok [Test HTTPS Request via Proxy] 2024-05-10 14:59:06,601 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,602 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.2 to worker#1 2024-05-10 14:59:06,602 - pid:1779750 [D] tcp_server.__init__:119 - Work#17 accepted from 127.0.0.1:36316 2024-05-10 14:59:06,603 - pid:1779750 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36316 2024-05-10 14:59:06,603 - pid:1779750 [D] threadless._update_work_events:197 - fd#17 registered for mask#1 by work#18 2024-05-10 14:59:06,603 - pid:1779750 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,603 - pid:1779750 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:06,604 - pid:1779750 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:06,610 - pid:1779750 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:06,619 - pid:1779750 [W] handler.handle_readables:240 - Exception when receiving from client connection#17 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:06,624 - pid:1779750 [D] threadless._update_work_events:166 - fd#17 modified for mask#3 by work#18 2024-05-10 14:59:06,625 - pid:1779750 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#18 2024-05-10 14:59:06,625 - pid:1779750 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,625 - pid:1779750 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36316 2024-05-10 14:59:06,625 - pid:1779750 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:06,626 - pid:1779750 [D] threadless._cleanup:311 - fd#17 unregistered by work#18 2024-05-10 14:59:06,626 - pid:1779750 [D] threadless._cleanup:311 - fd#19 unregistered by work#18 2024-05-10 14:59:06,626 - pid:1779750 [I] server.access_log:388 - 127.0.0.1:36316 - CONNECT httpbingo.org:443 - 0 bytes - 22.29ms 2024-05-10 14:59:06,626 - pid:1779750 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:06,626 - pid:1779750 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36316 has buffer False 2024-05-10 14:59:06,627 - pid:1779750 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,627 - pid:1779750 [D] handler.shutdown:113 - Client connection closed Empty response [Test Internal Web Server via Proxy] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:34121... * Connected to 127.0.0.1 (127.0.0.1) port 34121 > GET http://127.0.0.1:34121/ HTTP/1.1 > Host: 127.0.0.1:34121 > User-Agent: curl/8.7.1 > Accept: */* > Proxy-Connection: Keep-Alive > * Request completely sent off 2024-05-10 14:59:06,641 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,642 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.3 to worker#2 2024-05-10 14:59:06,642 - pid:1779751 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:36326 2024-05-10 14:59:06,642 - pid:1779751 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36326 2024-05-10 14:59:06,643 - pid:1779751 [D] threadless._update_work_events:197 - fd#21 registered for mask#1 by work#22 2024-05-10 14:59:06,643 - pid:1779751 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,643 - pid:1779751 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:06,644 - pid:1779751 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:34121 2024-05-10 14:59:06,644 - pid:1779751 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:34121 2024-05-10 14:59:06,644 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,644 - pid:1779751 [D] threadless._update_work_events:197 - fd#23 registered for mask#3 by work#22 2024-05-10 14:59:06,644 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.4 to worker#0 2024-05-10 14:59:06,645 - pid:1779751 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:06,645 - pid:1779751 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:06,645 - pid:1779749 [D] tcp_server.__init__:119 - Work#13 accepted from 127.0.0.1:36338 2024-05-10 14:59:06,645 - pid:1779749 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36338 2024-05-10 14:59:06,645 - pid:1779751 [D] threadless._update_work_events:166 - fd#23 modified for mask#1 by work#22 2024-05-10 14:59:06,645 - pid:1779749 [D] threadless._update_work_events:197 - fd#13 registered for mask#1 by work#14 2024-05-10 14:59:06,646 - pid:1779749 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,646 - pid:1779749 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:06,646 - pid:1779749 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:36338 2024-05-10 14:59:06,647 - pid:1779749 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:36338 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:06,647 - pid:1779749 [D] threadless._update_work_events:166 - fd#13 modified for mask#2 by work#14 2024-05-10 14:59:06,647 - pid:1779749 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,647 - pid:1779749 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36338 2024-05-10 14:59:06,648 - pid:1779749 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:06,648 - pid:1779749 [D] threadless._cleanup:311 - fd#13 unregistered by work#14 2024-05-10 14:59:06,648 - pid:1779751 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:06,648 - pid:1779749 [I] web.access_log:266 - 127.0.0.1:36338 - GET / - curl/8.7.1 - 1.70ms 2024-05-10 14:59:06,648 - pid:1779749 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36338 has buffer False 2024-05-10 14:59:06,648 - pid:1779751 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:06,648 - pid:1779749 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,648 - pid:1779749 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:06,649 - pid:1779751 [D] threadless._update_work_events:166 - fd#21 modified for mask#3 by work#22 2024-05-10 14:59:06,649 - pid:1779751 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,649 - pid:1779751 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36326 < HTTP/1.1 404 NOT FOUND < Server: proxy.py v2.4.4 < Content-Length: 0 < Connection: close < 0 0 0 0 0 0 0 2024-05-10 14:59:06,649 - pid:1779751 [D] connection.flush:101 - flushed 89 bytes to client 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection 2024-05-10 14:59:06,649 - pid:1779751 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:06,650 - pid:1779751 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:06,650 - pid:1779751 [D] threadless._cleanup:311 - fd#21 unregistered by work#22 2024-05-10 14:59:06,650 - pid:1779751 [D] threadless._cleanup:311 - fd#23 unregistered by work#22 2024-05-10 14:59:06,650 - pid:1779751 [I] server.access_log:388 - 127.0.0.1:36326 - GET 127.0.0.1:34121/ - 404 NOT FOUND - 89 bytes - 6.65ms 2024-05-10 14:59:06,650 - pid:1779751 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:06,651 - pid:1779751 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36326 has buffer False 2024-05-10 14:59:06,651 - pid:1779751 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,651 - pid:1779751 [D] handler.shutdown:113 - Client connection closed [Test Download File Hash Verifies 1] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:34121... * Connected to 127.0.0.1 (127.0.0.1) port 34121 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to files.pythonhosted.org:443 > CONNECT files.pythonhosted.org:443 HTTP/1.1 > Host: files.pythonhosted.org:443 > User-Agent: curl/8.7.1 > Proxy-Connection: Keep-Alive > 2024-05-10 14:59:06,665 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,666 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.5 to worker#1 2024-05-10 14:59:06,666 - pid:1779750 [D] tcp_server.__init__:119 - Work#17 accepted from 127.0.0.1:36342 2024-05-10 14:59:06,666 - pid:1779750 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36342 2024-05-10 14:59:06,666 - pid:1779750 [D] threadless._update_work_events:197 - fd#17 registered for mask#1 by work#18 2024-05-10 14:59:06,667 - pid:1779750 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,667 - pid:1779750 [D] connection.recv:62 - received 135 bytes from client 2024-05-10 14:59:06,667 - pid:1779750 [D] server.connect_upstream:571 - Connecting to upstream files.pythonhosted.org:443 2024-05-10 14:59:06,675 - pid:1779750 [D] server.connect_upstream:606 - Connected to upstream files.pythonhosted.org:443 2024-05-10 14:59:06,677 - pid:1779750 [W] handler.handle_readables:240 - Exception when receiving from client connection#17 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:06,678 - pid:1779750 [D] threadless._update_work_events:166 - fd#17 modified for mask#3 by work#18 2024-05-10 14:59:06,678 - pid:1779750 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#18 2024-05-10 14:59:06,678 - pid:1779750 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,678 - pid:1779750 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36342 2024-05-10 14:59:06,679 - pid:1779750 [D] connection.flush:101 - flushed 39 bytes to client < HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 2024-05-10 14:59:06,679 - pid:1779750 [D] threadless._cleanup:311 - fd#17 unregistered by work#18 2024-05-10 14:59:06,679 - pid:1779750 [D] threadless._cleanup:311 - fd#19 unregistered by work#18 2024-05-10 14:59:06,679 - pid:1779750 [I] server.access_log:388 - 127.0.0.1:36342 - CONNECT files.pythonhosted.org:443 - 0 bytes - 11.83ms 2024-05-10 14:59:06,679 - pid:1779750 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:06,680 - pid:1779750 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36342 has buffer False 2024-05-10 14:59:06,680 - pid:1779750 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,680 - pid:1779750 [D] handler.shutdown:113 - Client connection closed * ALPN: curl offers h2,http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * CAfile: /tmp/certificates/ca-cert.pem * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 cat: downloaded.whl: No such file or directory -: FAILED sha256sum: WARNING: 1 computed checksum did NOT match rm: cannot remove 'downloaded.whl': No such file or directory [Test Download File Hash Verifies 2] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:34121... * Connected to 127.0.0.1 (127.0.0.1) port 34121 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to files.pythonhosted.org:443 > CONNECT files.pythonhosted.org:443 HTTP/1.1 > Host: files.pythonhosted.org:443 > User-Agent: curl/8.7.1 > Proxy-Connection: Keep-Alive > 2024-05-10 14:59:06,700 - pid:1779754 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:06,701 - pid:1779754 [D] acceptor._work:234 - Dispatched work#24.2.6 to worker#2 2024-05-10 14:59:06,701 - pid:1779751 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:36350 2024-05-10 14:59:06,701 - pid:1779751 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:36350 2024-05-10 14:59:06,701 - pid:1779751 [D] threadless._update_work_events:197 - fd#21 registered for mask#1 by work#22 2024-05-10 14:59:06,702 - pid:1779751 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:06,702 - pid:1779751 [D] connection.recv:62 - received 135 bytes from client 2024-05-10 14:59:06,702 - pid:1779751 [D] server.connect_upstream:571 - Connecting to upstream files.pythonhosted.org:443 2024-05-10 14:59:06,717 - pid:1779751 [D] server.connect_upstream:606 - Connected to upstream files.pythonhosted.org:443 2024-05-10 14:59:06,725 - pid:1779751 [W] handler.handle_readables:240 - Exception when receiving from client connection#21 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:06,731 - pid:1779751 [D] threadless._update_work_events:166 - fd#21 modified for mask#3 by work#22 2024-05-10 14:59:06,731 - pid:1779751 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#22 2024-05-10 14:59:06,731 - pid:1779751 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:06,731 - pid:1779751 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:36350 2024-05-10 14:59:06,732 - pid:1779751 [D] connection.flush:101 - flushed 39 bytes to client < HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 2024-05-10 14:59:06,732 - pid:1779751 [D] threadless._cleanup:311 - fd#21 unregistered by work#22 2024-05-10 14:59:06,732 - pid:1779751 [D] threadless._cleanup:311 - fd#23 unregistered by work#22 2024-05-10 14:59:06,732 - pid:1779751 [I] server.access_log:388 - 127.0.0.1:36350 - CONNECT files.pythonhosted.org:443 - 0 bytes - 30.07ms 2024-05-10 14:59:06,732 - pid:1779751 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:06,733 - pid:1779751 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:36350 has buffer False 2024-05-10 14:59:06,733 - pid:1779751 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:06,733 - pid:1779751 [D] handler.shutdown:113 - Client connection closed * ALPN: curl offers h2,http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * CAfile: /tmp/certificates/ca-cert.pem * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 cat: downloaded.whl: No such file or directory -: FAILED sha256sum: WARNING: 1 computed checksum did NOT match rm: cannot remove 'downloaded.whl': No such file or directory --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:06,842 - pid:1779748 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:06,842 - pid:1779748 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:07,667 - pid:1779752 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:07,702 - pid:1779753 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:07,702 - pid:1779754 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:07,707 - pid:1779748 [D] pool.shutdown:135 - Acceptors shutdown 2024-05-10 14:59:08,430 - pid:1779748 [D] pool._shutdown_workers:148 - Stopped threadless process#1779751 2024-05-10 14:59:08,452 - pid:1779748 [D] pool._shutdown_workers:148 - Stopped threadless process#1779750 2024-05-10 14:59:08,547 - pid:1779748 [D] pool._shutdown_workers:148 - Stopped threadless process#1779749 2024-05-10 14:59:08,547 - pid:1779748 [I] pool.shutdown:112 - Stopped 3 threadless workers _ test_integration_with_interception_flags[--threadless --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] _ proxy_py_subprocess = 36331 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_TLS_INTERCEPTION, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_integration_with_interception_flags(proxy_py_subprocess: int) -> None: """An acceptance test for TLS interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_interception.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 36331 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh') tests/integration/test_integration.py:267: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '36331', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '36331', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '36331', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_interception.sh', '36331', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:08,954 - pid:1779783 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:08,954 - pid:1779783 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:08,956 - pid:1779783 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:08,956 - pid:1779783 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:08,956 - pid:1779783 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:08,956 - pid:1779783 [D] tcp.listen:95 - Listening on 127.0.0.1:36331 2024-05-10 14:59:08,959 - pid:1779783 [D] pool._start:153 - Started acceptor#0 process 1779784 2024-05-10 14:59:08,961 - pid:1779783 [D] pool._start:153 - Started acceptor#1 process 1779785 2024-05-10 14:59:08,964 - pid:1779783 [D] pool._start:153 - Started acceptor#2 process 1779786 2024-05-10 14:59:08,964 - pid:1779783 [D] pool.setup:109 - Started 3 acceptors in threadless (local) mode 2024-05-10 14:59:08,968 - pid:1779784 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:08,969 - pid:1779784 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:08,968 - pid:1779785 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:08,972 - pid:1779785 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:08,974 - pid:1779786 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:08,975 - pid:1779786 [D] threadless.run:422 - Working on 0 works ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:09,659 - pid:1779784 [D] acceptor.accept:115 - Accepting new work#15 2024-05-10 14:59:09,680 - pid:1779784 [D] tcp_server.__init__:119 - Work#15 accepted from 127.0.0.1:51078 2024-05-10 14:59:09,680 - pid:1779784 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51078 2024-05-10 14:59:09,681 - pid:1779784 [D] threadless._update_work_events:197 - fd#15 registered for mask#1 by work#15 2024-05-10 14:59:09,682 - pid:1779784 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,682 - pid:1779784 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:09,683 - pid:1779784 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:36331 2024-05-10 14:59:09,683 - pid:1779784 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:36331 2024-05-10 14:59:09,684 - pid:1779785 [D] acceptor.accept:115 - Accepting new work#19 2024-05-10 14:59:09,684 - pid:1779784 [D] threadless._update_work_events:197 - fd#16 registered for mask#3 by work#15 2024-05-10 14:59:09,685 - pid:1779784 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:09,685 - pid:1779784 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:09,685 - pid:1779784 [D] threadless._update_work_events:166 - fd#16 modified for mask#1 by work#15 2024-05-10 14:59:09,705 - pid:1779785 [D] tcp_server.__init__:119 - Work#19 accepted from 127.0.0.1:51084 2024-05-10 14:59:09,706 - pid:1779785 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51084 2024-05-10 14:59:09,706 - pid:1779785 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#19 2024-05-10 14:59:09,707 - pid:1779785 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,707 - pid:1779785 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:09,711 - pid:1779785 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:51084 2024-05-10 14:59:09,711 - pid:1779785 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:51084 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:09,711 - pid:1779785 [D] threadless._update_work_events:166 - fd#19 modified for mask#2 by work#19 2024-05-10 14:59:09,712 - pid:1779785 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:09,712 - pid:1779785 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51084 2024-05-10 14:59:09,712 - pid:1779785 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:09,712 - pid:1779784 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:09,712 - pid:1779785 [D] threadless._cleanup:311 - fd#19 unregistered by work#19 2024-05-10 14:59:09,712 - pid:1779784 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:09,713 - pid:1779785 [I] web.access_log:266 - 127.0.0.1:51084 - GET / - curl/8.7.1 - 4.57ms 2024-05-10 14:59:09,713 - pid:1779784 [D] threadless._update_work_events:166 - fd#15 modified for mask#3 by work#15 2024-05-10 14:59:09,713 - pid:1779785 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51084 has buffer False 2024-05-10 14:59:09,713 - pid:1779785 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:09,713 - pid:1779785 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:09,713 - pid:1779784 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:09,713 - pid:1779784 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51078 2024-05-10 14:59:09,714 - pid:1779784 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:09,714 - pid:1779784 [D] threadless._update_work_events:166 - fd#15 modified for mask#1 by work#15 2024-05-10 14:59:09,714 - pid:1779784 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,714 - pid:1779784 [D] tcp_server.handle_readables:203 - Connection closed by client 127.0.0.1:51078 2024-05-10 14:59:09,715 - pid:1779784 [D] threadless._cleanup:311 - fd#15 unregistered by work#15 2024-05-10 14:59:09,715 - pid:1779784 [D] threadless._cleanup:311 - fd#16 unregistered by work#15 [Test HTTP Request via Proxy] 2024-05-10 14:59:09,715 - pid:1779784 [I] server.access_log:388 - 127.0.0.1:51078 - GET 127.0.0.1:36331/ - 404 NOT FOUND - 89 bytes - 32.39ms 2024-05-10 14:59:09,715 - pid:1779784 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:09,715 - pid:1779784 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51078 has buffer False 2024-05-10 14:59:09,716 - pid:1779784 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:09,716 - pid:1779784 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:09,725 - pid:1779784 [D] acceptor.accept:115 - Accepting new work#15 2024-05-10 14:59:09,741 - pid:1779784 [D] tcp_server.__init__:119 - Work#15 accepted from 127.0.0.1:51092 2024-05-10 14:59:09,741 - pid:1779784 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51092 2024-05-10 14:59:09,742 - pid:1779784 [D] threadless._update_work_events:197 - fd#15 registered for mask#1 by work#15 2024-05-10 14:59:09,742 - pid:1779784 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,742 - pid:1779784 [D] connection.recv:62 - received 136 bytes from client 2024-05-10 14:59:09,743 - pid:1779784 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:80 2024-05-10 14:59:09,757 - pid:1779784 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:80 2024-05-10 14:59:09,757 - pid:1779784 [D] threadless._update_work_events:197 - fd#16 registered for mask#3 by work#15 2024-05-10 14:59:09,758 - pid:1779784 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:09,758 - pid:1779784 [D] connection.flush:101 - flushed 112 bytes to server 2024-05-10 14:59:09,759 - pid:1779784 [D] threadless._update_work_events:166 - fd#16 modified for mask#1 by work#15 2024-05-10 14:59:09,912 - pid:1779784 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:09,912 - pid:1779784 [D] connection.recv:62 - received 319 bytes from server 2024-05-10 14:59:09,913 - pid:1779784 [D] threadless._update_work_events:166 - fd#15 modified for mask#3 by work#15 2024-05-10 14:59:09,913 - pid:1779784 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:09,914 - pid:1779784 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51092 2024-05-10 14:59:09,914 - pid:1779784 [D] connection.flush:101 - flushed 319 bytes to client 2024-05-10 14:59:09,914 - pid:1779784 [D] threadless._update_work_events:166 - fd#15 modified for mask#1 by work#15 2024-05-10 14:59:09,914 - pid:1779784 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,915 - pid:1779784 [D] tcp_server.handle_readables:203 - Connection closed by client 127.0.0.1:51092 2024-05-10 14:59:09,915 - pid:1779784 [D] threadless._cleanup:311 - fd#15 unregistered by work#15 2024-05-10 14:59:09,915 - pid:1779784 [D] threadless._cleanup:311 - fd#16 unregistered by work#15 2024-05-10 14:59:09,915 - pid:1779784 [I] server.access_log:388 - 127.0.0.1:51092 - GET httpbingo.org:80/robots.txt - 200 OK - 319 bytes - 172.60ms 2024-05-10 14:59:09,915 - pid:1779784 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:09,916 - pid:1779784 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51092 has buffer False 2024-05-10 14:59:09,916 - pid:1779784 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:09,916 - pid:1779784 [D] handler.shutdown:113 - Client connection closed Ok [Test HTTPS Request via Proxy] 2024-05-10 14:59:09,928 - pid:1779785 [D] acceptor.accept:115 - Accepting new work#19 2024-05-10 14:59:09,941 - pid:1779785 [D] tcp_server.__init__:119 - Work#19 accepted from 127.0.0.1:51104 2024-05-10 14:59:09,941 - pid:1779785 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51104 2024-05-10 14:59:09,941 - pid:1779785 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#19 2024-05-10 14:59:09,942 - pid:1779785 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,942 - pid:1779785 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:09,942 - pid:1779785 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:09,956 - pid:1779785 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:09,963 - pid:1779785 [W] handler.handle_readables:240 - Exception when receiving from client connection#19 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:09,968 - pid:1779785 [D] threadless._update_work_events:166 - fd#19 modified for mask#3 by work#19 2024-05-10 14:59:09,969 - pid:1779785 [D] threadless._update_work_events:197 - fd#20 registered for mask#1 by work#19 2024-05-10 14:59:09,969 - pid:1779785 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:09,969 - pid:1779785 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51104 2024-05-10 14:59:09,970 - pid:1779785 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:09,970 - pid:1779785 [D] threadless._cleanup:311 - fd#19 unregistered by work#19 2024-05-10 14:59:09,970 - pid:1779785 [D] threadless._cleanup:311 - fd#20 unregistered by work#19 2024-05-10 14:59:09,970 - pid:1779785 [I] server.access_log:388 - 127.0.0.1:51104 - CONNECT httpbingo.org:443 - 0 bytes - 28.00ms 2024-05-10 14:59:09,971 - pid:1779785 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:09,971 - pid:1779785 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51104 has buffer False 2024-05-10 14:59:09,971 - pid:1779785 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:09,971 - pid:1779785 [D] handler.shutdown:113 - Client connection closed Empty response [Test Internal Web Server via Proxy] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:36331... * Connected to 127.0.0.1 (127.0.0.1) port 36331 > GET http://127.0.0.1:36331/ HTTP/1.1 > Host: 127.0.0.1:36331 > User-Agent: curl/8.7.1 > Accept: */* > Proxy-Connection: Keep-Alive > * Request completely sent off 2024-05-10 14:59:09,985 - pid:1779786 [D] acceptor.accept:115 - Accepting new work#23 2024-05-10 14:59:09,986 - pid:1779786 [D] tcp_server.__init__:119 - Work#23 accepted from 127.0.0.1:51110 2024-05-10 14:59:09,987 - pid:1779786 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51110 2024-05-10 14:59:09,987 - pid:1779786 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#23 2024-05-10 14:59:09,988 - pid:1779786 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,988 - pid:1779786 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:09,989 - pid:1779786 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:36331 2024-05-10 14:59:09,990 - pid:1779786 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:36331 2024-05-10 14:59:09,990 - pid:1779784 [D] acceptor.accept:115 - Accepting new work#15 2024-05-10 14:59:09,991 - pid:1779786 [D] threadless._update_work_events:197 - fd#24 registered for mask#3 by work#23 2024-05-10 14:59:09,991 - pid:1779786 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:09,992 - pid:1779786 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:09,992 - pid:1779786 [D] threadless._update_work_events:166 - fd#24 modified for mask#1 by work#23 2024-05-10 14:59:09,992 - pid:1779784 [D] tcp_server.__init__:119 - Work#15 accepted from 127.0.0.1:51120 2024-05-10 14:59:09,992 - pid:1779784 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51120 2024-05-10 14:59:09,992 - pid:1779784 [D] threadless._update_work_events:197 - fd#15 registered for mask#1 by work#15 2024-05-10 14:59:09,993 - pid:1779784 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:09,993 - pid:1779784 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:09,996 - pid:1779784 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:51120 2024-05-10 14:59:09,996 - pid:1779784 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:51120 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:09,997 - pid:1779784 [D] threadless._update_work_events:166 - fd#15 modified for mask#2 by work#15 2024-05-10 14:59:09,997 - pid:1779784 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:09,997 - pid:1779784 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51120 2024-05-10 14:59:09,997 - pid:1779784 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:09,998 - pid:1779784 [D] threadless._cleanup:311 - fd#15 unregistered by work#15 2024-05-10 14:59:09,998 - pid:1779786 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:09,998 - pid:1779784 [I] web.access_log:266 - 127.0.0.1:51120 - GET / - curl/8.7.1 - 4.34ms 2024-05-10 14:59:09,998 - pid:1779784 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51120 has buffer False 2024-05-10 14:59:09,998 - pid:1779786 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:09,998 - pid:1779784 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:09,998 - pid:1779784 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:09,999 - pid:1779786 [D] threadless._update_work_events:166 - fd#23 modified for mask#3 by work#23 2024-05-10 14:59:09,999 - pid:1779786 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:09,999 - pid:1779786 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51110 < HTTP/1.1 404 NOT FOUND < Server: proxy.py v2.4.4 < Content-Length: 0 < Connection: close < 2024-05-10 14:59:09,999 - pid:1779786 [D] connection.flush:101 - flushed 89 bytes to client 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:--2024-05-10 14:59:10,000 - pid:1779786 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 0 * Closing connection 2024-05-10 14:59:10,000 - pid:1779786 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:10,000 - pid:1779786 [D] threadless._cleanup:311 - fd#23 unregistered by work#23 2024-05-10 14:59:10,000 - pid:1779786 [D] threadless._cleanup:311 - fd#24 unregistered by work#23 2024-05-10 14:59:10,000 - pid:1779786 [I] server.access_log:388 - 127.0.0.1:51110 - GET 127.0.0.1:36331/ - 404 NOT FOUND - 89 bytes - 10.92ms 2024-05-10 14:59:10,001 - pid:1779786 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:10,001 - pid:1779786 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51110 has buffer False 2024-05-10 14:59:10,001 - pid:1779786 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:10,001 - pid:1779786 [D] handler.shutdown:113 - Client connection closed [Test Download File Hash Verifies 1] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:36331... * Connected to 127.0.0.1 (127.0.0.1) port 36331 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to files.pythonhosted.org:443 > CONNECT files.pythonhosted.org:443 HTTP/1.1 > Host: files.pythonhosted.org:443 > User-Agent: curl/8.7.1 > Proxy-Connection: Keep-Alive > 2024-05-10 14:59:10,015 - pid:1779786 [D] acceptor.accept:115 - Accepting new work#23 2024-05-10 14:59:10,026 - pid:1779786 [D] tcp_server.__init__:119 - Work#23 accepted from 127.0.0.1:51126 2024-05-10 14:59:10,027 - pid:1779786 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51126 2024-05-10 14:59:10,027 - pid:1779786 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#23 2024-05-10 14:59:10,027 - pid:1779786 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:10,028 - pid:1779786 [D] connection.recv:62 - received 135 bytes from client 2024-05-10 14:59:10,028 - pid:1779786 [D] server.connect_upstream:571 - Connecting to upstream files.pythonhosted.org:443 2024-05-10 14:59:10,042 - pid:1779786 [D] server.connect_upstream:606 - Connected to upstream files.pythonhosted.org:443 2024-05-10 14:59:10,049 - pid:1779786 [W] handler.handle_readables:240 - Exception when receiving from client connection#23 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:10,055 - pid:1779786 [D] threadless._update_work_events:166 - fd#23 modified for mask#3 by work#23 2024-05-10 14:59:10,055 - pid:1779786 [D] threadless._update_work_events:197 - fd#24 registered for mask#1 by work#23 2024-05-10 14:59:10,055 - pid:1779786 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:10,055 - pid:1779786 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51126 < 2024-05-10 14:59:10,056 - pid:1779786 [D] connection.flush:101 - flushed 39 bytes to client HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 2024-05-10 14:59:10,056 - pid:1779786 [D] threadless._cleanup:311 - fd#23 unregistered by work#23 2024-05-10 14:59:10,056 - pid:1779786 [D] threadless._cleanup:311 - fd#24 unregistered by work#23 2024-05-10 14:59:10,056 - pid:1779786 [I] server.access_log:388 - 127.0.0.1:51126 - CONNECT files.pythonhosted.org:443 - 0 bytes - 28.30ms 2024-05-10 14:59:10,056 - pid:1779786 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:10,057 - pid:1779786 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51126 has buffer False 2024-05-10 14:59:10,057 - pid:1779786 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:10,057 - pid:1779786 [D] handler.shutdown:113 - Client connection closed * ALPN: curl offers h2,http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * CAfile: /tmp/certificates/ca-cert.pem * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 cat: downloaded.whl: No such file or directory -: FAILED sha256sum: WARNING: 1 computed checksum did NOT match rm: cannot remove 'downloaded.whl': No such file or directory [Test Download File Hash Verifies 2] % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 127.0.0.1:36331... * Connected to 127.0.0.1 (127.0.0.1) port 36331 * CONNECT tunnel: HTTP/1.1 negotiated * allocate connect buffer * Establish HTTP proxy tunnel to files.pythonhosted.org:443 > CONNECT files.pythonhosted.org:443 HTTP/1.1 > Host: files.pythonhosted.org:443 > User-Agent: curl/8.7.1 > Proxy-Connection: Keep-Alive > 2024-05-10 14:59:10,079 - pid:1779786 [D] acceptor.accept:115 - Accepting new work#23 2024-05-10 14:59:10,082 - pid:1779786 [D] tcp_server.__init__:119 - Work#23 accepted from 127.0.0.1:51136 2024-05-10 14:59:10,083 - pid:1779786 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:51136 2024-05-10 14:59:10,083 - pid:1779786 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#23 2024-05-10 14:59:10,083 - pid:1779786 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:10,083 - pid:1779786 [D] connection.recv:62 - received 135 bytes from client 2024-05-10 14:59:10,084 - pid:1779786 [D] server.connect_upstream:571 - Connecting to upstream files.pythonhosted.org:443 2024-05-10 14:59:10,091 - pid:1779786 [D] server.connect_upstream:606 - Connected to upstream files.pythonhosted.org:443 2024-05-10 14:59:10,093 - pid:1779786 [W] handler.handle_readables:240 - Exception when receiving from client connection#23 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:10,094 - pid:1779786 [D] threadless._update_work_events:166 - fd#23 modified for mask#3 by work#23 2024-05-10 14:59:10,095 - pid:1779786 [D] threadless._update_work_events:197 - fd#24 registered for mask#1 by work#23 2024-05-10 14:59:10,095 - pid:1779786 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:10,095 - pid:1779786 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:51136 2024-05-10 14:59:10,095 - pid:1779786 [D] connection.flush:101 - flushed 39 bytes to client < HTTP/1.1 200 Connection established < * CONNECT phase completed * CONNECT tunnel established, response 200 2024-05-10 14:59:10,096 - pid:1779786 [D] threadless._cleanup:311 - fd#23 unregistered by work#23 2024-05-10 14:59:10,096 - pid:1779786 [D] threadless._cleanup:311 - fd#24 unregistered by work#23 2024-05-10 14:59:10,096 - pid:1779786 [I] server.access_log:388 - 127.0.0.1:51136 - CONNECT files.pythonhosted.org:443 - 0 bytes - 12.24ms 2024-05-10 14:59:10,096 - pid:1779786 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:10,096 - pid:1779786 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:51136 has buffer False 2024-05-10 14:59:10,097 - pid:1779786 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:10,097 - pid:1779786 [D] handler.shutdown:113 - Client connection closed * ALPN: curl offers h2,http/1.1 } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * CAfile: /tmp/certificates/ca-cert.pem * CApath: none * OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 * Closing connection curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to files.pythonhosted.org:443 cat: downloaded.whl: No such file or directory -: FAILED sha256sum: WARNING: 1 computed checksum did NOT match rm: cannot remove 'downloaded.whl': No such file or directory --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:10,269 - pid:1779783 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:10,269 - pid:1779783 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:11,083 - pid:1779786 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:11,083 - pid:1779785 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:11,086 - pid:1779784 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:11,091 - pid:1779783 [D] pool.shutdown:135 - Acceptors shutdown _ test_modify_chunk_response_integration[--threaded --plugin proxy.plugin.ModifyChunkResponsePlugin --ca-cert-file /tmp/certificates/ca-cert-chunk.pem --ca-key-file /tmp/certificates/ca-key-chunk.pem --ca-signing-key /tmp/certificates/ca-signing-key-chunk.pem] _ proxy_py_subprocess = 41531 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_MODIFY_CHUNK_RESPONSE_PLUGIN, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_modify_chunk_response_integration(proxy_py_subprocess: int) -> None: """An acceptance test for :py:class:`~proxy.plugin.ModifyChunkResponsePlugin` interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_modify_chunk_response.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 41531 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh') tests/integration/test_integration.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '41531', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '41531', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '41531', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '41531', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:11,450 - pid:1779809 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:11,451 - pid:1779809 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:11,452 - pid:1779809 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:11,453 - pid:1779809 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:11,453 - pid:1779809 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:11,453 - pid:1779809 [I] plugins.load:89 - Loaded plugin proxy.plugin.ModifyChunkResponsePlugin 2024-05-10 14:59:11,453 - pid:1779809 [D] tcp.listen:95 - Listening on 127.0.0.1:41531 2024-05-10 14:59:11,455 - pid:1779809 [D] pool._start:153 - Started acceptor#0 process 1779810 2024-05-10 14:59:11,458 - pid:1779809 [D] pool._start:153 - Started acceptor#1 process 1779811 2024-05-10 14:59:11,460 - pid:1779809 [D] pool._start:153 - Started acceptor#2 process 1779812 2024-05-10 14:59:11,461 - pid:1779809 [D] pool.setup:109 - Started 3 acceptors in threaded mode ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:12,173 - pid:1779811 [D] acceptor.accept:115 - Accepting new work#8 2024-05-10 14:59:12,174 - pid:1779811 [D] tcp_server.__init__:119 - Work#8 accepted from 127.0.0.1:54820 2024-05-10 14:59:12,175 - pid:1779811 [D] acceptor._work:248 - Started work#8.1.0 in thread#139878568298176 2024-05-10 14:59:12,176 - pid:1779811 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:12,180 - pid:1779811 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:54820 2024-05-10 14:59:12,180 - pid:1779811 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:12,180 - pid:1779811 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:12,181 - pid:1779811 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:41531 2024-05-10 14:59:12,181 - pid:1779811 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:41531 2024-05-10 14:59:12,181 - pid:1779811 [D] acceptor.accept:115 - Accepting new work#21 2024-05-10 14:59:12,182 - pid:1779811 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:54830 2024-05-10 14:59:12,182 - pid:1779811 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:12,182 - pid:1779811 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:12,183 - pid:1779811 [D] acceptor._work:248 - Started work#21.1.1 in thread#139878557812416 2024-05-10 14:59:12,183 - pid:1779811 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:12,183 - pid:1779811 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:54830 2024-05-10 14:59:12,183 - pid:1779811 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:12,183 - pid:1779811 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:12,185 - pid:1779811 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:54830 2024-05-10 14:59:12,185 - pid:1779811 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:54830 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:12,185 - pid:1779811 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:12,185 - pid:1779811 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:54830 2024-05-10 14:59:12,185 - pid:1779811 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:12,185 - pid:1779811 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:12,186 - pid:1779811 [I] web.access_log:266 - 127.0.0.1:54830 - GET / - curl/8.7.1 - 2.00ms 2024-05-10 14:59:12,186 - pid:1779811 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:54830 has buffer False 2024-05-10 14:59:12,186 - pid:1779811 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:12,186 - pid:1779811 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:12,186 - pid:1779811 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:54820 2024-05-10 14:59:12,186 - pid:1779811 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:12,186 - pid:1779811 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:12,186 - pid:1779811 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:12,186 - pid:1779811 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:12,187 - pid:1779811 [I] server.access_log:388 - 127.0.0.1:54820 - GET 127.0.0.1:41531/ - None None - 0 bytes - 5.78ms 2024-05-10 14:59:12,187 - pid:1779811 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:12,187 - pid:1779811 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:12,187 - pid:1779811 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:54820 has buffer False 2024-05-10 14:59:12,187 - pid:1779811 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:12,187 - pid:1779811 [D] handler.shutdown:113 - Client connection closed [Test ModifyChunkResponsePlugin] 2024-05-10 14:59:12,198 - pid:1779811 [D] acceptor.accept:115 - Accepting new work#8 2024-05-10 14:59:12,198 - pid:1779811 [D] tcp_server.__init__:119 - Work#8 accepted from 127.0.0.1:54842 2024-05-10 14:59:12,198 - pid:1779811 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:12,198 - pid:1779811 [D] acceptor._work:248 - Started work#8.1.2 in thread#139878568298176 2024-05-10 14:59:12,199 - pid:1779811 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:54842 2024-05-10 14:59:12,199 - pid:1779811 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:12,199 - pid:1779811 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:12,199 - pid:1779811 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:12,209 - pid:1779811 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:12,212 - pid:1779811 [W] handler.handle_readables:240 - Exception when receiving from client connection#8 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:12,215 - pid:1779811 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:12,215 - pid:1779811 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:54842 2024-05-10 14:59:12,215 - pid:1779811 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:12,215 - pid:1779811 [I] server.access_log:388 - 127.0.0.1:54842 - CONNECT httpbingo.org:443 - 0 bytes - 16.04ms 2024-05-10 14:59:12,215 - pid:1779811 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:12,215 - pid:1779811 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:54842 has buffer False 2024-05-10 14:59:12,215 - pid:1779811 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:12,215 - pid:1779811 [D] handler.shutdown:113 - Client connection closed Empty response --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:12,314 - pid:1779809 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:12,315 - pid:1779809 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:13,200 - pid:1779811 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:13,199 - pid:1779812 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:13,199 - pid:1779810 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:13,206 - pid:1779809 [D] pool.shutdown:135 - Acceptors shutdown _ test_modify_chunk_response_integration[--threadless --local-executor 0 --plugin proxy.plugin.ModifyChunkResponsePlugin --ca-cert-file /tmp/certificates/ca-cert-chunk.pem --ca-key-file /tmp/certificates/ca-key-chunk.pem --ca-signing-key /tmp/certificates/ca-signing-key-chunk.pem] _ proxy_py_subprocess = 33831 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_MODIFY_CHUNK_RESPONSE_PLUGIN, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_modify_chunk_response_integration(proxy_py_subprocess: int) -> None: """An acceptance test for :py:class:`~proxy.plugin.ModifyChunkResponsePlugin` interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_modify_chunk_response.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 33831 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh') tests/integration/test_integration.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '33831', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '33831', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '33831', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '33831', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:13,547 - pid:1779822 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:13,547 - pid:1779822 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:13,549 - pid:1779822 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:13,549 - pid:1779822 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:13,549 - pid:1779822 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:13,549 - pid:1779822 [I] plugins.load:89 - Loaded plugin proxy.plugin.ModifyChunkResponsePlugin 2024-05-10 14:59:13,549 - pid:1779822 [D] tcp.listen:95 - Listening on 127.0.0.1:33831 2024-05-10 14:59:13,552 - pid:1779822 [D] pool._start_worker:136 - Started threadless#0 process#1779823 2024-05-10 14:59:13,554 - pid:1779822 [D] pool._start_worker:136 - Started threadless#1 process#1779824 2024-05-10 14:59:13,555 - pid:1779823 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:13,556 - pid:1779823 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:13,557 - pid:1779822 [D] pool._start_worker:136 - Started threadless#2 process#1779825 2024-05-10 14:59:13,558 - pid:1779822 [I] pool.setup:102 - Started 3 threadless workers 2024-05-10 14:59:13,559 - pid:1779824 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:13,560 - pid:1779824 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:13,560 - pid:1779822 [D] pool._start:153 - Started acceptor#0 process 1779826 2024-05-10 14:59:13,561 - pid:1779825 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:13,561 - pid:1779825 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:13,563 - pid:1779822 [D] pool._start:153 - Started acceptor#1 process 1779827 2024-05-10 14:59:13,568 - pid:1779822 [D] pool._start:153 - Started acceptor#2 process 1779828 2024-05-10 14:59:13,568 - pid:1779822 [D] pool.setup:109 - Started 3 acceptors in threadless (remote) mode ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:14,277 - pid:1779827 [D] acceptor.accept:115 - Accepting new work#20 2024-05-10 14:59:14,278 - pid:1779827 [D] acceptor._work:234 - Dispatched work#20.1.0 to worker#1 2024-05-10 14:59:14,280 - pid:1779824 [D] tcp_server.__init__:119 - Work#17 accepted from 127.0.0.1:44846 2024-05-10 14:59:14,280 - pid:1779824 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:44846 2024-05-10 14:59:14,288 - pid:1779824 [D] threadless._update_work_events:197 - fd#17 registered for mask#1 by work#18 2024-05-10 14:59:14,289 - pid:1779824 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:14,289 - pid:1779824 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:14,290 - pid:1779824 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:33831 2024-05-10 14:59:14,291 - pid:1779824 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:33831 2024-05-10 14:59:14,291 - pid:1779827 [D] acceptor.accept:115 - Accepting new work#20 2024-05-10 14:59:14,292 - pid:1779824 [D] threadless._update_work_events:197 - fd#19 registered for mask#3 by work#18 2024-05-10 14:59:14,292 - pid:1779827 [D] acceptor._work:234 - Dispatched work#20.1.1 to worker#2 2024-05-10 14:59:14,292 - pid:1779824 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:14,292 - pid:1779824 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:14,293 - pid:1779824 [D] threadless._update_work_events:166 - fd#19 modified for mask#1 by work#18 2024-05-10 14:59:14,293 - pid:1779825 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:44860 2024-05-10 14:59:14,294 - pid:1779825 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:44860 2024-05-10 14:59:14,294 - pid:1779825 [D] threadless._update_work_events:197 - fd#21 registered for mask#1 by work#22 2024-05-10 14:59:14,295 - pid:1779825 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:14,295 - pid:1779825 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:14,299 - pid:1779825 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:44860 2024-05-10 14:59:14,299 - pid:1779825 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:44860 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:14,300 - pid:1779825 [D] threadless._update_work_events:166 - fd#21 modified for mask#2 by work#22 2024-05-10 14:59:14,300 - pid:1779825 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:14,300 - pid:1779825 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:44860 2024-05-10 14:59:14,300 - pid:1779825 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:14,301 - pid:1779825 [D] threadless._cleanup:311 - fd#21 unregistered by work#22 2024-05-10 14:59:14,301 - pid:1779824 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:14,301 - pid:1779825 [I] web.access_log:266 - 127.0.0.1:44860 - GET / - curl/8.7.1 - 4.69ms 2024-05-10 14:59:14,301 - pid:1779824 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:14,301 - pid:1779825 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:44860 has buffer False 2024-05-10 14:59:14,301 - pid:1779825 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:14,301 - pid:1779825 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:14,302 - pid:1779824 [D] threadless._update_work_events:166 - fd#17 modified for mask#3 by work#18 2024-05-10 14:59:14,302 - pid:1779824 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:14,302 - pid:1779824 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:44846 2024-05-10 14:59:14,302 - pid:1779824 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:14,303 - pid:1779824 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:14,303 - pid:1779824 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:14,303 - pid:1779824 [D] threadless._cleanup:311 - fd#17 unregistered by work#18 2024-05-10 14:59:14,303 - pid:1779824 [D] threadless._cleanup:311 - fd#19 unregistered by work#18 2024-05-10 14:59:14,303 - pid:1779824 [I] server.access_log:388 - 127.0.0.1:44846 - GET 127.0.0.1:33831/ - None None - 0 bytes - 13.16ms 2024-05-10 14:59:14,304 - pid:1779824 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:14,304 - pid:1779824 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:44846 has buffer False 2024-05-10 14:59:14,304 - pid:1779824 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:14,304 - pid:1779824 [D] handler.shutdown:113 - Client connection closed [Test ModifyChunkResponsePlugin] 2024-05-10 14:59:14,316 - pid:1779828 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:14,318 - pid:1779828 [D] acceptor._work:234 - Dispatched work#24.2.0 to worker#2 2024-05-10 14:59:14,318 - pid:1779825 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:44866 2024-05-10 14:59:14,319 - pid:1779825 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:44866 2024-05-10 14:59:14,319 - pid:1779825 [D] threadless._update_work_events:197 - fd#21 registered for mask#1 by work#22 2024-05-10 14:59:14,319 - pid:1779825 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:14,319 - pid:1779825 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:14,320 - pid:1779825 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:14,334 - pid:1779825 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:14,343 - pid:1779825 [W] handler.handle_readables:240 - Exception when receiving from client connection#21 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:14,348 - pid:1779825 [D] threadless._update_work_events:166 - fd#21 modified for mask#3 by work#22 2024-05-10 14:59:14,348 - pid:1779825 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#22 2024-05-10 14:59:14,349 - pid:1779825 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:14,349 - pid:1779825 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:44866 2024-05-10 14:59:14,349 - pid:1779825 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:14,349 - pid:1779825 [D] threadless._cleanup:311 - fd#21 unregistered by work#22 2024-05-10 14:59:14,350 - pid:1779825 [D] threadless._cleanup:311 - fd#23 unregistered by work#22 2024-05-10 14:59:14,350 - pid:1779825 [I] server.access_log:388 - 127.0.0.1:44866 - CONNECT httpbingo.org:443 - 0 bytes - 30.03ms 2024-05-10 14:59:14,350 - pid:1779825 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:14,350 - pid:1779825 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:44866 has buffer False 2024-05-10 14:59:14,350 - pid:1779825 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:14,351 - pid:1779825 [D] handler.shutdown:113 - Client connection closed Empty response --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:14,453 - pid:1779822 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:14,453 - pid:1779822 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:15,317 - pid:1779827 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:15,319 - pid:1779828 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:15,317 - pid:1779826 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:15,330 - pid:1779822 [D] pool.shutdown:135 - Acceptors shutdown 2024-05-10 14:59:15,493 - pid:1779822 [D] pool._shutdown_workers:148 - Stopped threadless process#1779825 2024-05-10 14:59:15,493 - pid:1779822 [D] pool._shutdown_workers:148 - Stopped threadless process#1779824 2024-05-10 14:59:15,555 - pid:1779822 [D] pool._shutdown_workers:148 - Stopped threadless process#1779823 2024-05-10 14:59:15,555 - pid:1779822 [I] pool.shutdown:112 - Stopped 3 threadless workers _ test_modify_chunk_response_integration[--threadless --plugin proxy.plugin.ModifyChunkResponsePlugin --ca-cert-file /tmp/certificates/ca-cert-chunk.pem --ca-key-file /tmp/certificates/ca-key-chunk.pem --ca-signing-key /tmp/certificates/ca-signing-key-chunk.pem] _ proxy_py_subprocess = 44507 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_MODIFY_CHUNK_RESPONSE_PLUGIN, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_modify_chunk_response_integration(proxy_py_subprocess: int) -> None: """An acceptance test for :py:class:`~proxy.plugin.ModifyChunkResponsePlugin` interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_modify_chunk_response.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 44507 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh') tests/integration/test_integration.py:288: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '44507', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '44507', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '44507', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_chunk_response.sh', '44507', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:15,920 - pid:1779837 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:15,920 - pid:1779837 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:15,921 - pid:1779837 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:15,922 - pid:1779837 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:15,922 - pid:1779837 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:15,922 - pid:1779837 [I] plugins.load:89 - Loaded plugin proxy.plugin.ModifyChunkResponsePlugin 2024-05-10 14:59:15,922 - pid:1779837 [D] tcp.listen:95 - Listening on 127.0.0.1:44507 2024-05-10 14:59:15,924 - pid:1779837 [D] pool._start:153 - Started acceptor#0 process 1779838 2024-05-10 14:59:15,927 - pid:1779837 [D] pool._start:153 - Started acceptor#1 process 1779839 2024-05-10 14:59:15,930 - pid:1779837 [D] pool._start:153 - Started acceptor#2 process 1779840 2024-05-10 14:59:15,930 - pid:1779837 [D] pool.setup:109 - Started 3 acceptors in threadless (local) mode 2024-05-10 14:59:15,934 - pid:1779838 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:15,935 - pid:1779838 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:15,934 - pid:1779839 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:15,938 - pid:1779839 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:15,938 - pid:1779840 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:15,939 - pid:1779840 [D] threadless.run:422 - Working on 0 works ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:16,642 - pid:1779840 [D] acceptor.accept:115 - Accepting new work#23 2024-05-10 14:59:16,647 - pid:1779840 [D] tcp_server.__init__:119 - Work#23 accepted from 127.0.0.1:56786 2024-05-10 14:59:16,648 - pid:1779840 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:56786 2024-05-10 14:59:16,648 - pid:1779840 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#23 2024-05-10 14:59:16,649 - pid:1779840 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:16,649 - pid:1779840 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:16,650 - pid:1779840 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:44507 2024-05-10 14:59:16,651 - pid:1779840 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:44507 2024-05-10 14:59:16,651 - pid:1779839 [D] acceptor.accept:115 - Accepting new work#19 2024-05-10 14:59:16,652 - pid:1779840 [D] threadless._update_work_events:197 - fd#24 registered for mask#3 by work#23 2024-05-10 14:59:16,652 - pid:1779840 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:16,652 - pid:1779840 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:16,653 - pid:1779840 [D] threadless._update_work_events:166 - fd#24 modified for mask#1 by work#23 2024-05-10 14:59:16,671 - pid:1779839 [D] tcp_server.__init__:119 - Work#19 accepted from 127.0.0.1:56792 2024-05-10 14:59:16,672 - pid:1779839 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:56792 2024-05-10 14:59:16,672 - pid:1779839 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#19 2024-05-10 14:59:16,673 - pid:1779839 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:16,673 - pid:1779839 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:16,677 - pid:1779839 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:56792 2024-05-10 14:59:16,677 - pid:1779839 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:56792 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:16,677 - pid:1779839 [D] threadless._update_work_events:166 - fd#19 modified for mask#2 by work#19 2024-05-10 14:59:16,678 - pid:1779839 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:16,678 - pid:1779839 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:56792 2024-05-10 14:59:16,678 - pid:1779839 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:16,678 - pid:1779839 [D] threadless._cleanup:311 - fd#19 unregistered by work#19 2024-05-10 14:59:16,678 - pid:1779840 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:16,679 - pid:1779839 [I] web.access_log:266 - 127.0.0.1:56792 - GET / - curl/8.7.1 - 4.43ms 2024-05-10 14:59:16,679 - pid:1779840 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:16,679 - pid:1779839 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:56792 has buffer False 2024-05-10 14:59:16,679 - pid:1779839 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:16,679 - pid:1779839 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:16,679 - pid:1779840 [D] threadless._update_work_events:166 - fd#23 modified for mask#3 by work#23 2024-05-10 14:59:16,680 - pid:1779840 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:16,680 - pid:1779840 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:56786 2024-05-10 14:59:16,680 - pid:1779840 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:16,680 - pid:1779840 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:16,680 - pid:1779840 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:16,680 - pid:1779840 [D] threadless._cleanup:311 - fd#23 unregistered by work#23 2024-05-10 14:59:16,681 - pid:1779840 [D] threadless._cleanup:311 - fd#24 unregistered by work#23 2024-05-10 14:59:16,681 - pid:1779840 [I] server.access_log:388 - 127.0.0.1:56786 - GET 127.0.0.1:44507/ - None None - 0 bytes - 30.97ms 2024-05-10 14:59:16,681 - pid:1779840 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:16,681 - pid:1779840 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:56786 has buffer False 2024-05-10 14:59:16,681 - pid:1779840 [D] handler.shutdown:99 - Client connection shutdown successful [Test ModifyChunkResponsePlugin] 2024-05-10 14:59:16,682 - pid:1779840 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:16,692 - pid:1779840 [D] acceptor.accept:115 - Accepting new work#23 2024-05-10 14:59:16,707 - pid:1779840 [D] tcp_server.__init__:119 - Work#23 accepted from 127.0.0.1:56800 2024-05-10 14:59:16,707 - pid:1779840 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:56800 2024-05-10 14:59:16,708 - pid:1779840 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#23 2024-05-10 14:59:16,708 - pid:1779840 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:16,708 - pid:1779840 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:16,708 - pid:1779840 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:16,722 - pid:1779840 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:16,729 - pid:1779840 [W] handler.handle_readables:240 - Exception when receiving from client connection#23 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:16,734 - pid:1779840 [D] threadless._update_work_events:166 - fd#23 modified for mask#3 by work#23 2024-05-10 14:59:16,735 - pid:1779840 [D] threadless._update_work_events:197 - fd#24 registered for mask#1 by work#23 2024-05-10 14:59:16,735 - pid:1779840 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:16,735 - pid:1779840 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:56800 2024-05-10 14:59:16,735 - pid:1779840 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:16,736 - pid:1779840 [D] threadless._cleanup:311 - fd#23 unregistered by work#23 2024-05-10 14:59:16,736 - pid:1779840 [D] threadless._cleanup:311 - fd#24 unregistered by work#23 2024-05-10 14:59:16,736 - pid:1779840 [I] server.access_log:388 - 127.0.0.1:56800 - CONNECT httpbingo.org:443 - 0 bytes - 27.62ms 2024-05-10 14:59:16,736 - pid:1779840 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:16,736 - pid:1779840 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:56800 has buffer False 2024-05-10 14:59:16,737 - pid:1779840 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:16,737 - pid:1779840 [D] handler.shutdown:113 - Client connection closed Empty response --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:16,839 - pid:1779837 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:16,840 - pid:1779837 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:17,698 - pid:1779840 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:17,708 - pid:1779838 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:17,716 - pid:1779839 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:17,720 - pid:1779837 [D] pool.shutdown:135 - Acceptors shutdown _ test_modify_post_response_integration[--threaded --plugin proxy.plugin.ModifyPostDataPlugin --ca-cert-file /tmp/certificates/ca-cert-post.pem --ca-key-file /tmp/certificates/ca-key-post.pem --ca-signing-key /tmp/certificates/ca-signing-key-post.pem] _ proxy_py_subprocess = 44611 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_MODIFY_POST_DATA_PLUGIN, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_modify_post_response_integration(proxy_py_subprocess: int) -> None: """An acceptance test for :py:class:`~proxy.plugin.ModifyPostDataPlugin` interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_modify_post_data.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 44611 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh') tests/integration/test_integration.py:309: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '44611', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '44611', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '44611', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '44611', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:18,061 - pid:1779849 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:18,061 - pid:1779849 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:18,063 - pid:1779849 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:18,063 - pid:1779849 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:18,063 - pid:1779849 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:18,063 - pid:1779849 [I] plugins.load:89 - Loaded plugin proxy.plugin.ModifyPostDataPlugin 2024-05-10 14:59:18,063 - pid:1779849 [D] tcp.listen:95 - Listening on 127.0.0.1:44611 2024-05-10 14:59:18,066 - pid:1779849 [D] pool._start:153 - Started acceptor#0 process 1779850 2024-05-10 14:59:18,068 - pid:1779849 [D] pool._start:153 - Started acceptor#1 process 1779851 2024-05-10 14:59:18,071 - pid:1779849 [D] pool._start:153 - Started acceptor#2 process 1779852 2024-05-10 14:59:18,071 - pid:1779849 [D] pool.setup:109 - Started 3 acceptors in threaded mode ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:18,790 - pid:1779851 [D] acceptor.accept:115 - Accepting new work#8 2024-05-10 14:59:18,791 - pid:1779851 [D] tcp_server.__init__:119 - Work#8 accepted from 127.0.0.1:38614 2024-05-10 14:59:18,792 - pid:1779851 [D] acceptor._work:248 - Started work#8.1.0 in thread#140325456709312 2024-05-10 14:59:18,792 - pid:1779851 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:18,797 - pid:1779851 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:38614 2024-05-10 14:59:18,797 - pid:1779851 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:18,797 - pid:1779851 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:18,798 - pid:1779851 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:44611 2024-05-10 14:59:18,798 - pid:1779851 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:44611 2024-05-10 14:59:18,798 - pid:1779851 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:18,798 - pid:1779852 [D] acceptor.accept:115 - Accepting new work#12 2024-05-10 14:59:18,799 - pid:1779851 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:18,799 - pid:1779852 [D] tcp_server.__init__:119 - Work#12 accepted from 127.0.0.1:38630 2024-05-10 14:59:18,801 - pid:1779852 [D] acceptor._work:248 - Started work#12.2.0 in thread#140325456709312 2024-05-10 14:59:18,801 - pid:1779852 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:18,805 - pid:1779852 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:38630 2024-05-10 14:59:18,805 - pid:1779852 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:18,805 - pid:1779852 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:18,807 - pid:1779852 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:38630 2024-05-10 14:59:18,807 - pid:1779852 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:38630 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:18,807 - pid:1779852 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:18,807 - pid:1779852 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:38630 2024-05-10 14:59:18,807 - pid:1779852 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:18,807 - pid:1779851 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:18,808 - pid:1779851 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:18,808 - pid:1779852 [I] web.access_log:266 - 127.0.0.1:38630 - GET / - curl/8.7.1 - 1.79ms 2024-05-10 14:59:18,808 - pid:1779852 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:38630 has buffer False 2024-05-10 14:59:18,808 - pid:1779852 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:18,808 - pid:1779852 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:18,808 - pid:1779851 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:18,808 - pid:1779851 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:38614 2024-05-10 14:59:18,808 - pid:1779851 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:18,808 - pid:1779851 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:18,808 - pid:1779851 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:18,808 - pid:1779851 [I] server.access_log:388 - 127.0.0.1:38614 - GET 127.0.0.1:44611/ - 404 NOT FOUND - 89 bytes - 10.59ms 2024-05-10 14:59:18,808 - pid:1779851 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:18,808 - pid:1779851 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:38614 has buffer False 2024-05-10 14:59:18,808 - pid:1779851 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:18,808 - pid:1779851 [D] handler.shutdown:113 - Client connection closed [Test ModifyPostDataPlugin] 2024-05-10 14:59:18,820 - pid:1779851 [D] acceptor.accept:115 - Accepting new work#8 2024-05-10 14:59:18,821 - pid:1779851 [D] tcp_server.__init__:119 - Work#8 accepted from 127.0.0.1:38644 2024-05-10 14:59:18,821 - pid:1779851 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:18,821 - pid:1779851 [D] acceptor._work:248 - Started work#8.1.1 in thread#140325456709312 2024-05-10 14:59:18,821 - pid:1779851 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:38644 2024-05-10 14:59:18,822 - pid:1779851 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:18,822 - pid:1779851 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:18,822 - pid:1779851 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:18,831 - pid:1779851 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:18,835 - pid:1779851 [W] handler.handle_readables:240 - Exception when receiving from client connection#8 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:18,838 - pid:1779851 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:18,838 - pid:1779851 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:38644 2024-05-10 14:59:18,838 - pid:1779851 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:18,838 - pid:1779851 [I] server.access_log:388 - 127.0.0.1:38644 - CONNECT httpbingo.org:443 - 0 bytes - 16.14ms 2024-05-10 14:59:18,838 - pid:1779851 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:18,838 - pid:1779851 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:38644 has buffer False 2024-05-10 14:59:18,838 - pid:1779851 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:18,838 - pid:1779851 [D] handler.shutdown:113 - Client connection closed Empty response --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:18,942 - pid:1779849 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:18,942 - pid:1779849 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:19,802 - pid:1779852 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:19,822 - pid:1779850 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:19,823 - pid:1779851 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:19,828 - pid:1779849 [D] pool.shutdown:135 - Acceptors shutdown _ test_modify_post_response_integration[--threadless --local-executor 0 --plugin proxy.plugin.ModifyPostDataPlugin --ca-cert-file /tmp/certificates/ca-cert-post.pem --ca-key-file /tmp/certificates/ca-key-post.pem --ca-signing-key /tmp/certificates/ca-signing-key-post.pem] _ proxy_py_subprocess = 41979 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_MODIFY_POST_DATA_PLUGIN, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_modify_post_response_integration(proxy_py_subprocess: int) -> None: """An acceptance test for :py:class:`~proxy.plugin.ModifyPostDataPlugin` interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_modify_post_data.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 41979 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh') tests/integration/test_integration.py:309: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41979', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41979', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41979', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41979', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:20,204 - pid:1779862 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:20,204 - pid:1779862 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:20,206 - pid:1779862 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:20,206 - pid:1779862 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:20,206 - pid:1779862 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:20,206 - pid:1779862 [I] plugins.load:89 - Loaded plugin proxy.plugin.ModifyPostDataPlugin 2024-05-10 14:59:20,206 - pid:1779862 [D] tcp.listen:95 - Listening on 127.0.0.1:41979 2024-05-10 14:59:20,209 - pid:1779862 [D] pool._start_worker:136 - Started threadless#0 process#1779863 2024-05-10 14:59:20,211 - pid:1779862 [D] pool._start_worker:136 - Started threadless#1 process#1779864 2024-05-10 14:59:20,211 - pid:1779863 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:20,212 - pid:1779863 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:20,214 - pid:1779862 [D] pool._start_worker:136 - Started threadless#2 process#1779865 2024-05-10 14:59:20,215 - pid:1779862 [I] pool.setup:102 - Started 3 threadless workers 2024-05-10 14:59:20,214 - pid:1779864 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:20,215 - pid:1779864 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:20,217 - pid:1779862 [D] pool._start:153 - Started acceptor#0 process 1779866 2024-05-10 14:59:20,217 - pid:1779865 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:20,218 - pid:1779865 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:20,220 - pid:1779862 [D] pool._start:153 - Started acceptor#1 process 1779867 2024-05-10 14:59:20,225 - pid:1779862 [D] pool._start:153 - Started acceptor#2 process 1779868 2024-05-10 14:59:20,225 - pid:1779862 [D] pool.setup:109 - Started 3 acceptors in threadless (remote) mode ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:20,899 - pid:1779868 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:20,900 - pid:1779868 [D] acceptor._work:234 - Dispatched work#24.2.0 to worker#2 2024-05-10 14:59:20,902 - pid:1779865 [D] tcp_server.__init__:119 - Work#21 accepted from 127.0.0.1:40338 2024-05-10 14:59:20,902 - pid:1779865 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:40338 2024-05-10 14:59:20,903 - pid:1779865 [D] threadless._update_work_events:197 - fd#21 registered for mask#1 by work#22 2024-05-10 14:59:20,903 - pid:1779865 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:20,904 - pid:1779865 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:20,905 - pid:1779865 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:41979 2024-05-10 14:59:20,905 - pid:1779868 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:20,905 - pid:1779865 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:41979 2024-05-10 14:59:20,906 - pid:1779868 [D] acceptor._work:234 - Dispatched work#24.2.1 to worker#0 2024-05-10 14:59:20,906 - pid:1779865 [D] threadless._update_work_events:197 - fd#23 registered for mask#3 by work#22 2024-05-10 14:59:20,906 - pid:1779865 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:20,907 - pid:1779865 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:20,907 - pid:1779863 [D] tcp_server.__init__:119 - Work#13 accepted from 127.0.0.1:40354 2024-05-10 14:59:20,907 - pid:1779865 [D] threadless._update_work_events:166 - fd#23 modified for mask#1 by work#22 2024-05-10 14:59:20,908 - pid:1779863 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:40354 2024-05-10 14:59:20,908 - pid:1779863 [D] threadless._update_work_events:197 - fd#13 registered for mask#1 by work#14 2024-05-10 14:59:20,909 - pid:1779863 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:20,909 - pid:1779863 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:20,920 - pid:1779863 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:40354 2024-05-10 14:59:20,920 - pid:1779863 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:40354 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:20,920 - pid:1779863 [D] threadless._update_work_events:166 - fd#13 modified for mask#2 by work#14 2024-05-10 14:59:20,921 - pid:1779863 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:20,921 - pid:1779863 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:40354 2024-05-10 14:59:20,921 - pid:1779863 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:20,921 - pid:1779863 [D] threadless._cleanup:311 - fd#13 unregistered by work#14 2024-05-10 14:59:20,921 - pid:1779865 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:20,922 - pid:1779863 [I] web.access_log:266 - 127.0.0.1:40354 - GET / - curl/8.7.1 - 4.66ms 2024-05-10 14:59:20,922 - pid:1779865 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:20,922 - pid:1779863 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:40354 has buffer False 2024-05-10 14:59:20,922 - pid:1779863 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:20,922 - pid:1779863 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:20,922 - pid:1779865 [D] threadless._update_work_events:166 - fd#21 modified for mask#3 by work#22 2024-05-10 14:59:20,923 - pid:1779865 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:20,923 - pid:1779865 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:40338 2024-05-10 14:59:20,923 - pid:1779865 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:20,923 - pid:1779865 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:20,923 - pid:1779865 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:20,924 - pid:1779865 [D] threadless._cleanup:311 - fd#21 unregistered by work#22 2024-05-10 14:59:20,924 - pid:1779865 [D] threadless._cleanup:311 - fd#23 unregistered by work#22 2024-05-10 14:59:20,924 - pid:1779865 [I] server.access_log:388 - 127.0.0.1:40338 - GET 127.0.0.1:41979/ - 404 NOT FOUND - 89 bytes - 19.41ms 2024-05-10 14:59:20,924 - pid:1779865 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:20,924 - pid:1779865 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:40338 has buffer False 2024-05-10 14:59:20,924 - pid:1779865 [D] handler.shutdown:99 - Client connection shutdown successful [Test ModifyPostDataPlugin] 2024-05-10 14:59:20,925 - pid:1779865 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:20,934 - pid:1779868 [D] acceptor.accept:115 - Accepting new work#24 2024-05-10 14:59:20,935 - pid:1779868 [D] acceptor._work:234 - Dispatched work#-1.2.2 to worker#1 2024-05-10 14:59:20,936 - pid:1779864 [D] tcp_server.__init__:119 - Work#17 accepted from 127.0.0.1:40370 2024-05-10 14:59:20,937 - pid:1779864 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:40370 2024-05-10 14:59:20,944 - pid:1779864 [D] threadless._update_work_events:197 - fd#17 registered for mask#1 by work#18 2024-05-10 14:59:20,945 - pid:1779864 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:20,945 - pid:1779864 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:20,946 - pid:1779864 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:20,961 - pid:1779864 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:20,970 - pid:1779864 [W] handler.handle_readables:240 - Exception when receiving from client connection#17 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:20,976 - pid:1779864 [D] threadless._update_work_events:166 - fd#17 modified for mask#3 by work#18 2024-05-10 14:59:20,976 - pid:1779864 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#18 2024-05-10 14:59:20,976 - pid:1779864 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:20,976 - pid:1779864 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:40370 2024-05-10 14:59:20,977 - pid:1779864 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:20,977 - pid:1779864 [D] threadless._cleanup:311 - fd#17 unregistered by work#18 2024-05-10 14:59:20,977 - pid:1779864 [D] threadless._cleanup:311 - fd#19 unregistered by work#18 2024-05-10 14:59:20,977 - pid:1779864 [I] server.access_log:388 - 127.0.0.1:40370 - CONNECT httpbingo.org:443 - 0 bytes - 31.30ms 2024-05-10 14:59:20,978 - pid:1779864 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:20,978 - pid:1779864 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:40370 has buffer False 2024-05-10 14:59:20,978 - pid:1779864 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:20,978 - pid:1779864 [D] handler.shutdown:113 - Client connection closed Empty response --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:21,080 - pid:1779862 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:21,080 - pid:1779862 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:21,936 - pid:1779868 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:21,936 - pid:1779867 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:21,936 - pid:1779866 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:21,946 - pid:1779862 [D] pool.shutdown:135 - Acceptors shutdown 2024-05-10 14:59:22,141 - pid:1779862 [D] pool._shutdown_workers:148 - Stopped threadless process#1779865 2024-05-10 14:59:22,196 - pid:1779862 [D] pool._shutdown_workers:148 - Stopped threadless process#1779864 2024-05-10 14:59:22,196 - pid:1779862 [D] pool._shutdown_workers:148 - Stopped threadless process#1779863 2024-05-10 14:59:22,196 - pid:1779862 [I] pool.shutdown:112 - Stopped 3 threadless workers _ test_modify_post_response_integration[--threadless --plugin proxy.plugin.ModifyPostDataPlugin --ca-cert-file /tmp/certificates/ca-cert-post.pem --ca-key-file /tmp/certificates/ca-key-post.pem --ca-signing-key /tmp/certificates/ca-signing-key-post.pem] _ proxy_py_subprocess = 41087 @pytest.mark.smoke # type: ignore[misc] @pytest.mark.parametrize( 'proxy_py_subprocess', PROXY_PY_FLAGS_MODIFY_POST_DATA_PLUGIN, indirect=True, ) # type: ignore[misc] @pytest.mark.skipif( IS_WINDOWS, reason='OSError: [WinError 193] %1 is not a valid Win32 application', ) # type: ignore[misc] def test_modify_post_response_integration(proxy_py_subprocess: int) -> None: """An acceptance test for :py:class:`~proxy.plugin.ModifyPostDataPlugin` interception using ``curl`` through proxy.py.""" shell_script_test = Path(__file__).parent / 'test_modify_post_data.sh' > run([ str(shell_script_test), str(proxy_py_subprocess), str(CERT_DIR), ]) proxy_py_subprocess = 41087 shell_script_test = PosixPath('/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh') tests/integration/test_integration.py:309: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_integration.py:36: in run _run(args, check=True, stderr=subprocess.STDOUT, **kwargs) args = ['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41087', '/tmp/certificates'] kwargs = {} _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41087', '/tmp/certificates'],) kwargs = {'stderr': -2} process = stdout = None, stderr = None, retcode = 1 def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess instance. The returned instance will have attributes args, returncode, stdout and stderr. By default, stdout and stderr are not captured, and those attributes will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them, or pass capture_output=True to capture both. If check is True and the exit code was non-zero, it raises a CalledProcessError. The CalledProcessError object will have the return code in the returncode attribute, and output & stderr attributes if those streams were captured. If timeout is given, and the process takes too long, a TimeoutExpired exception will be raised. There is an optional argument "input", allowing you to pass bytes or a string to the subprocess's stdin. If you use this argument you may not also use the Popen constructor's "stdin" argument, as it will be used internally. By default, all communication is in bytes, and therefore any "input" should be bytes, and the stdout and stderr will be bytes. If in text mode, any "input" should be a string, and stdout and stderr will be strings decoded according to locale encoding, or by "encoding" if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines. The other arguments are the same as for the Popen constructor. """ if input is not None: if kwargs.get('stdin') is not None: raise ValueError('stdin and input arguments may not both be used.') kwargs['stdin'] = PIPE if capture_output: if kwargs.get('stdout') is not None or kwargs.get('stderr') is not None: raise ValueError('stdout and stderr arguments may not be used ' 'with capture_output.') kwargs['stdout'] = PIPE kwargs['stderr'] = PIPE with Popen(*popenargs, **kwargs) as process: try: stdout, stderr = process.communicate(input, timeout=timeout) except TimeoutExpired as exc: process.kill() if _mswindows: # Windows accumulates the output in a single blocking # read() call run on child threads, with the timeout # being done in a join() on those threads. communicate() # _after_ kill() is required to collect that and add it # to the exception. exc.stdout, exc.stderr = process.communicate() else: # POSIX _communicate already populated the output so # far into the TimeoutExpired exception. process.wait() raise except: # Including KeyboardInterrupt, communicate handled that. process.kill() # We don't call process.wait() as .__exit__ does that for us. raise retcode = process.poll() if check and retcode: > raise CalledProcessError(retcode, process.args, output=stdout, stderr=stderr) E subprocess.CalledProcessError: Command '['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41087', '/tmp/certificates']' returned non-zero exit status 1. capture_output = False check = True input = None kwargs = {'stderr': -2} popenargs = (['/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/tests/integration/test_modify_post_data.sh', '41087', '/tmp/certificates'],) process = retcode = 1 stderr = None stdout = None timeout = None /usr/lib64/python3.10/subprocess.py:526: CalledProcessError ---------------------------- Captured stdout setup ----------------------------- 2024-05-10 14:59:22,562 - pid:1779877 [I] plugins.load:89 - Loaded plugin proxy.http.proxy.HttpProxyPlugin 2024-05-10 14:59:22,562 - pid:1779877 [I] plugins.load:89 - Loaded plugin proxy.http.server.HttpWebServerPlugin 2024-05-10 14:59:22,564 - pid:1779877 [I] plugins.load:89 - Loaded plugin proxy.http.server.reverse.ReverseProxy 2024-05-10 14:59:22,564 - pid:1779877 [I] plugins.load:89 - Loaded plugin proxy.plugin.WebServerPlugin 2024-05-10 14:59:22,564 - pid:1779877 [I] plugins.load:89 - Loaded plugin proxy.plugin.ReverseProxyPlugin 2024-05-10 14:59:22,564 - pid:1779877 [I] plugins.load:89 - Loaded plugin proxy.plugin.ModifyPostDataPlugin 2024-05-10 14:59:22,564 - pid:1779877 [D] tcp.listen:95 - Listening on 127.0.0.1:41087 2024-05-10 14:59:22,567 - pid:1779877 [D] pool._start:153 - Started acceptor#0 process 1779878 2024-05-10 14:59:22,569 - pid:1779877 [D] pool._start:153 - Started acceptor#1 process 1779879 2024-05-10 14:59:22,572 - pid:1779877 [D] pool._start:153 - Started acceptor#2 process 1779880 2024-05-10 14:59:22,573 - pid:1779877 [D] pool.setup:109 - Started 3 acceptors in threadless (local) mode 2024-05-10 14:59:22,576 - pid:1779878 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:22,577 - pid:1779878 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:22,576 - pid:1779879 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:22,580 - pid:1779879 [D] threadless.run:422 - Working on 0 works 2024-05-10 14:59:22,583 - pid:1779880 [D] selector_events.__init__:54 - Using selector: EpollSelector 2024-05-10 14:59:22,584 - pid:1779880 [D] threadless.run:422 - Working on 0 works ----------------------------- Captured stdout call ----------------------------- 2024-05-10 14:59:23,285 - pid:1779878 [D] acceptor.accept:115 - Accepting new work#15 2024-05-10 14:59:23,288 - pid:1779878 [D] tcp_server.__init__:119 - Work#15 accepted from 127.0.0.1:47716 2024-05-10 14:59:23,289 - pid:1779878 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:47716 2024-05-10 14:59:23,289 - pid:1779878 [D] threadless._update_work_events:197 - fd#15 registered for mask#1 by work#15 2024-05-10 14:59:23,290 - pid:1779878 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:23,290 - pid:1779878 [D] connection.recv:62 - received 130 bytes from client 2024-05-10 14:59:23,291 - pid:1779878 [D] server.connect_upstream:571 - Connecting to upstream 127.0.0.1:41087 2024-05-10 14:59:23,292 - pid:1779878 [D] server.connect_upstream:606 - Connected to upstream 127.0.0.1:41087 2024-05-10 14:59:23,292 - pid:1779879 [D] acceptor.accept:115 - Accepting new work#19 2024-05-10 14:59:23,293 - pid:1779878 [D] threadless._update_work_events:197 - fd#16 registered for mask#3 by work#15 2024-05-10 14:59:23,293 - pid:1779878 [D] server.write_to_descriptors:193 - Server is write ready, flushing... 2024-05-10 14:59:23,293 - pid:1779878 [D] connection.flush:101 - flushed 104 bytes to server 2024-05-10 14:59:23,294 - pid:1779878 [D] threadless._update_work_events:166 - fd#16 modified for mask#1 by work#15 2024-05-10 14:59:23,313 - pid:1779879 [D] tcp_server.__init__:119 - Work#19 accepted from 127.0.0.1:47720 2024-05-10 14:59:23,314 - pid:1779879 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:47720 2024-05-10 14:59:23,314 - pid:1779879 [D] threadless._update_work_events:197 - fd#19 registered for mask#1 by work#19 2024-05-10 14:59:23,315 - pid:1779879 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:23,316 - pid:1779879 [D] connection.recv:62 - received 104 bytes from client 2024-05-10 14:59:23,319 - pid:1779879 [D] tcp_server.handle_readables:212 - Implementation signaled shutdown for client 127.0.0.1:47720 2024-05-10 14:59:23,319 - pid:1779879 [D] tcp_server.handle_readables:218 - Client 127.0.0.1:47720 has pending buffer, will be flushed before shutting down 2024-05-10 14:59:23,320 - pid:1779879 [D] threadless._update_work_events:166 - fd#19 modified for mask#2 by work#19 2024-05-10 14:59:23,320 - pid:1779879 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:23,320 - pid:1779879 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:47720 2024-05-10 14:59:23,320 - pid:1779879 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:23,321 - pid:1779879 [D] threadless._cleanup:311 - fd#19 unregistered by work#19 2024-05-10 14:59:23,321 - pid:1779878 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:23,321 - pid:1779879 [I] web.access_log:266 - 127.0.0.1:47720 - GET / - curl/8.7.1 - 4.46ms 2024-05-10 14:59:23,321 - pid:1779879 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:47720 has buffer False 2024-05-10 14:59:23,321 - pid:1779878 [D] connection.recv:62 - received 89 bytes from server 2024-05-10 14:59:23,321 - pid:1779879 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:23,321 - pid:1779879 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:23,321 - pid:1779878 [D] threadless._update_work_events:166 - fd#15 modified for mask#3 by work#15 2024-05-10 14:59:23,322 - pid:1779878 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:23,322 - pid:1779878 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:47716 2024-05-10 14:59:23,322 - pid:1779878 [D] connection.flush:101 - flushed 89 bytes to client 2024-05-10 14:59:23,322 - pid:1779878 [D] server.read_from_descriptors:229 - Server is read ready, receiving... 2024-05-10 14:59:23,322 - pid:1779878 [D] server.read_from_descriptors:264 - Server closed connection, tearing down... 2024-05-10 14:59:23,323 - pid:1779878 [D] threadless._cleanup:311 - fd#15 unregistered by work#15 2024-05-10 14:59:23,323 - pid:1779878 [D] threadless._cleanup:311 - fd#16 unregistered by work#15 2024-05-10 14:59:23,323 - pid:1779878 [I] server.access_log:388 - 127.0.0.1:47716 - GET 127.0.0.1:41087/ - 404 NOT FOUND - 89 bytes - 32.15ms 2024-05-10 14:59:23,323 - pid:1779878 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:23,324 - pid:1779878 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:47716 has buffer False 2024-05-10 14:59:23,324 - pid:1779878 [D] handler.shutdown:99 - Client connection shutdown successful [Test ModifyPostDataPlugin] 2024-05-10 14:59:23,324 - pid:1779878 [D] handler.shutdown:113 - Client connection closed 2024-05-10 14:59:23,334 - pid:1779880 [D] acceptor.accept:115 - Accepting new work#23 2024-05-10 14:59:23,343 - pid:1779880 [D] tcp_server.__init__:119 - Work#23 accepted from 127.0.0.1:47726 2024-05-10 14:59:23,343 - pid:1779880 [D] tcp_server.initialize:131 - Handling connection 127.0.0.1:47726 2024-05-10 14:59:23,344 - pid:1779880 [D] threadless._update_work_events:197 - fd#23 registered for mask#1 by work#23 2024-05-10 14:59:23,344 - pid:1779880 [D] handler.handle_readables:222 - Client is read ready, receiving... 2024-05-10 14:59:23,345 - pid:1779880 [D] connection.recv:62 - received 117 bytes from client 2024-05-10 14:59:23,346 - pid:1779880 [D] server.connect_upstream:571 - Connecting to upstream httpbingo.org:443 2024-05-10 14:59:23,359 - pid:1779880 [D] server.connect_upstream:606 - Connected to upstream httpbingo.org:443 2024-05-10 14:59:23,367 - pid:1779880 [W] handler.handle_readables:240 - Exception when receiving from client connection#23 with reason FileNotFoundError(2, 'No such file or directory') Traceback (most recent call last): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 225, in handle_readables teardown = await super().handle_readables(readables) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/base/tcp_server.py", line 210, in handle_readables r = self.handle_data(data) File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 177, in handle_data if self._parse_first_request(data): File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/handler.py", line 307, in _parse_first_request output = self.plugin.on_request_complete() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 517, in on_request_complete return self.intercept() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 743, in intercept teardown = self.wrap_server() File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/http/proxy/server.py", line 763, in wrap_server self.upstream.wrap( File "/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/proxy/core/connection/server.py", line 54, in wrap ctx = ssl.create_default_context( File "/usr/lib64/python3.10/ssl.py", line 766, in create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] No such file or directory 2024-05-10 14:59:23,372 - pid:1779880 [D] threadless._update_work_events:166 - fd#23 modified for mask#3 by work#23 2024-05-10 14:59:23,372 - pid:1779880 [D] threadless._update_work_events:197 - fd#24 registered for mask#1 by work#23 2024-05-10 14:59:23,373 - pid:1779880 [D] handler.handle_writables:193 - Client is write ready, flushing... 2024-05-10 14:59:23,373 - pid:1779880 [D] tcp_server.handle_writables:173 - Flushing buffer to client 127.0.0.1:47726 2024-05-10 14:59:23,373 - pid:1779880 [D] connection.flush:101 - flushed 39 bytes to client 2024-05-10 14:59:23,373 - pid:1779880 [D] threadless._cleanup:311 - fd#23 unregistered by work#23 2024-05-10 14:59:23,373 - pid:1779880 [D] threadless._cleanup:311 - fd#24 unregistered by work#23 2024-05-10 14:59:23,374 - pid:1779880 [I] server.access_log:388 - 127.0.0.1:47726 - CONNECT httpbingo.org:443 - 0 bytes - 28.23ms 2024-05-10 14:59:23,374 - pid:1779880 [D] server.on_client_connection_close:379 - Closed server connection, has buffer False 2024-05-10 14:59:23,374 - pid:1779880 [D] handler.shutdown:89 - Closing client connection 127.0.0.1:47726 has buffer False 2024-05-10 14:59:23,374 - pid:1779880 [D] handler.shutdown:99 - Client connection shutdown successful 2024-05-10 14:59:23,374 - pid:1779880 [D] handler.shutdown:113 - Client connection closed Empty response --------------------------- Captured stdout teardown --------------------------- 2024-05-10 14:59:23,535 - pid:1779877 [D] proxy._handle_exit_signal:374 - Received signal 15 2024-05-10 14:59:23,536 - pid:1779877 [D] pool.shutdown:130 - Shutting down 3 acceptors 2024-05-10 14:59:24,358 - pid:1779879 [D] acceptor.run:182 - Acceptor#1 shutdown 2024-05-10 14:59:24,361 - pid:1779880 [D] acceptor.run:182 - Acceptor#2 shutdown 2024-05-10 14:59:24,361 - pid:1779878 [D] acceptor.run:182 - Acceptor#0 shutdown 2024-05-10 14:59:24,367 - pid:1779877 [D] pool.shutdown:135 - Acceptors shutdown - generated xml file: /home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/.tox/tmp/test-results/pytest/results.xml - ============================= slowest 10 durations ============================= 11.71s call tests/integration/test_integration.py::test_https_integration[--threadless --key-file /tmp/certificates/https-key.pem --cert-file /tmp/certificates/https-signed-cert.pem] 11.17s call tests/integration/test_integration.py::test_https_integration[--threadless --local-executor 0 --key-file /tmp/certificates/https-key.pem --cert-file /tmp/certificates/https-signed-cert.pem] 11.02s call tests/integration/test_integration.py::test_integration[--threadless] 10.96s call tests/integration/test_integration.py::test_integration[--threadless --local-executor 0] 10.86s call tests/integration/test_integration.py::test_https_integration[--threaded --key-file /tmp/certificates/https-key.pem --cert-file /tmp/certificates/https-signed-cert.pem] 10.67s call tests/integration/test_integration.py::test_integration[--threaded] 8.32s setup tests/integration/test_integration.py::test_integration[--threaded] 1.80s teardown tests/integration/test_integration.py::test_integration_with_interception_flags[--threadless --local-executor 0 --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] 1.63s teardown tests/integration/test_integration.py::test_https_integration[--threadless --local-executor 0 --key-file /tmp/certificates/https-key.pem --cert-file /tmp/certificates/https-signed-cert.pem] 1.42s teardown tests/integration/test_integration.py::test_integration[--threadless --local-executor 0] =========================== short test summary info ============================ ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_fails_without_cred ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_fails_without_cred ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_fails_with_invalid_cred ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_fails_with_invalid_cred ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_works_with_valid_cred ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_works_with_valid_cred ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_works_with_mixed_case_basic_string ERROR tests/http/exceptions/test_http_proxy_auth_failed.py::TestHttpProxyAuthFailed::test_proxy_auth_works_with_mixed_case_basic_string ERROR tests/http/proxy/test_http_proxy.py::TestHttpProxyPlugin::test_proxy_plugin_on_and_before_upstream_connection ERROR tests/http/proxy/test_http_proxy.py::TestHttpProxyPlugin::test_proxy_plugin_on_and_before_upstream_connection ERROR tests/http/proxy/test_http_proxy.py::TestHttpProxyPlugin::test_proxy_plugin_before_upstream_connection_can_teardown ERROR tests/http/proxy/test_http_proxy.py::TestHttpProxyPlugin::test_proxy_plugin_before_upstream_connection_can_teardown ERROR tests/http/proxy/test_http_proxy.py::TestHttpProxyPlugin::test_proxy_plugin_skips_server_teardown_when_client_closes_and_server_never_initialized ERROR tests/http/proxy/test_http_proxy_tls_interception.py::TestHttpProxyTlsInterception::test_e2e ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_connection_failed ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_connection_failed ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_authentication_failed ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_authentication_failed ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_bails_out_for_unknown_schemes ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_bails_out_for_unknown_schemes ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_bails_out_for_sip_request_lines ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandlerWithoutServerMock::test_proxy_bails_out_for_sip_request_lines ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_http_get ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_http_get ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_http_tunnel ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_http_tunnel ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_authenticated_proxy_http_get ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_authenticated_proxy_http_get ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_authenticated_proxy_http_tunnel ERROR tests/http/test_protocol_handler.py::TestHttpProtocolHandler::test_authenticated_proxy_http_tunnel ERROR tests/http/web/test_web_server.py::TestWebServerPluginWithPacFilePlugin::test_pac_file_served_from_disk[/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/helper/proxy.pac] ERROR tests/http/web/test_web_server.py::TestWebServerPluginWithPacFilePlugin::test_pac_file_served_from_disk[/home/tkloczko/rpmbuild/BUILD/proxy.py-2.4.4/helper/proxy.pac] ERROR tests/http/web/test_web_server.py::TestWebServerPluginWithPacFilePlugin::test_pac_file_served_from_disk[function FindProxyForURL(url, host) { return "PROXY localhost:8899; DIRECT"; }] ERROR tests/http/web/test_web_server.py::TestWebServerPluginWithPacFilePlugin::test_pac_file_served_from_disk[function FindProxyForURL(url, host) { return "PROXY localhost:8899; DIRECT"; }] ERROR tests/http/web/test_web_server.py::TestStaticWebServerPlugin::test_static_web_server_serves ERROR tests/http/web/test_web_server.py::TestStaticWebServerPlugin::test_static_web_server_serves ERROR tests/http/web/test_web_server.py::TestStaticWebServerPlugin::test_static_web_server_serves_404 ERROR tests/http/web/test_web_server.py::TestStaticWebServerPlugin::test_static_web_server_serves_404 ERROR tests/http/web/test_web_server.py::TestWebServerPlugin::test_default_web_server_returns_404 ERROR tests/http/web/test_web_server.py::TestWebServerPlugin::test_default_web_server_returns_404 ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_modify_post_data_plugin[test_modify_post_data_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_modify_post_data_plugin[test_modify_post_data_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_proposed_rest_api_plugin[test_proposed_rest_api_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_proposed_rest_api_plugin[test_proposed_rest_api_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_redirect_to_custom_server_plugin[test_redirect_to_custom_server_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_redirect_to_custom_server_plugin[test_redirect_to_custom_server_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_redirect_to_custom_server_plugin_skips_https[test_redirect_to_custom_server_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_redirect_to_custom_server_plugin_skips_https[test_redirect_to_custom_server_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_filter_by_upstream_host_plugin[test_filter_by_upstream_host_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_filter_by_upstream_host_plugin[test_filter_by_upstream_host_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_filter_by_url_regex_plugin[test_filter_by_url_regex_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_filter_by_url_regex_plugin[test_filter_by_url_regex_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_shortlink_plugin[test_shortlink_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_shortlink_plugin[test_shortlink_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_shortlink_plugin_unknown[test_shortlink_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_shortlink_plugin_unknown[test_shortlink_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_shortlink_plugin_external[test_shortlink_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_shortlink_plugin_external[test_shortlink_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_auth_plugin[test_auth_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_auth_plugin[test_auth_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_auth_plugin_bypass[test_auth_plugin] ERROR tests/plugin/test_http_proxy_plugins.py::TestHttpProxyPluginExamples::test_auth_plugin_bypass[test_auth_plugin] ERROR tests/plugin/test_http_proxy_plugins_with_tls_interception.py::TestHttpProxyPluginExamplesWithTlsInterception::test_modify_post_data_plugin[test_modify_post_data_plugin] ERROR tests/plugin/test_http_proxy_plugins_with_tls_interception.py::TestHttpProxyPluginExamplesWithTlsInterception::test_modify_post_data_plugin[test_modify_post_data_plugin] ERROR tests/plugin/test_http_proxy_plugins_with_tls_interception.py::TestHttpProxyPluginExamplesWithTlsInterception::test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] ERROR tests/plugin/test_http_proxy_plugins_with_tls_interception.py::TestHttpProxyPluginExamplesWithTlsInterception::test_man_in_the_middle_plugin[test_man_in_the_middle_plugin] FAILED tests/http/proxy/test_http2.py::TestHttp2WithProxy::test_http2_via_proxy FAILED tests/integration/test_integration.py::test_integration_with_interception_flags[--threaded --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] FAILED tests/integration/test_integration.py::test_integration_with_interception_flags[--threadless --local-executor 0 --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] FAILED tests/integration/test_integration.py::test_integration_with_interception_flags[--threadless --ca-cert-file /tmp/certificates/ca-cert.pem --ca-key-file /tmp/certificates/ca-key.pem --ca-signing-key /tmp/certificates/ca-signing-key.pem] FAILED tests/integration/test_integration.py::test_modify_chunk_response_integration[--threaded --plugin proxy.plugin.ModifyChunkResponsePlugin --ca-cert-file /tmp/certificates/ca-cert-chunk.pem --ca-key-file /tmp/certificates/ca-key-chunk.pem --ca-signing-key /tmp/certificates/ca-signing-key-chunk.pem] FAILED tests/integration/test_integration.py::test_modify_chunk_response_integration[--threadless --local-executor 0 --plugin proxy.plugin.ModifyChunkResponsePlugin --ca-cert-file /tmp/certificates/ca-cert-chunk.pem --ca-key-file /tmp/certificates/ca-key-chunk.pem --ca-signing-key /tmp/certificates/ca-signing-key-chunk.pem] FAILED tests/integration/test_integration.py::test_modify_chunk_response_integration[--threadless --plugin proxy.plugin.ModifyChunkResponsePlugin --ca-cert-file /tmp/certificates/ca-cert-chunk.pem --ca-key-file /tmp/certificates/ca-key-chunk.pem --ca-signing-key /tmp/certificates/ca-signing-key-chunk.pem] FAILED tests/integration/test_integration.py::test_modify_post_response_integration[--threaded --plugin proxy.plugin.ModifyPostDataPlugin --ca-cert-file /tmp/certificates/ca-cert-post.pem --ca-key-file /tmp/certificates/ca-key-post.pem --ca-signing-key /tmp/certificates/ca-signing-key-post.pem] FAILED tests/integration/test_integration.py::test_modify_post_response_integration[--threadless --local-executor 0 --plugin proxy.plugin.ModifyPostDataPlugin --ca-cert-file /tmp/certificates/ca-cert-post.pem --ca-key-file /tmp/certificates/ca-key-post.pem --ca-signing-key /tmp/certificates/ca-signing-key-post.pem] FAILED tests/integration/test_integration.py::test_modify_post_response_integration[--threadless --plugin proxy.plugin.ModifyPostDataPlugin --ca-cert-file /tmp/certificates/ca-cert-post.pem --ca-key-file /tmp/certificates/ca-key-post.pem --ca-signing-key /tmp/certificates/ca-signing-key-post.pem] ============ 10 failed, 193 passed, 68 errors in 131.26s (0:02:11) ============= Exception ignored in: Traceback (most recent call last): File "/usr/lib64/python3.10/asyncio/base_events.py", line 690, in __del__ self.close() File "/usr/lib64/python3.10/asyncio/unix_events.py", line 68, in close super().close() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 87, in close self._close_self_pipe() File "/usr/lib64/python3.10/asyncio/selector_events.py", line 94, in _close_self_pipe self._remove_reader(self._ssock.fileno()) File "/usr/lib64/python3.10/asyncio/selector_events.py", line 276, in _remove_reader mask, (reader, writer) = key.events, key.data ValueError: not enough values to unpack (expected 2, got 0)