Skip to content

Commit 7f6fd5c

Browse files
nicoklausnejch
authored andcommitted
chore: add deprecation warning for mirror_pull functions
1 parent 9e18672 commit 7f6fd5c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

gitlab/v4/objects/projects.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -608,6 +608,13 @@ def mirror_pull(self, **kwargs: Any) -> None:
608608
GitlabAuthenticationError: If authentication is not correct
609609
GitlabCreateError: If the server failed to perform the request
610610
"""
611+
utils.warn(
612+
message=(
613+
"project.mirror_pull() is deprecated and will be removed in a "
614+
"future major version. Use project.pull_mirror.start() instead."
615+
),
616+
category=DeprecationWarning,
617+
)
611618
path = f"/projects/{self.encoded_id}/mirror/pull"
612619
self.manager.gitlab.http_post(path, **kwargs)
613620

@@ -628,6 +635,13 @@ def mirror_pull_details(self, **kwargs: Any) -> Dict[str, Any]:
628635
Returns:
629636
dict of the parsed json returned by the server
630637
"""
638+
utils.warn(
639+
message=(
640+
"project.mirror_pull_details() is deprecated and will be removed in a "
641+
"future major version. Use project.pull_mirror.get() instead."
642+
),
643+
category=DeprecationWarning,
644+
)
631645
path = f"/projects/{self.encoded_id}/mirror/pull"
632646
result = self.manager.gitlab.http_get(path, **kwargs)
633647
if TYPE_CHECKING:

0 commit comments

Comments
 (0)