@@ -402,32 +402,6 @@ def version(self) -> Tuple[str, str]:
402402
403403 return cast (str , self ._server_version ), cast (str , self ._server_revision )
404404
405- @gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabVerifyError )
406- def lint (self , content : str , ** kwargs : Any ) -> Tuple [bool , List [str ]]:
407- """Validate a gitlab CI configuration.
408-
409- Args:
410- content: The .gitlab-ci.yml content
411- **kwargs: Extra options to send to the server (e.g. sudo)
412-
413- Raises:
414- GitlabAuthenticationError: If authentication is not correct
415- GitlabVerifyError: If the validation could not be done
416-
417- Returns:
418- (True, []) if the file is valid, (False, errors(list)) otherwise
419- """
420- utils .warn (
421- "`lint()` is deprecated and will be removed in a future version.\n "
422- "Please use `ci_lint.create()` instead." ,
423- category = DeprecationWarning ,
424- )
425- post_data = {"content" : content }
426- data = self .http_post ("/ci/lint" , post_data = post_data , ** kwargs )
427- if TYPE_CHECKING :
428- assert not isinstance (data , requests .Response )
429- return (data ["status" ] == "valid" , data ["errors" ])
430-
431405 @gitlab .exceptions .on_http_error (gitlab .exceptions .GitlabMarkdownError )
432406 def markdown (
433407 self , text : str , gfm : bool = False , project : Optional [str ] = None , ** kwargs : Any
@@ -869,7 +843,6 @@ def http_list(
869843 path : str ,
870844 query_data : Optional [Dict [str , Any ]] = None ,
871845 * ,
872- as_list : Optional [bool ] = None , # Deprecated in favor of `iterator`
873846 iterator : Optional [bool ] = None ,
874847 ** kwargs : Any ,
875848 ) -> Union ["GitlabList" , List [Dict [str , Any ]]]:
@@ -896,23 +869,6 @@ def http_list(
896869 """
897870 query_data = query_data or {}
898871
899- # Don't allow both `as_list` and `iterator` to be set.
900- if as_list is not None and iterator is not None :
901- raise ValueError (
902- "Only one of `as_list` or `iterator` can be used. "
903- "Use `iterator` instead of `as_list`. `as_list` is deprecated."
904- )
905-
906- if as_list is not None :
907- iterator = not as_list
908- utils .warn (
909- message = (
910- f"`as_list={ as_list } ` is deprecated and will be removed in a "
911- f"future version. Use `iterator={ iterator } ` instead."
912- ),
913- category = DeprecationWarning ,
914- )
915-
916872 # Provide a `get_all`` param to avoid clashes with `all` API attributes.
917873 get_all = kwargs .pop ("get_all" , None )
918874
@@ -926,8 +882,6 @@ def http_list(
926882
927883 if iterator and page is not None :
928884 arg_used_message = f"iterator={ iterator } "
929- if as_list is not None :
930- arg_used_message = f"as_list={ as_list } "
931885 utils .warn (
932886 message = (
933887 f"`{ arg_used_message } ` and `page={ page } ` were both specified. "
0 commit comments