supabase_auth 2.9.3__tar.gz → 2.10.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.
Files changed (29) hide show
  1. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/PKG-INFO +1 -1
  2. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/pyproject.toml +5 -5
  3. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/client.py +5 -1
  4. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/helpers.py +5 -0
  5. supabase_auth-2.10.0/supabase_auth/version.py +1 -0
  6. supabase_auth-2.9.3/supabase_auth/version.py +0 -1
  7. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/LICENSE +0 -0
  8. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/README.md +0 -0
  9. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/__init__.py +0 -0
  10. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/__init__.py +0 -0
  11. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/gotrue_admin_api.py +0 -0
  12. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/gotrue_admin_mfa_api.py +0 -0
  13. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/gotrue_base_api.py +0 -0
  14. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/gotrue_client.py +0 -0
  15. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/gotrue_mfa_api.py +0 -0
  16. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_async/storage.py +0 -0
  17. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/__init__.py +0 -0
  18. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/api.py +0 -0
  19. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/gotrue_admin_api.py +0 -0
  20. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/gotrue_admin_mfa_api.py +0 -0
  21. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/gotrue_base_api.py +0 -0
  22. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/gotrue_client.py +0 -0
  23. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/gotrue_mfa_api.py +0 -0
  24. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/_sync/storage.py +0 -0
  25. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/constants.py +0 -0
  26. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/errors.py +0 -0
  27. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/http_clients.py +0 -0
  28. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/timer.py +0 -0
  29. {supabase_auth-2.9.3 → supabase_auth-2.10.0}/supabase_auth/types.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: supabase_auth
3
- Version: 2.9.3
3
+ Version: 2.10.0
4
4
  Summary: Python Client Library for Supabase Auth
5
5
  Home-page: https://github.com/supabase/auth-py
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "supabase_auth"
3
- version = "2.9.3" # {x-release-please-version}
3
+ version = "2.10.0" # {x-release-please-version}
4
4
  description = "Python Client Library for Supabase Auth"
5
5
  authors = ["Joel Lee <joel@joellee.org>"]
6
6
  homepage = "https://github.com/supabase/auth-py"
@@ -21,14 +21,14 @@ pydantic = ">=1.10,<3"
21
21
 
22
22
  [tool.poetry.dev-dependencies]
23
23
  pytest = "^8.3.3"
24
- flake8 = "^5.0.4"
24
+ flake8 = "^7.1.1"
25
25
  black = "^24.4.2"
26
26
  isort = "^5.12.0"
27
- pre-commit = "^3.4.0"
28
- pytest-cov = "^5.0.0"
27
+ pre-commit = "^4.0.1"
28
+ pytest-cov = "^6.0.0"
29
29
  pytest-depends = "^1.0.1"
30
30
  pytest-asyncio = "^0.24.0"
31
- Faker = "^30.6.0"
31
+ Faker = "^30.8.2"
32
32
  unasync-cli = "^0.0.9"
33
33
 
34
34
  [tool.poetry.group.dev.dependencies]
@@ -10,7 +10,7 @@ from uuid import uuid4
10
10
 
11
11
  from ..constants import COOKIE_OPTIONS, DEFAULT_HEADERS, GOTRUE_URL, STORAGE_KEY
12
12
  from ..exceptions import APIError
13
- from ..helpers import model_dump, model_validate
13
+ from ..helpers import is_http_url, model_dump, model_validate
14
14
  from ..types import (
15
15
  AuthChangeEvent,
16
16
  CookieOptions,
@@ -61,6 +61,8 @@ class SyncGoTrueClient:
61
61
  proxy: str
62
62
  HTTP Proxy string or None, None by default, None disables proxy.
63
63
  """
64
+ if not is_http_url(url):
65
+ ValueError("url must be a valid HTTP URL string")
64
66
  if url.startswith("http://"):
65
67
  print(
66
68
  "Warning:\n\nDO NOT USE HTTP IN PRODUCTION FOR GOTRUE EVER!\n"
@@ -428,6 +430,8 @@ class SyncGoTrueClient:
428
430
  APIError
429
431
  If an error occurs.
430
432
  """
433
+ if not is_http_url(url):
434
+ ValueError("url must be a valid HTTP URL string")
431
435
  data = urlparse(url)
432
436
  query = parse_qs(data.query)
433
437
  error_description = query.get("error_description")
@@ -9,6 +9,7 @@ from base64 import urlsafe_b64decode
9
9
  from datetime import datetime
10
10
  from json import loads
11
11
  from typing import Any, Dict, Optional, Type, TypeVar, cast
12
+ from urllib.parse import urlparse
12
13
 
13
14
  from httpx import HTTPStatusError, Response
14
15
  from pydantic import BaseModel
@@ -238,3 +239,7 @@ def parse_response_api_version(response: Response):
238
239
  return dt
239
240
  except Exception as e:
240
241
  return None
242
+
243
+
244
+ def is_http_url(url: str) -> bool:
245
+ return urlparse(url).scheme in {"https", "http"}
@@ -0,0 +1 @@
1
+ __version__ = "2.10.0" # {x-release-please-version}
@@ -1 +0,0 @@
1
- __version__ = "2.9.3" # {x-release-please-version}
File without changes
File without changes