supabase / supabase-py

Python Client for Supabase. Query Postgres from Flask, Django, FastAPI. Python user authentication, security policies, edge functions, file storage, and realtime data streaming. Good first issue.
https://supabase.com/docs/reference/python
MIT License
1.67k stars 193 forks source link

Bug: TypeError for Unexpected Keyword Argument 'proxy' in gotrue 2.9.1 with supabase-py 2.8.1 #949

Open sivasai9849 opened 22 hours ago

sivasai9849 commented 22 hours ago

Bug report

Describe the bug

I'm encountering a TypeError while using supabase-py 2.8.1 in combination with gotrue 2.9.1. The error message is as follows:

TypeError: Client.__init__() got an unexpected keyword argument 'proxy'

This occurs when trying to create a Supabase client using the create_client method. It seems to be related to a change introduced in gotrue 2.9.1.

To Reproduce

Steps to reproduce the behavior:

  1. Install the following package versions:
    pip install gotrue==2.9.1
    pip install supabase==2.8.1
  2. Attempt to create a Supabase client with the following code:

    from supabase import create_client, Client
    
    url = SUPABASE_URL
    key = SUPABASE_SECRET
    supabase: Client = create_client(url, key)
  3. The error TypeError: Client.__init__() got an unexpected keyword argument 'proxy' is raised.

Expected behavior

The Supabase client should initialize successfully without raising a TypeError.

Screenshots

![Screenshot of the error]Screenshot 2024-10-01 at 10 11 24 AM

System information

Additional context

The issue does not occur when downgrading to gotrue 2.8.1, so this appears to be a bug related to the latest release of gotrue 2.9.1.

CalvinL15 commented 4 hours ago

I can confirm that I am also facing the same issue, with Python 3.9. When using supabase-py 2.8.1 in combination with gotrue 2.8.1 and httpx 0.25.1, I faced TypeError: __init__() got an unexpected keyword argument 'socket_options' instead. supabase-py 2.8.1 finally worked with httpx also downgraded to 0.24.1, which is not ideal.