| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8236281 commit c4f5ec6
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ | |||
| 28 | 28 | * **release:** Allow to update release ([`b4c4787`](https://github.com/python-gitlab/python-gitlab/commit/b4c4787af54d9db6c1f9e61154be5db9d46de3dd)) | |
| 29 | 29 | * **api:** Add group hooks ([`4a7e9b8`](https://github.com/python-gitlab/python-gitlab/commit/4a7e9b86aa348b72925bce3af1e5d988b8ce3439)) | |
| 30 | 30 | * **api:** Remove responsibility for API inconsistencies for MR reviewers ([`3d985ee`](https://github.com/python-gitlab/python-gitlab/commit/3d985ee8cdd5d27585678f8fbb3eb549818a78eb)) | |
| 31 | - * **api:** Add MR pipeline manager in favor of pipelines() method ([`954357c`](https://github.com/python-gitlab/python-gitlab/commit/954357c49963ef51945c81c41fd4345002f9fb98)) | ||
| 31 | + * **api:** Add MR pipeline manager and deprecate pipelines() method ([`954357c`](https://github.com/python-gitlab/python-gitlab/commit/954357c49963ef51945c81c41fd4345002f9fb98)) | ||
| 32 | 32 | * **api:** Add support for creating/editing reviewers in project merge requests ([`676d1f6`](https://github.com/python-gitlab/python-gitlab/commit/676d1f6565617a28ee84eae20e945f23aaf3d86f)) | |
| 33 | 33 | ||
| 34 | 34 | ### Documentation | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 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" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -40,17 +40,6 @@ def resp_create_merge_request_pipeline(): | |||
| 40 | 40 | yield rsps | |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | - def test_merge_requests_pipelines_deprecated_raises_warning( | ||
| 44 | - project, resp_list_merge_request_pipelines | ||
| 45 | - ): | ||
| 46 | - with pytest.deprecated_call(): | ||
| 47 | - pipelines = project.mergerequests.get(1, lazy=True).pipelines() | ||
| 48 | - | ||
| 49 | - assert len(pipelines) == 1 | ||
| 50 | - assert isinstance(pipelines[0], ProjectMergeRequestPipeline) | ||
| 51 | - assert pipelines[0].sha == pipeline_content["sha"] | ||
| 52 | - | ||
| 53 | - | ||
| 54 | 43 | def test_list_merge_requests_pipelines(project, resp_list_merge_request_pipelines): | |
| 55 | 44 | pipelines = project.mergerequests.get(1, lazy=True).pipelines.list() | |
| 56 | 45 | assert len(pipelines) == 1 | |
| Back | FazBrowse Home | New Git URL |
0 commit comments