supabase_functions 2.23.2__tar.gz → 2.24.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: supabase-functions
3
- Version: 2.23.2
3
+ Version: 2.24.0
4
4
  Summary: Library for Supabase Functions
5
5
  Author: Joel Lee, Andrew Smith
6
6
  Author-email: Joel Lee <joel@joellee.org>, Andrew Smith <a.smith@silentworks.co.uk>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "supabase_functions"
3
- version = "2.23.2" # {x-release-please-version}
3
+ version = "2.24.0" # {x-release-please-version}
4
4
  description = "Library for Supabase Functions"
5
5
  authors = [
6
6
  { name = "Joel Lee", email = "joel@joellee.org" },
@@ -1,7 +1,7 @@
1
1
  from typing import Any, Dict, Literal, Optional, Union
2
2
  from warnings import warn
3
3
 
4
- from httpx import AsyncClient, HTTPError, Response, QueryParams
4
+ from httpx import AsyncClient, HTTPError, QueryParams, Response
5
5
  from yarl import URL
6
6
 
7
7
  from ..errors import FunctionsHttpError, FunctionsRelayError
@@ -22,7 +22,7 @@ class AsyncFunctionsClient:
22
22
  verify: Optional[bool] = None,
23
23
  proxy: Optional[str] = None,
24
24
  http_client: Optional[AsyncClient] = None,
25
- ):
25
+ ) -> None:
26
26
  if not is_http_url(url):
27
27
  raise ValueError("url must be a valid HTTP URL string")
28
28
  self.url = URL(url)
@@ -133,7 +133,7 @@ class AsyncFunctionsClient:
133
133
  region = invoke_options.get("region")
134
134
  if region:
135
135
  if not isinstance(region, FunctionRegion):
136
- warn(f"Use FunctionRegion({region})")
136
+ warn(f"Use FunctionRegion({region})", stacklevel=2)
137
137
  region = FunctionRegion(region)
138
138
 
139
139
  if region.value != "any":
@@ -1,7 +1,7 @@
1
1
  from typing import Any, Dict, Literal, Optional, Union
2
2
  from warnings import warn
3
3
 
4
- from httpx import Client, HTTPError, Response, QueryParams
4
+ from httpx import Client, HTTPError, QueryParams, Response
5
5
  from yarl import URL
6
6
 
7
7
  from ..errors import FunctionsHttpError, FunctionsRelayError
@@ -22,7 +22,7 @@ class SyncFunctionsClient:
22
22
  verify: Optional[bool] = None,
23
23
  proxy: Optional[str] = None,
24
24
  http_client: Optional[Client] = None,
25
- ):
25
+ ) -> None:
26
26
  if not is_http_url(url):
27
27
  raise ValueError("url must be a valid HTTP URL string")
28
28
  self.url = URL(url)
@@ -133,7 +133,7 @@ class SyncFunctionsClient:
133
133
  region = invoke_options.get("region")
134
134
  if region:
135
135
  if not isinstance(region, FunctionRegion):
136
- warn(f"Use FunctionRegion({region})")
136
+ warn(f"Use FunctionRegion({region})", stacklevel=2)
137
137
  region = FunctionRegion(region)
138
138
 
139
139
  if region.value != "any":
@@ -1,9 +1,7 @@
1
1
  import sys
2
2
  from urllib.parse import urlparse
3
- from warnings import warn
4
3
 
5
4
  from httpx import AsyncClient as AsyncClient # noqa: F401
6
- from httpx import Client as BaseClient
7
5
 
8
6
  if sys.version_info >= (3, 11):
9
7
  from enum import StrEnum
@@ -33,25 +31,6 @@ class FunctionRegion(StrEnum):
33
31
  UsWest2 = "us-west-2"
34
32
 
35
33
 
36
- class SyncClient(BaseClient):
37
- def __init__(self, *args, **kwargs):
38
- warn(
39
- "The 'SyncClient' class is deprecated. Please use `Client` from the httpx package instead.",
40
- DeprecationWarning,
41
- stacklevel=2,
42
- )
43
-
44
- super().__init__(*args, **kwargs)
45
-
46
- def aclose(self) -> None:
47
- warn(
48
- "The 'aclose' method is deprecated. Please use `close` method from `Client` in the httpx package instead.",
49
- DeprecationWarning,
50
- stacklevel=2,
51
- )
52
- self.close()
53
-
54
-
55
34
  def is_valid_str_arg(target: str) -> bool:
56
35
  return isinstance(target, str) and len(target.strip()) > 0
57
36
 
@@ -0,0 +1 @@
1
+ __version__ = "2.24.0" # {x-release-please-version}
@@ -1 +0,0 @@
1
- __version__ = "2.23.2" # {x-release-please-version}