supabase_functions 2.27.2__tar.gz → 2.28.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.27.2
3
+ Version: 2.28.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.27.2" # {x-release-please-version}
3
+ version = "2.28.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,3 +1,5 @@
1
+ import platform
2
+ import sys
1
3
  from typing import Any, Dict, Literal, Optional, Union
2
4
  from warnings import warn
3
5
 
@@ -27,10 +29,21 @@ class AsyncFunctionsClient:
27
29
  raise ValueError("url must be a valid HTTP URL string")
28
30
  self.url = URL(url)
29
31
  self.headers = {
30
- "User-Agent": f"supabase-py/functions-py v{__version__}",
32
+ "X-Client-Info": f"supabase-py/supabase_functions v{__version__}",
33
+ "X-Supabase-Client-Platform": platform.system(),
34
+ "X-Supabase-Client-Platform-Version": platform.release(),
35
+ "X-Supabase-Client-Runtime": "python",
36
+ "X-Supabase-Client-Runtime-Version": platform.python_version(),
31
37
  **headers,
32
38
  }
33
39
 
40
+ if sys.version_info < (3, 10):
41
+ warn(
42
+ "Python versions below 3.10 are deprecated and will not be supported in future versions. Please upgrade to Python 3.10 or newer.",
43
+ DeprecationWarning,
44
+ stacklevel=2,
45
+ )
46
+
34
47
  if timeout is not None:
35
48
  warn(
36
49
  "The 'timeout' parameter is deprecated. Please configure it in the http client instead.",
@@ -1,3 +1,5 @@
1
+ import platform
2
+ import sys
1
3
  from typing import Any, Dict, Literal, Optional, Union
2
4
  from warnings import warn
3
5
 
@@ -27,10 +29,21 @@ class SyncFunctionsClient:
27
29
  raise ValueError("url must be a valid HTTP URL string")
28
30
  self.url = URL(url)
29
31
  self.headers = {
30
- "User-Agent": f"supabase-py/functions-py v{__version__}",
32
+ "X-Client-Info": f"supabase-py/supabase_functions v{__version__}",
33
+ "X-Supabase-Client-Platform": platform.system(),
34
+ "X-Supabase-Client-Platform-Version": platform.release(),
35
+ "X-Supabase-Client-Runtime": "python",
36
+ "X-Supabase-Client-Runtime-Version": platform.python_version(),
31
37
  **headers,
32
38
  }
33
39
 
40
+ if sys.version_info < (3, 10):
41
+ warn(
42
+ "Python versions below 3.10 are deprecated and will not be supported in future versions. Please upgrade to Python 3.10 or newer.",
43
+ DeprecationWarning,
44
+ stacklevel=2,
45
+ )
46
+
34
47
  if timeout is not None:
35
48
  warn(
36
49
  "The 'timeout' parameter is deprecated. Please configure it in the http client instead.",
@@ -0,0 +1 @@
1
+ __version__ = "2.28.0" # {x-release-please-version}
@@ -1 +0,0 @@
1
- __version__ = "2.27.2" # {x-release-please-version}