|
1 | | -import warnings |
2 | | - |
3 | 1 | from gitlab import cli |
4 | 2 | from gitlab import exceptions as exc |
5 | 3 | from gitlab.base import RequiredOptional, RESTManager, RESTObject |
@@ -45,33 +43,6 @@ class ProjectMergeRequestPipelineManager(CreateMixin, ListMixin, RESTManager): |
45 | 43 | _obj_cls = ProjectMergeRequestPipeline |
46 | 44 | _from_parent_attrs = {"project_id": "project_id", "mr_iid": "iid"} |
47 | 45 |
|
48 | | - # If the manager was called directly as a callable via |
49 | | - # mr.pipelines(), execute the deprecated method for now. |
50 | | - # TODO: in python-gitlab 3.0.0, remove this method entirely. |
51 | | - |
52 | | - @cli.register_custom_action("ProjectMergeRequest", custom_action="pipelines") |
53 | | - @exc.on_http_error(exc.GitlabListError) |
54 | | - def __call__(self, **kwargs): |
55 | | - """List the merge request pipelines. |
56 | | -
|
57 | | - Args: |
58 | | - **kwargs: Extra options to send to the server (e.g. sudo) |
59 | | -
|
60 | | - Raises: |
61 | | - GitlabAuthenticationError: If authentication is not correct |
62 | | - GitlabListError: If the list could not be retrieved |
63 | | -
|
64 | | - Returns: |
65 | | - RESTObjectList: List of changes |
66 | | - """ |
67 | | - warnings.warn( |
68 | | - "Calling the ProjectMergeRequest.pipelines() method on " |
69 | | - "merge request objects directly is deprecated and will be replaced " |
70 | | - "by ProjectMergeRequest.pipelines.list() in python-gitlab 3.0.0.\n", |
71 | | - DeprecationWarning, |
72 | | - ) |
73 | | - return self.list(**kwargs) |
74 | | - |
75 | 46 |
|
76 | 47 | class ProjectPipeline(RefreshMixin, ObjectDeleteMixin, RESTObject): |
77 | 48 | bridges: "ProjectPipelineBridgeManager" |
|
0 commit comments