feat: Initial support for httpx by lmilbaum · Pull Request #2336 · python-gitlab/python-gitlab
A followup of #1036
Two clients defined: requests and httpx. As long as httpx is not fully implemented and adopted by the community, keeping the requests client as the default.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lmilbaum I made a quick initial pass. Would be interested to see how this runs on functional tests. Thanks a lot for working on this, it's something I've been thinking of myself for a while!
lmilbaum
marked this pull request as ready for review
@lmilbaum Thanks for all the work on this!!
I just did a quick review. If you disagree with my comments don't be afraid to say so slightly_smiling_face I am often wrong!
One concern I have is all the adding of Any to a lot of the type-hints.Yeah. I can understand why. I didn't find any other solution. The understanding that this is an interim step, helps me go for this option.
Thanks both for driving this, sorry again this is taking a while for me to get back into, I thought this would be easier and only the most low-level stuff factored out, similar to how it's done in https://python-redmine.com/advanced/request_engines.html / https://github.com/maxtepkeev/python-redmine/tree/master/redminelib/engines. So just wanted to make sure we take a good look before we merge if there's a simple way :)
@lmilbaum Thanks for all the work on this!!
I just did a quick review. If you disagree with my comments don't be afraid to say so slightly_smiling_face I am often wrong!
One concern I have is all the adding of Any to a lot of the type-hints.Yeah. I can understand why. I didn't find any other solution. The understanding that this is an interim step, helps me go for this option.
Thanks both for driving this, sorry again this is taking a while for me to get back into, I thought this would be easier and only the most low-level stuff factored out, similar to how it's done in https://python-redmine.com/advanced/request_engines.html / https://github.com/maxtepkeev/python-redmine/tree/master/redminelib/engines. So just wanted to make sure we take a good look before we merge if there's a simple way :)
I liked the approach taken in python-redmine. The question I have with this approach is wether it goes along with our approach of eventually dropping the request http client/engine and stay with only httpx.
So biggest issue with this for me is the type-hints. Everything having Any added. I worked a LONG time adding type-hints to the code and this kind of throws it all away :(
So I think we need to figure out a solution that doesn't use Any.