Skip to content

fix(functions): pass verify as keyword argument in create_client (#1705) - #1706

Merged
o-santi merged 1 commit into
supabase:mainfrom
Mohit-25-tech:fix/functions-create-client-verify-param
Oct 8, 2026
Merged

o-santi merged 1 commit into
supabase:mainfrom
Mohit-25-tech:fix/functions-create-client-verify-param

Conversation

@Mohit-25-tech

Copy link
Copy Markdown
Contributor

Fixes #1705

Summary

In supabase_functions.create_client(), the verify parameter was being passed as the 3rd positional argument to AsyncFunctionsClient and SyncFunctionsClient. However, the 3rd positional argument is timeout: Optional[int], while verify is the 4th argument.

Because bool is an int subclass in Python:

  • Default create_client calls (verify=True) passed True as timeout, forcing client timeouts to 1 second instead of 60.
  • Calling create_client(..., verify=False) set timeout=0 while leaving verify=None (falling back to True), making it impossible to disable SSL verification.

Changes

  • Pass verify=verify as an explicit keyword argument in supabase_functions/__init__.py.
  • Add verify: bool = ... defaults to the @overload signatures for accurate static typing.
  • Add regression tests in src/functions/tests/test_client.py asserting client.timeout == 60 and client.verify across sync and async clients for default and verify=False states.

Verification

  • Ran full test suite in src/functions (all 97 tests passed).
  • Code formatting and linter checks with ruff check and ruff format passed cleanly.

@Mohit-25-tech
Mohit-25-tech requested review from a team and o-santi as code owners October 5, 2026 18:47
@o-santi
o-santi merged commit 42549e4 into supabase:main Oct 8, 2026
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

functions create_client: 'verify' argument misrouted to 'timeout' positionally, setting 1s timeout and breaking SSL configuration

2 participants