supabase_auth 2.27.2__tar.gz → 2.27.3__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.
Files changed (28) hide show
  1. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/PKG-INFO +1 -1
  2. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/pyproject.toml +1 -1
  3. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/gotrue_client.py +22 -2
  4. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/gotrue_client.py +22 -2
  5. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/constants.py +0 -6
  6. supabase_auth-2.27.3/src/supabase_auth/version.py +1 -0
  7. supabase_auth-2.27.2/src/supabase_auth/version.py +0 -1
  8. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/README.md +0 -0
  9. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/__init__.py +0 -0
  10. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/__init__.py +0 -0
  11. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/gotrue_admin_api.py +0 -0
  12. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
  13. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/gotrue_admin_oauth_api.py +0 -0
  14. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/gotrue_base_api.py +0 -0
  15. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/gotrue_mfa_api.py +0 -0
  16. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_async/storage.py +0 -0
  17. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/__init__.py +0 -0
  18. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/gotrue_admin_api.py +0 -0
  19. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
  20. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/gotrue_admin_oauth_api.py +0 -0
  21. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/gotrue_base_api.py +0 -0
  22. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
  23. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/_sync/storage.py +0 -0
  24. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/errors.py +0 -0
  25. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/helpers.py +0 -0
  26. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/py.typed +0 -0
  27. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/timer.py +0 -0
  28. {supabase_auth-2.27.2 → supabase_auth-2.27.3}/src/supabase_auth/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: supabase-auth
3
- Version: 2.27.2
3
+ Version: 2.27.3
4
4
  Summary: Python Client Library for Supabase Auth
5
5
  Author: Joel Lee
6
6
  Author-email: Joel Lee <joel@joellee.org>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "supabase_auth"
3
- version = "2.27.2" # {x-release-please-version}
3
+ version = "2.27.3" # {x-release-please-version}
4
4
  description = "Python Client Library for Supabase Auth"
5
5
  authors = [
6
6
  {name = "Joel Lee", email = "joel@joellee.org" }
@@ -1,17 +1,19 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import platform
4
+ import sys
3
5
  import time
4
6
  from contextlib import suppress
5
7
  from typing import Callable, Dict, List, Optional, Tuple
6
8
  from urllib.parse import parse_qs, urlparse
7
9
  from uuid import uuid4
10
+ from warnings import warn
8
11
 
9
12
  from httpx import AsyncClient, QueryParams, Response
10
13
  from jwt import get_algorithm_by_name
11
14
  from typing_extensions import cast
12
15
 
13
16
  from ..constants import (
14
- DEFAULT_HEADERS,
15
17
  EXPIRY_MARGIN,
16
18
  GOTRUE_URL,
17
19
  MAX_RETRIES,
@@ -89,6 +91,7 @@ from ..types import (
89
91
  UserResponse,
90
92
  VerifyOtpParams,
91
93
  )
94
+ from ..version import __version__
92
95
  from .gotrue_admin_api import AsyncGoTrueAdminAPI
93
96
  from .gotrue_base_api import AsyncGoTrueBaseAPI
94
97
  from .gotrue_mfa_api import AsyncGoTrueMFAAPI
@@ -110,10 +113,27 @@ class AsyncGoTrueClient(AsyncGoTrueBaseAPI):
110
113
  verify: bool = True,
111
114
  proxy: Optional[str] = None,
112
115
  ) -> None:
116
+ extra_headers = {
117
+ "X-Client-Info": f"supabase-py/supabase_auth v{__version__}",
118
+ "X-Supabase-Client-Platform": platform.system(),
119
+ "X-Supabase-Client-Platform-Version": platform.release(),
120
+ "X-Supabase-Client-Runtime": "python",
121
+ "X-Supabase-Client-Runtime-Version": platform.python_version(),
122
+ }
123
+ if headers:
124
+ extra_headers.update(headers)
125
+
126
+ if sys.version_info < (3, 10):
127
+ warn(
128
+ "Python versions below 3.10 are deprecated and will not be supported in future versions. Please upgrade to Python 3.10 or newer.",
129
+ DeprecationWarning,
130
+ stacklevel=2,
131
+ )
132
+
113
133
  AsyncGoTrueBaseAPI.__init__(
114
134
  self,
115
135
  url=url or GOTRUE_URL,
116
- headers=headers or DEFAULT_HEADERS,
136
+ headers=extra_headers,
117
137
  http_client=http_client,
118
138
  verify=verify,
119
139
  proxy=proxy,
@@ -1,17 +1,19 @@
1
1
  from __future__ import annotations
2
2
 
3
+ import platform
4
+ import sys
3
5
  import time
4
6
  from contextlib import suppress
5
7
  from typing import Callable, Dict, List, Optional, Tuple
6
8
  from urllib.parse import parse_qs, urlparse
7
9
  from uuid import uuid4
10
+ from warnings import warn
8
11
 
9
12
  from httpx import Client, QueryParams, Response
10
13
  from jwt import get_algorithm_by_name
11
14
  from typing_extensions import cast
12
15
 
13
16
  from ..constants import (
14
- DEFAULT_HEADERS,
15
17
  EXPIRY_MARGIN,
16
18
  GOTRUE_URL,
17
19
  MAX_RETRIES,
@@ -89,6 +91,7 @@ from ..types import (
89
91
  UserResponse,
90
92
  VerifyOtpParams,
91
93
  )
94
+ from ..version import __version__
92
95
  from .gotrue_admin_api import SyncGoTrueAdminAPI
93
96
  from .gotrue_base_api import SyncGoTrueBaseAPI
94
97
  from .gotrue_mfa_api import SyncGoTrueMFAAPI
@@ -110,10 +113,27 @@ class SyncGoTrueClient(SyncGoTrueBaseAPI):
110
113
  verify: bool = True,
111
114
  proxy: Optional[str] = None,
112
115
  ) -> None:
116
+ extra_headers = {
117
+ "X-Client-Info": f"supabase-py/supabase_auth v{__version__}",
118
+ "X-Supabase-Client-Platform": platform.system(),
119
+ "X-Supabase-Client-Platform-Version": platform.release(),
120
+ "X-Supabase-Client-Runtime": "python",
121
+ "X-Supabase-Client-Runtime-Version": platform.python_version(),
122
+ }
123
+ if headers:
124
+ extra_headers.update(headers)
125
+
126
+ if sys.version_info < (3, 10):
127
+ warn(
128
+ "Python versions below 3.10 are deprecated and will not be supported in future versions. Please upgrade to Python 3.10 or newer.",
129
+ DeprecationWarning,
130
+ stacklevel=2,
131
+ )
132
+
113
133
  SyncGoTrueBaseAPI.__init__(
114
134
  self,
115
135
  url=url or GOTRUE_URL,
116
- headers=headers or DEFAULT_HEADERS,
136
+ headers=extra_headers,
117
137
  http_client=http_client,
118
138
  verify=verify,
119
139
  proxy=proxy,
@@ -1,14 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from datetime import datetime
4
- from typing import Dict
5
-
6
- from .version import __version__
7
4
 
8
5
  GOTRUE_URL = "http://localhost:9999"
9
- DEFAULT_HEADERS: Dict[str, str] = {
10
- "X-Client-Info": f"gotrue-py/{__version__}",
11
- }
12
6
  EXPIRY_MARGIN = 10 # seconds
13
7
  MAX_RETRIES = 10
14
8
  RETRY_INTERVAL = 2 # deciseconds
@@ -0,0 +1 @@
1
+ __version__ = "2.27.3" # {x-release-please-version}
@@ -1 +0,0 @@
1
- __version__ = "2.27.2" # {x-release-please-version}
File without changes