File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414import gitlab .config
1515import gitlab .const
1616import gitlab .exceptions
17- from gitlab import utils
17+ from gitlab import http_engines , utils
1818
1919REDIRECT_MSG = (
2020 "python-gitlab detected a {status_code} ({reason!r}) redirection. You must update "
@@ -73,7 +73,12 @@ def __init__(
7373 user_agent : str = gitlab .const .USER_AGENT ,
7474 retry_transient_errors : bool = False ,
7575 keep_base_url : bool = False ,
76+ ** kwargs : Any ,
7677 ) -> None :
78+ """
79+ kwargs:-
80+ :param http_engine: (optional). Engine that will be used to make http requests
81+ """
7782
7883 self ._api_version = str (api_version )
7984 self ._server_version : Optional [str ] = None
@@ -191,6 +196,9 @@ def __init__(
191196 self .statistics = objects .ApplicationStatisticsManager (self )
192197 """See :class:`~gitlab.v4.objects.ApplicationStatisticsManager`"""
193198
199+ http_engine = kwargs .pop ("http_engine" , http_engines .DefaultEngine )
200+ self .http_engine = http_engine (** kwargs )
201+
194202 def __enter__ (self ) -> "Gitlab" :
195203 return self
196204
Original file line number Diff line number Diff line change 1+ """
2+ Defines http engines for processing http requests
3+ """
4+
5+ from .requests_engine import RequestsEngine
6+
7+ DefaultEngine = RequestsEngine
Original file line number Diff line number Diff line change 1+ from typing import Any
2+
3+
4+ class RequestsEngine :
5+ def __init__ (self , ** kwargs : Any ) -> None :
6+ pass
You can’t perform that action at this time.
0 commit comments