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(client): addhttp_patch method#2471

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

Merged
nejch merged 1 commit intomainfromjlvillal/http_patch
Feb 5, 2023
Merged

Conversation

JohnVillalovos
Copy link
Member

In order to support some new API calls we need to support the HTTPPATCH method.

Closes:#2469

@JohnVillalovosJohnVillalovos marked this pull request as draftFebruary 3, 2023 01:34
@JohnVillalovos
Copy link
MemberAuthor

@nejch Just wanted to get the ball rolling on this. Not sure how much should be in the PR.

Some unit tests are going to be wanted. Not sure about functional tests.

@lmilbaum
Copy link

How about placing the function in the backend?

@JohnVillalovos
Copy link
MemberAuthor

How about placing the function in the backend?

Since I don't know much about the backend, can you explain why? I'm doing it like all the otherhttp_* methods which currently exist.

@lmilbaum
Copy link

How about placing the function in the backend?

Since I don't know much about the backend, can you explain why? I'm doing it like all the otherhttp_* methods which currently exist.

Moving the http_* functions to the backend has already started. It will save a future work of moving this one as well and there will be no need to change the function signature.

@JohnVillalovos
Copy link
MemberAuthor

JohnVillalovos commentedFeb 3, 2023
edited
Loading

Moving the http_* functions to the backend has already started. It will save a future work of moving this one as well and there will be no need to change the function signature.

Sorry. I haven't looked into the back-end code. Can you explain how that will work? I don't really see much of anything in the back-end. I don't see any of thehttp_* methods there. EDIT: I seehttp_request

If all the otherhttp_* methods need to be moved then I'm not sure how this one extra function is going to add much to the work required.

@lmilbaum
Copy link

Moving the http_* functions to the backend has already started. It will save a future work of moving this one as well and there will be no need to change the function signature.

Sorry. I haven't looked into the back-end code. Can you explain how that will work? I don't really see much of anything in the back-end. I don't see any of thehttp_* methods there. EDIT: I seehttp_request

If all the otherhttp_* methods need to be moved then I'm not sure how this one extra function is going to add much to the work required.

You might want to take a look at#2435

@codecov-commenter
Copy link

codecov-commenter commentedFeb 3, 2023
edited
Loading

Codecov Report

Merging#2471 (b27f4ee) intomain (0867564) willincrease coverage by0.00%.
The diff coverage is100.00%.

📣 This organization is not using Codecov’sGitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories.Learn more

@@           Coverage Diff           @@##             main    #2471   +/-   ##=======================================  Coverage   96.18%   96.19%           =======================================  Files          86       86             Lines        5635     5644    +9     =======================================+ Hits         5420     5429    +9  Misses        215      215
FlagCoverage Δ
api_func_v482.54% <11.11%> (-0.12%)⬇️
cli_func_v482.74% <11.11%> (-0.12%)⬇️
unit87.65% <100.00%> (+0.01%)⬆️

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

Impacted FilesCoverage Δ
gitlab/client.py98.79% <100.00%> (+0.02%)⬆️

@nejch
Copy link
Member

nejch commentedFeb 3, 2023
edited
Loading

@JohnVillalovos, I think this could be afeat as people can already use it for unimplemented endpoints after merge.

Moving the http_* functions to the backend has already started. It will save a future work of moving this one as well and there will be no need to change the function signature.

Sorry. I haven't looked into the back-end code. Can you explain how that will work? I don't really see much of anything in the back-end. I don't see any of thehttp_* methods there. EDIT: I seehttp_request
If all the otherhttp_* methods need to be moved then I'm not sure how this one extra function is going to add much to the work required.

You might want to take a look at#2435

@lmilbaum in any case we will have these user-facing helper methods on the client, preferably backend-agnostic (https://python-gitlab.readthedocs.io/en/stable/api-levels.html#lower-level-api-http-methods). They help users work around endpoints we haven't implemented in the library.

I hope if we get this right onlyhttp_request and the associated typing will need a significant backend-specific implementation and the rest can wrap around it like we do now.

@lmilbaum
Copy link

@JohnVillalovos, I think this could be afeat as people can already use it for unimplemented endpoints after merge.

Moving the http_* functions to the backend has already started. It will save a future work of moving this one as well and there will be no need to change the function signature.

Sorry. I haven't looked into the back-end code. Can you explain how that will work? I don't really see much of anything in the back-end. I don't see any of thehttp_* methods there. EDIT: I seehttp_request
If all the otherhttp_* methods need to be moved then I'm not sure how this one extra function is going to add much to the work required.

You might want to take a look at#2435

@lmilbaum in any case we will have these user-facing helper methods on the client, preferably backend-agnostic (https://python-gitlab.readthedocs.io/en/stable/api-levels.html#lower-level-api-http-methods). They help users work around endpoints we haven't implemented in the library.

I hope if we get this right onlyhttp_request and the associated typing will need a significant backend-specific implementation and the rest can wrap around it like we do now.

I am not following what you are trying to say. In any case, maybe switching the return type in a similar way I've done in the PR#2435.

In order to support some new API calls we need to support the HTTP `PATCH` method.Closes:#2469
@JohnVillalovosJohnVillalovos marked this pull request as ready for reviewFebruary 4, 2023 01:16
@nejchnejch changed the titlechore: addhttp_patch methodfeat: addhttp_patch methodFeb 5, 2023
@nejch
Copy link
Member

I am not following what you are trying to say. In any case, maybe switching the return type in a similar way I've done in the PR#2435.

@lmilbaum since this PR is a separate concern, I think we can do that after, I can also rebase your PR withhttp_patch to avoid more rebase issues on your end. I think we can go ahead with this one just to unblock users who want to update protected branches in#2390.

@nejchnejch changed the titlefeat: addhttp_patch methodfeat(client): addhttp_patch methodFeb 5, 2023
@nejchnejch merged commitf711d9e intomainFeb 5, 2023
@nejchnejch deleted the jlvillal/http_patch branchFebruary 5, 2023 21:10
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch approved these changes

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

Successfully merging this pull request may close these issues.

RFE: Add support forPATCH requests. Create ahttp_patch() method
4 participants
@JohnVillalovos@lmilbaum@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp