From 28b47917a96cdde5e98a951cce412efd9fc51287 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:11:35 +0000 Subject: [PATCH 1/2] build(deps): bump twisted from 23.10.0 to 24.3.0 Bumps [twisted](https://github.com/twisted/twisted) from 23.10.0 to 24.3.0. - [Release notes](https://github.com/twisted/twisted/releases) - [Changelog](https://github.com/twisted/twisted/blob/trunk/NEWS.rst) - [Commits](https://github.com/twisted/twisted/compare/twisted-23.10.0...twisted-24.3.0) --- updated-dependencies: - dependency-name: twisted dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- local-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local-requirements.txt b/local-requirements.txt index 3243c809e..f18ac4f91 100644 --- a/local-requirements.txt +++ b/local-requirements.txt @@ -18,7 +18,7 @@ pytest-xdist==3.5.0 requests==2.31.0 service_identity==24.1.0 setuptools==69.1.1 -twisted==23.10.0 +twisted==24.3.0 types-pyOpenSSL==24.0.0.20240228 types-requests==2.31.0.20240218 wheel==0.41.2 From 4334659397f9c49d171b91429bf8bfaf0844bed5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 5 Mar 2024 15:02:31 +0000 Subject: [PATCH 2/2] fix tests --- tests/async/test_fetch_browser_context.py | 2 +- tests/async/test_har.py | 2 +- tests/async/test_network.py | 2 +- tests/sync/test_fetch_browser_context.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/async/test_fetch_browser_context.py b/tests/async/test_fetch_browser_context.py index 2c515697b..695b140b7 100644 --- a/tests/async/test_fetch_browser_context.py +++ b/tests/async/test_fetch_browser_context.py @@ -55,7 +55,7 @@ async def test_fetch_should_work(context: BrowserContext, server: Server) -> Non async def test_should_throw_on_network_error( context: BrowserContext, server: Server ) -> None: - server.set_route("/test", lambda request: request.transport.loseConnection()) + server.set_route("/test", lambda request: request.loseConnection()) with pytest.raises(Error, match="socket hang up"): await context.request.fetch(server.PREFIX + "/test") diff --git a/tests/async/test_har.py b/tests/async/test_har.py index d039273cc..b7875ea35 100644 --- a/tests/async/test_har.py +++ b/tests/async/test_har.py @@ -760,7 +760,7 @@ async def test_should_ignore_aborted_requests( tmpdir: Path, ) -> None: path = tmpdir / "test.har" - server.set_route("/x", lambda request: request.transport.loseConnection()) + server.set_route("/x", lambda request: request.loseConnection()) context1 = await context_factory() await context1.route_from_har(har=path, update=True) page1 = await context1.new_page() diff --git a/tests/async/test_network.py b/tests/async/test_network.py index 486a98914..458a0a118 100644 --- a/tests/async/test_network.py +++ b/tests/async/test_network.py @@ -633,7 +633,7 @@ async def test_network_events_request_failed( ) -> None: def handle_request(request: TestServerRequest) -> None: request.setHeader("Content-Type", "text/css") - request.transport.loseConnection() + request.loseConnection() server.set_route("/one-style.css", handle_request) diff --git a/tests/sync/test_fetch_browser_context.py b/tests/sync/test_fetch_browser_context.py index 5a8b38769..dd10d5adf 100644 --- a/tests/sync/test_fetch_browser_context.py +++ b/tests/sync/test_fetch_browser_context.py @@ -52,7 +52,7 @@ def test_fetch_should_work(context: BrowserContext, server: Server) -> None: def test_should_throw_on_network_error(context: BrowserContext, server: Server) -> None: - server.set_route("/test", lambda request: request.transport.loseConnection()) + server.set_route("/test", lambda request: request.loseConnection()) with pytest.raises(Error, match="socket hang up"): context.request.fetch(server.PREFIX + "/test")