Skip to content

Commit

Permalink
refactor(projects): remove deprecated project.transfer_project() in…
Browse files Browse the repository at this point in the history
… favor of `project.transfer()`

BREAKING CHANGE: The deprecated `project.transfer_project()` method is no longer available.
Use `project.transfer()` instead.
  • Loading branch information
nejch authored and JohnVillalovos committed Aug 20, 2023
1 parent e9d48cf commit 27ed490
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions gitlab/v4/objects/projects.py
Expand Up @@ -625,17 +625,6 @@ def transfer(self, to_namespace: Union[int, str], **kwargs: Any) -> None:
path, post_data={"namespace": to_namespace}, **kwargs
)

@cli.register_custom_action("Project", ("to_namespace",))
def transfer_project(self, *args: Any, **kwargs: Any) -> None:
utils.warn(
message=(
"The project.transfer_project() method is deprecated and will be "
"removed in a future version. Use project.transfer() instead."
),
category=DeprecationWarning,
)
return self.transfer(*args, **kwargs)

@cli.register_custom_action("Project", ("ref_name", "artifact_path", "job"))
@exc.on_http_error(exc.GitlabGetError)
def artifact(
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/objects/test_projects.py
Expand Up @@ -772,11 +772,6 @@ def test_artifact_project(project, resp_artifact):
project.artifact("ref_name", "artifact_path", "job")


def test_transfer_project_deprecated_warns(project, resp_transfer_project):
with pytest.warns(DeprecationWarning):
project.transfer_project("test-namespace")


def test_project_pull_mirror(project, resp_start_pull_mirroring_project):
project.mirror_pull()

Expand Down

0 comments on commit 27ed490

Please sign in to comment.