Use unasync approach #3046
Unanswered
karpetrosyan
asked this question in
Ideas
Replies: 1 comment 2 replies
-
Would it be an option to implement the Client around generators, which works with both sync and async, and then make Client and AsyncClient facades? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have over 800 lines of code in our
Client
class.We also have an
AsyncClient
, which is the sameClient
but with async/await syntax, and we should literally write the same code twice.We can consider including the same
unasync.py
file from httpcore](https://github.com/encode/httpcore/blob/master/unasync.py) in our CI to ensure thatClient
andAsyncClient
are always in sync.It's also more robust and secure because issues like #3023 and #3042 are eliminated.
Beta Was this translation helpful? Give feedback.
All reactions