1+ import warnings
12from typing import Any , Callable , cast , Dict , List , Optional , TYPE_CHECKING , Union
23
34import requests
@@ -526,7 +527,7 @@ def mirror_pull(self, **kwargs: Any) -> None:
526527
527528 @cli .register_custom_action ("Project" , ("to_namespace" ,))
528529 @exc .on_http_error (exc .GitlabTransferProjectError )
529- def transfer_project (self , to_namespace : str , ** kwargs : Any ) -> None :
530+ def transfer (self , to_namespace : str , ** kwargs : Any ) -> None :
530531 """Transfer a project to the given namespace ID
531532
532533 Args:
@@ -543,6 +544,15 @@ def transfer_project(self, to_namespace: str, **kwargs: Any) -> None:
543544 path , post_data = {"namespace" : to_namespace }, ** kwargs
544545 )
545546
547+ @cli .register_custom_action ("Project" , ("to_namespace" ,))
548+ def transfer_project (self , * args : Any , ** kwargs : Any ) -> None :
549+ warnings .warn (
550+ "The project.transfer_project() method is deprecated and will be "
551+ "removed in a future version. Use project.transfer() instead." ,
552+ DeprecationWarning ,
553+ )
554+ return self .transfer (* args , ** kwargs )
555+
546556 @cli .register_custom_action ("Project" , ("ref_name" , "job" ), ("job_token" ,))
547557 @exc .on_http_error (exc .GitlabGetError )
548558 def artifacts (
0 commit comments