Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #317 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 22 23 +1
Lines 2996 3003 +7
Branches 204 204
=========================================
+ Hits 2996 3003 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I think it's not that helpful now, but since the package will evolve, testing the whole suite on it may be a good idea. Maybe the following gives a good setup (not sure): @pytest.fixture(params=[httpx, httpx2])
async def httpx_module(request):
return request.param |
|
Is there something that I could do to help this along? Httpx2 seems to be here to stay and it would be very nice to have native support in this library also. |
|
Hi! Thanks for all your hard work on respx - it's a great library! This is blocking us from upgrading to httpx2 and I think it seems like it's blocking a few others as well. Anything we can do to help get it merged? Happy to help! |
|
Same here, but I do have one additional question. I'm looking to migrate my libraries to
Depending on the answer, I'd either have to wait until this is merged, or maybe take the opportunity to migrate to Many thanks! |
respx picks its mocker from `using`, which defaults to "httpcore", so it intercepts requests at the httpcore layer. httpx2 clients run on httpcore2, whose classes are absent from HTTPCoreMocker.targets: their requests then reach the network, and the assertion rejecting unmocked traffic cannot fire either. Adding the httpcore2 paths through respx's public add_targets API restores both, and nothing at the call sites changes: none of the 52 respx.mock uses asks for another mocker, and none builds responses with return_value=, which is where respx still requires an httpx.Response. respx has no httpx2 support yet (lundberg/respx#317). This stays inside its public API, so it can be dropped once respx ships the targets itself. Verified on respx 0.22.0, pinned here, and on 0.23.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No description provided.