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

refactor: Replacing http_requests return type hint#2435

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:http_request

Conversation

lmilbaum
Copy link

@lmilbaumlmilbaum commentedDec 19, 2022
edited
Loading

http_request() will be deprecated in future release in favor of backend_request(). That is because of the return type change and the need to warn users of the change.

@lmilbaumlmilbaum self-assigned thisDec 19, 2022
@lmilbaumlmilbaumforce-pushed thehttp_request branch 2 times, most recently fromb6eedfc to550263aCompareDecember 19, 2022 22:33
@lmilbaumlmilbaum marked this pull request as ready for reviewDecember 19, 2022 22:46
nejch pushed a commit that referenced this pull requestFeb 12, 2023
The purpose of this change is to track API changes described inhttps://github.com/python-gitlab/python-gitlab/blob/main/docs/api-levels.rst,for example, for package versioning and breaking change announcementsin case of protocol changes.This is MVP implementation to be used by#2435.
@lmilbaum
Copy link
Author

/rerun-all

@lmilbaum
Copy link
Author

@nejch after moving the protocols to the backend, this change will pass because the change is for the front end (client) http_request call. The whole point of the protocol is to identify this kind of change.

@lmilbaum
Copy link
Author

/rerun-all

@codecov-commenter
Copy link

codecov-commenter commentedFeb 17, 2023
edited
Loading

Codecov Report

Merging#2435 (7358573) intomain (1da7c53) willincrease coverage by0.00%.
The diff coverage is96.42%.

📣 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    #2435   +/-   ##=======================================  Coverage   96.15%   96.15%           =======================================  Files          87       87             Lines        5663     5667    +4     =======================================+ Hits         5445     5449    +4  Misses        218      218
FlagCoverage Δ
api_func_v482.53% <78.57%> (+0.01%)⬆️
cli_func_v482.98% <64.28%> (+0.01%)⬆️
unit87.61% <92.85%> (+<0.01%)⬆️

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

Impacted FilesCoverage Δ
gitlab/client.py98.80% <96.42%> (+<0.01%)⬆️

@lmilbaumlmilbaumforce-pushed thehttp_request branch 2 times, most recently from7476d56 toa712ddaCompareFebruary 17, 2023 05:05
@lmilbaum
Copy link
Author

@nejch@JohnVillalovos Can you please review this PR?

Comment on lines +826 to +828
utils.warn(
"`http_request()` is deprecated and will be removed in a future version.\n"
"Please use `backend_request()` instead.",
category=DeprecationWarning,
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm a bit wary of this, it would feel wrong deprecating this after we already had a similar discussion in#1842. What would be the issue with having ahttp_request in the public client?

Keeping in mind that the user does not care about the backends generally.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This is a breaking change, so this would need to be at least communicated to users via a breaking change trailer (and triger 4.0.0).

I've thought it would make sense using this method and not to trigger 4.0.0 for now.

Copy link
Member

@nejchnejchMar 10, 2023
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@lmilbaum what I meant was what would be wrong with simply keepinghttp_backend on the client, while having backend-specific implementations in the backends package?

This way it's quite consistent with the existinghttp_* methods (there is also some history in the other MR, where we discussed we'd keep it in the public client as it is).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I am not following.http_backend is kept on the client while having backend-specific implementation in the backend package.
I was just trying to address the valid concern you have raised regarding the breaking change.

@lmilbaumlmilbaum requested a review fromnejchMarch 10, 2023 18:33
@lmilbaumlmilbaumforce-pushed thehttp_request branch 2 times, most recently from5be9523 toc264a12CompareMarch 13, 2023 20:43
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@JohnVillalovosJohnVillalovosAwaiting requested review from JohnVillalovos

@nejchnejchAwaiting requested review from nejch

Assignees

@lmilbaumlmilbaum

Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@lmilbaum@codecov-commenter@nejch

[8]ページ先頭

©2009-2025 Movatter.jp