python-gitlab
python-gitlab copied to clipboard
Breakage with Gitlab 16.0 release
With the 16.0 release, Gitlab is deprecating the "/approvals" api[1], and I noticed that python-gitlab still uses in:
class ProjectMergeRequestApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
_path = "/projects/{project_id}/merge_requests/{mr_iid}/approvals"
and
class ProjectApprovalManager(GetWithoutIdMixin, UpdateMixin, RESTManager):
_path = "/projects/{project_id}/approvals"
Is this going to break any functionality of python-gitlab? And should those classes be removed?
- https://docs.gitlab.com/ee/update/deprecations?removal_milestone=16.0#changing-merge-request-approvals-with-the-approvals-api-endpoint
Thanks for the issue @zampierilucas! We already have the /approval_rules endpoint so users have had a way to migrate for a while:
https://github.com/python-gitlab/python-gitlab/blob/348f56e8b95c43a7f140f015d303131665b21772/gitlab/v4/objects/merge_request_approvals.py#L161-L162
So the only thing we can maybe do is remove the UpdateMixin from the following line IMO as it'll no longer be supported in 16.0+:
https://github.com/python-gitlab/python-gitlab/blob/348f56e8b95c43a7f140f015d303131665b21772/gitlab/v4/objects/merge_request_approvals.py#L74
Thank you for the quick response @nejch, and yes, I think I'm using the approval_rules for of all my approvals nowadays.
Feel free to close this issue
Thanks! Let's keep it open so we can remove the update now rather than later so we don't wonder at some point why we have that :sweat_smile: