From 941d5e73507fc282fea12fe537f0798ff7314f08 Mon Sep 17 00:00:00 2001 From: ThePhaseless Date: Sat, 8 Aug 2026 01:41:52 +0200 Subject: [PATCH] Revert "chore: migrate tests from httpx to httpx2" This reverts commit ff70ffc32b5f82a329655e464c69492fde9397d2. --- pyproject.toml | 2 +- tests/main_test.py | 4 ++-- uv.lock | 41 ++--------------------------------------- 3 files changed, 5 insertions(+), 42 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f26d5dc..bf062a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ urls = { repository = "https://github.com/ThePhaseless/Byparr" } [dependency-groups] test = [ - "httpx2==2.9.*", + "httpx==0.28.*", "pytest==9.1.*", "pytest-asyncio==1.4.*", "pytest-retry==1.7.*", diff --git a/tests/main_test.py b/tests/main_test.py index ced8a60..df512db 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -2,7 +2,7 @@ from http import HTTPStatus from json import JSONDecodeError from unittest.mock import AsyncMock, MagicMock -import httpx2 +import httpx import pytest from fastapi import HTTPException from playwright.async_api import TimeoutError as PlaywrightTimeoutError @@ -32,7 +32,7 @@ def test_bypass(website: str): This test is skipped if the website is not reachable or does not have cloudflare/DDOS-GUARD. """ - test_request = httpx2.get( + test_request = httpx.get( website, ) if ( diff --git a/uv.lock b/uv.lock index 342ba68..76921fb 100644 --- a/uv.lock +++ b/uv.lock @@ -84,7 +84,7 @@ dev = [ { name = "ruff" }, ] test = [ - { name = "httpx2" }, + { name = "httpx" }, { name = "pytest" }, { name = "pytest-asyncio" }, { name = "pytest-retry" }, @@ -109,7 +109,7 @@ dev = [ { name = "ruff", specifier = "==0.16.*" }, ] test = [ - { name = "httpx2", specifier = "==2.9.*" }, + { name = "httpx", specifier = "==0.28.*" }, { name = "pytest", specifier = "==9.1.*" }, { name = "pytest-asyncio", specifier = "==1.4.*" }, { name = "pytest-retry", specifier = "==1.7.*" }, @@ -448,19 +448,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, ] -[[package]] -name = "httpcore2" -version = "2.9.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "h11" }, - { name = "truststore" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/39/a8/20ed1ed79cbc2ecdf5301c0968ab7c85547212e2a7bd126ddd2d986e206e/httpcore2-2.9.1.tar.gz", hash = "sha256:4d8acbf8b306f48c9d6046591fd5ba4037d1b1b1000d140fc2c3eab1e9a0c0e2", size = 67089, upload-time = "2026-07-24T09:21:03.867Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/9f/fb/46c52b781975c335a2bcf1072c7bbc007cbdc8d674217f5ee1daba2c848b/httpcore2-2.9.1-py3-none-any.whl", hash = "sha256:6182472379e855fe4221246a2bb7ecede403bc61c6798062ae1787d051ccde26", size = 82809, upload-time = "2026-07-24T09:21:01.178Z" }, -] - [[package]] name = "httptools" version = "0.8.0" @@ -498,21 +485,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, ] -[[package]] -name = "httpx2" -version = "2.9.1" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "anyio" }, - { name = "httpcore2" }, - { name = "idna" }, - { name = "truststore" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/21/14/38128fbafd7e0ed41d874df6c9a653d47c2d111cfe59e2b4ac95161b4abd/httpx2-2.9.1.tar.gz", hash = "sha256:1932a768737e3666291582833da748cc4e563c337cf96706fccc04fa6e58764a", size = 95458, upload-time = "2026-07-24T09:21:04.972Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/13/b8/cfd91c4ab9134d386d48f0b6ac662ff3d4be6efdee59ee1c67ebc3c0487c/httpx2-2.9.1-py3-none-any.whl", hash = "sha256:1820fe14a9ab1107bfeff39259987429450b070ec0ff38cc87eb0d8c97fdc71a", size = 91191, upload-time = "2026-07-24T09:21:02.6Z" }, -] - [[package]] name = "idna" version = "3.18" @@ -1313,15 +1285,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c3/01/af18878398102a5a5afa0811f4f8f2a8a94a60cc16e8e9cf54bc95f96808/trafilatura-2.2.0-py3-none-any.whl", hash = "sha256:ac43592a6201264dfc4f9c361cbe3eb3fea96e54437010a159d5e7365360ed98", size = 151906, upload-time = "2026-07-31T16:06:46.485Z" }, ] -[[package]] -name = "truststore" -version = "0.10.4" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/53/a3/1585216310e344e8102c22482f6060c7a6ea0322b63e026372e6dcefcfd6/truststore-0.10.4.tar.gz", hash = "sha256:9d91bd436463ad5e4ee4aba766628dd6cd7010cf3e2461756b3303710eebc301", size = 26169, upload-time = "2025-08-12T18:49:02.73Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/19/97/56608b2249fe206a67cd573bc93cd9896e1efb9e98bce9c163bcdc704b88/truststore-0.10.4-py3-none-any.whl", hash = "sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", size = 18660, upload-time = "2025-08-12T18:49:01.46Z" }, -] - [[package]] name = "typer" version = "0.26.8"