Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Initial support for httpx#2336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
lmilbaum wants to merge1 commit intopython-gitlab:mainfromlmilbaum:httpx

Conversation

lmilbaum
Copy link

@lmilbaumlmilbaum commentedOct 20, 2022
edited
Loading

A followup of#1036
Two clients defined:requests andhttpx. As long ashttpx is not fully implemented and adopted by the community, keeping therequests client as the default.

@codecov-commenter
Copy link

codecov-commenter commentedOct 20, 2022
edited
Loading

Codecov Report

Merging#2336 (9626499) intomain (9d2b1ad) willdecrease coverage by0.81%.
The diff coverage is84.42%.

@@            Coverage Diff             @@##             main    #2336      +/-   ##==========================================- Coverage   95.96%   95.14%   -0.82%==========================================  Files          80       82       +2       Lines        5331     5440     +109     ==========================================+ Hits         5116     5176      +60- Misses        215      264      +49
FlagCoverage Δ
api_func_v483.05% <71.62%> (-0.65%)⬇️
cli_func_v481.72% <64.01%> (-0.64%)⬇️
unit87.07% <79.58%> (-0.66%)⬇️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/http_clients/_httpx_client.py0.00% <0.00%> (ø)
gitlab/mixins.py92.05% <ø> (ø)
gitlab/v4/objects/deploy_keys.py96.42% <ø> (ø)
gitlab/v4/objects/groups.py89.94% <ø> (ø)
gitlab/v4/objects/repositories.py83.56% <ø> (ø)
gitlab/client.py95.89% <90.69%> (-2.67%)⬇️
gitlab/http_clients/_request_sclient.py96.87% <96.87%> (ø)
gitlab/const.py100.00% <100.00%> (ø)
gitlab/v4/objects/commits.py94.87% <100.00%> (ø)
gitlab/v4/objects/environments.py100.00% <100.00%> (ø)
... and6 more

@lmilbaumlmilbaumforce-pushed thehttpx branch 2 times, most recently from183d29d to3a363d2CompareOctober 20, 2022 10:52
Copy link
Member

@nejchnejch left a comment

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!

@lmilbaumlmilbaumforce-pushed thehttpx branch 3 times, most recently from9db988a to1a3e23dCompareOctober 20, 2022 14:36
@lmilbaumlmilbaum requested a review fromnejchOctober 20, 2022 14:36
@lmilbaumlmilbaumforce-pushed thehttpx branch 18 times, most recently from20bcffb to3918639CompareOctober 22, 2022 16:39
@lmilbaumlmilbaum marked this pull request as ready for reviewOctober 22, 2022 16:57
@lmilbaumlmilbaumforce-pushed thehttpx branch 2 times, most recently from1a7938b tofa23370CompareOctober 28, 2022 09:16
@lmilbaumlmilbaum requested review fromJohnVillalovos andnejch and removed request fornejch andJohnVillalovosNovember 1, 2022 11:53
@nejch
Copy link
Member

@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 inhttps://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
Copy link
Author

@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 inhttps://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 inpython-redmine. The question I have with this approach is wether it goes along with our approach of eventually dropping therequest http client/engine and stay with onlyhttpx.

@lmilbaumlmilbaumforce-pushed thehttpx branch 3 times, most recently fromdc66009 to55edad8CompareNovember 7, 2022 03:16
@lmilbaumlmilbaumforce-pushed thehttpx branch 2 times, most recently fromc0132ac to9626499CompareNovember 18, 2022 14:00
@lmilbaum
Copy link
Author

Would breaking this PR into smaller pieces would make sense?

@nejch
Copy link
Member

Would breaking this PR into smaller pieces would make sense?

I think this might help yes@lmilbaum!
It would probably be a smaller PR if we don't take out all the methods as@JohnVillalovos suggested:

https://github.com/python-gitlab/python-gitlab/pull/2336/files#r1010073025
https://github.com/python-gitlab/python-gitlab/pull/2336/files#r1010073368

Also, it would potentially be a smaller PR if we ensure we keep publichttp_* methods in the main client so that we don't need to change the tests, because this is a public API on the Gitlab instance. We may just have private methods in backend clients that these wrap, but we somehow need to support this for now IMO.

https://python-gitlab.readthedocs.io/en/stable/api-levels.html

@JohnVillalovos
Copy link
Member

So biggest issue with this for me is the type-hints. Everything havingAny 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 useAny.

@lmilbaum
Copy link
Author

Thank you for the feedback@nejch and@JohnVillalovos. I've started breaking this up into smaller PRs. Take a look at#2382

@lmilbaumlmilbaumforce-pushed thehttpx branch 2 times, most recently from084c405 to884daf3CompareNovember 24, 2022 01:23
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch left review comments

@JohnVillalovosJohnVillalovosAwaiting requested review from JohnVillalovos

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

4 participants
@lmilbaum@codecov-commenter@nejch@JohnVillalovos

[8]ページ先頭

©2009-2025 Movatter.jp