88
99from ._db import TransactionDatabase
1010
11- type VerifyType = ssl .SSLContext | str | bool
12- type PathType = PathLike | str | bytes
13- type ContentKey = tuple [str , str , bytes ]
14- type ModeType = Literal ["store" , "use" , "hybrid" , "passive" ]
11+ VerifyType = ssl .SSLContext | str | bool
12+ PathType = PathLike | str | bytes
13+ ContentKey = tuple [str , str , bytes ]
14+ ModeType = Literal ["store" , "use" , "hybrid" , "passive" ]
1515
1616DEFAULT_LOGGER = logging .getLogger (__name__ )
17- _installed = False
17+ _installed_httpx = False
1818_httpc_installed = False
1919
2020
@@ -92,9 +92,9 @@ async def handle_async_request(self, request: httpx.Request) -> httpx.Response:
9292 return response
9393
9494
95- def install (db_path : PathType , mode : ModeType ):
96- global _installed
97- if _installed :
95+ def install_httpx (db_path : PathType , mode : ModeType ):
96+ global _installed_httpx
97+ if _installed_httpx :
9898 return
9999
100100 import atexit
@@ -107,7 +107,7 @@ def install(db_path: PathType, mode: ModeType):
107107 # monkey patching transport
108108 httpx .AsyncClient .__init__ .__kwdefaults__ ["transport" ] = transport
109109
110- _installed = True
110+ _installed_httpx = True
111111
112112
113113def install_httpc (db_path : PathType , mode : ModeType ):
0 commit comments