Skip to content
Discussion options

You must be logged in to vote

My main question is, how do you maintain those 2 signatures? Is it just manual or is there a way to test for the difference during CI/CD to make sure that both public methods with the same name have the same parameters/response types

Good question. So... There's not actually too much duplicated async/sync code in httpx. In this case we just manage that maintainance via code review. As you say, "manually".

That applies to the Client and AsyncClient cases, and also to a few methods on the Response model, such as read() vs. aread().

This is different to the approach that we take in the httpcore package, which is the networking layer we use in httpx. In that case we have a script that gener…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by lovelydinosaur
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants