diff --git a/poetry.lock b/poetry.lock index cbc01a2c..e3bd5245 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "aiohappyeyeballs" -version = "2.4.2" +version = "2.4.3" description = "Happy Eyeballs for asyncio" optional = false python-versions = ">=3.8" files = [ - {file = "aiohappyeyeballs-2.4.2-py3-none-any.whl", hash = "sha256:8522691d9a154ba1145b157d6d5c15e5c692527ce6a53c5e5f9876977f6dab2f"}, - {file = "aiohappyeyeballs-2.4.2.tar.gz", hash = "sha256:4ca893e6c5c1f5bf3888b04cb5a3bee24995398efef6e0b9f747b5e89d84fd74"}, + {file = "aiohappyeyeballs-2.4.3-py3-none-any.whl", hash = "sha256:8a7a83727b2756f394ab2895ea0765a0a8c475e3c71e98d43d76f22b4b435572"}, + {file = "aiohappyeyeballs-2.4.3.tar.gz", hash = "sha256:75cf88a15106a5002a8eb1dab212525c00d1f4c0fa96e551c9fbe6f09a621586"}, ] [[package]] @@ -739,13 +739,13 @@ files = [ [[package]] name = "httpcore" -version = "1.0.5" +version = "1.0.6" description = "A minimal low-level HTTP client." optional = false python-versions = ">=3.8" files = [ - {file = "httpcore-1.0.5-py3-none-any.whl", hash = "sha256:421f18bac248b25d310f3cacd198d55b8e6125c107797b609ff9b7a6ba7991b5"}, - {file = "httpcore-1.0.5.tar.gz", hash = "sha256:34a38e2f9291467ee3b44e89dd52615370e152954ba21721378a87b2960f7a61"}, + {file = "httpcore-1.0.6-py3-none-any.whl", hash = "sha256:27b59625743b85577a8c0e10e55b50b5368a4f2cfe8cc7bcfa9cf00829c2682f"}, + {file = "httpcore-1.0.6.tar.gz", hash = "sha256:73f6dbd6eb8c21bbf7ef8efad555481853f5f6acdeaff1edb0694289269ee17f"}, ] [package.dependencies] @@ -756,7 +756,7 @@ h11 = ">=0.13,<0.15" asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] -trio = ["trio (>=0.22.0,<0.26.0)"] +trio = ["trio (>=0.22.0,<1.0)"] [[package]] name = "httpx" @@ -1971,4 +1971,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "e72905f3dc45e0d39c9fc46c9a54030adcda6b38b97ad2f6b7e5de9eec65d74b" +content-hash = "4defa77d3b7a8a9570d54d93af5777f48d335f914f23d6cebc0ca5f893ff04eb" diff --git a/pyproject.toml b/pyproject.toml index 7a0a0757..005db570 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ python = "^3.9" postgrest = "^0.17.0" realtime = "^2.0.0" gotrue = "^2.7.0" -httpx = ">=0.24,<0.28" +httpx = ">=0.26,<0.28" storage3 = "^0.8.0" supafunc = "^0.6.0" typing-extensions = "^4.12.2" diff --git a/supabase/_async/auth_client.py b/supabase/_async/auth_client.py index 21610162..b8018313 100644 --- a/supabase/_async/auth_client.py +++ b/supabase/_async/auth_client.py @@ -24,6 +24,7 @@ def __init__( http_client: Optional[AsyncClient] = None, flow_type: AuthFlowType = "implicit", verify: bool = True, + proxy: Optional[str] = None, ): """Instantiate SupabaseAuthClient instance.""" if headers is None: @@ -40,4 +41,5 @@ def __init__( http_client=http_client, flow_type=flow_type, verify=verify, + proxy=proxy, ) diff --git a/supabase/_async/client.py b/supabase/_async/client.py index 29bb629a..b0048354 100644 --- a/supabase/_async/client.py +++ b/supabase/_async/client.py @@ -231,14 +231,18 @@ def _init_storage_client( headers: Dict[str, str], storage_client_timeout: int = DEFAULT_STORAGE_CLIENT_TIMEOUT, verify: bool = True, + proxy: Optional[str] = None, ) -> AsyncStorageClient: - return AsyncStorageClient(storage_url, headers, storage_client_timeout, verify) + return AsyncStorageClient( + storage_url, headers, storage_client_timeout, verify, proxy + ) @staticmethod def _init_supabase_auth_client( auth_url: str, client_options: ClientOptions, verify: bool = True, + proxy: Optional[str] = None, ) -> AsyncSupabaseAuthClient: """Creates a wrapped instance of the GoTrue Client.""" return AsyncSupabaseAuthClient( @@ -249,6 +253,7 @@ def _init_supabase_auth_client( headers=client_options.headers, flow_type=client_options.flow_type, verify=verify, + proxy=proxy, ) @staticmethod @@ -258,6 +263,7 @@ def _init_postgrest_client( schema: str, timeout: Union[int, float, Timeout] = DEFAULT_POSTGREST_CLIENT_TIMEOUT, verify: bool = True, + proxy: Optional[str] = None, ) -> AsyncPostgrestClient: """Private helper for creating an instance of the Postgrest client.""" return AsyncPostgrestClient( @@ -266,6 +272,7 @@ def _init_postgrest_client( schema=schema, timeout=timeout, verify=verify, + proxy=proxy, ) def _create_auth_header(self, token: str): diff --git a/supabase/_sync/auth_client.py b/supabase/_sync/auth_client.py index 9815a238..49332990 100644 --- a/supabase/_sync/auth_client.py +++ b/supabase/_sync/auth_client.py @@ -24,6 +24,7 @@ def __init__( http_client: Optional[SyncClient] = None, flow_type: AuthFlowType = "implicit", verify: bool = True, + proxy: Optional[str] = None, ): """Instantiate SupabaseAuthClient instance.""" if headers is None: @@ -40,4 +41,5 @@ def __init__( http_client=http_client, flow_type=flow_type, verify=verify, + proxy=proxy, ) diff --git a/supabase/_sync/client.py b/supabase/_sync/client.py index 0cf3a227..9eadb47b 100644 --- a/supabase/_sync/client.py +++ b/supabase/_sync/client.py @@ -230,14 +230,18 @@ def _init_storage_client( headers: Dict[str, str], storage_client_timeout: int = DEFAULT_STORAGE_CLIENT_TIMEOUT, verify: bool = True, + proxy: Optional[str] = None, ) -> SyncStorageClient: - return SyncStorageClient(storage_url, headers, storage_client_timeout, verify) + return SyncStorageClient( + storage_url, headers, storage_client_timeout, verify, proxy + ) @staticmethod def _init_supabase_auth_client( auth_url: str, client_options: ClientOptions, verify: bool = True, + proxy: Optional[str] = None, ) -> SyncSupabaseAuthClient: """Creates a wrapped instance of the GoTrue Client.""" return SyncSupabaseAuthClient( @@ -248,6 +252,7 @@ def _init_supabase_auth_client( headers=client_options.headers, flow_type=client_options.flow_type, verify=verify, + proxy=proxy, ) @staticmethod @@ -257,6 +262,7 @@ def _init_postgrest_client( schema: str, timeout: Union[int, float, Timeout] = DEFAULT_POSTGREST_CLIENT_TIMEOUT, verify: bool = True, + proxy: Optional[str] = None, ) -> SyncPostgrestClient: """Private helper for creating an instance of the Postgrest client.""" return SyncPostgrestClient( @@ -265,6 +271,7 @@ def _init_postgrest_client( schema=schema, timeout=timeout, verify=verify, + proxy=proxy, ) def _create_auth_header(self, token: str):