Skip to content

Commit 27ed490

Browse files
nejchJohnVillalovos
authored andcommitted
refactor(projects): remove deprecated project.transfer_project() in favor of project.transfer()
BREAKING CHANGE: The deprecated `project.transfer_project()` method is no longer available. Use `project.transfer()` instead.
1 parent e9d48cf commit 27ed490

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

gitlab/v4/objects/projects.py

-11
Original file line numberDiff line numberDiff line change
@@ -625,17 +625,6 @@ def transfer(self, to_namespace: Union[int, str], **kwargs: Any) -> None:
625625
path, post_data={"namespace": to_namespace}, **kwargs
626626
)
627627

628-
@cli.register_custom_action("Project", ("to_namespace",))
629-
def transfer_project(self, *args: Any, **kwargs: Any) -> None:
630-
utils.warn(
631-
message=(
632-
"The project.transfer_project() method is deprecated and will be "
633-
"removed in a future version. Use project.transfer() instead."
634-
),
635-
category=DeprecationWarning,
636-
)
637-
return self.transfer(*args, **kwargs)
638-
639628
@cli.register_custom_action("Project", ("ref_name", "artifact_path", "job"))
640629
@exc.on_http_error(exc.GitlabGetError)
641630
def artifact(

tests/unit/objects/test_projects.py

-5
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,6 @@ def test_artifact_project(project, resp_artifact):
772772
project.artifact("ref_name", "artifact_path", "job")
773773

774774

775-
def test_transfer_project_deprecated_warns(project, resp_transfer_project):
776-
with pytest.warns(DeprecationWarning):
777-
project.transfer_project("test-namespace")
778-
779-
780775
def test_project_pull_mirror(project, resp_start_pull_mirroring_project):
781776
project.mirror_pull()
782777

0 commit comments

Comments
 (0)