From 8c768a6c0a89c13a60b5a158659cd8b5f1a4301a Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 24 Jan 2025 17:37:56 -0300 Subject: [PATCH 1/5] fix: fix #185 --- supabase_functions/_async/functions_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supabase_functions/_async/functions_client.py b/supabase_functions/_async/functions_client.py index 7c5cced..c9ab768 100644 --- a/supabase_functions/_async/functions_client.py +++ b/supabase_functions/_async/functions_client.py @@ -47,7 +47,10 @@ async def _request( headers: Optional[Dict[str, str]] = None, json: Optional[Dict[Any, Any]] = None, ) -> Response: - response = await self._client.request(method, url, json=json, headers=headers) + + user_data = {'data': json} if isinstance(json, str) else {'json': json} + response = await self._client.request(method, url, **user_data, headers=headers) + try: response.raise_for_status() except HTTPError as exc: From a9a26e7e7ae72cc65c67af1017d8f997a6a83f88 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 24 Jan 2025 17:38:02 -0300 Subject: [PATCH 2/5] fix: fix #185 --- supabase_functions/_sync/functions_client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/supabase_functions/_sync/functions_client.py b/supabase_functions/_sync/functions_client.py index 1168bdf..76f6c70 100644 --- a/supabase_functions/_sync/functions_client.py +++ b/supabase_functions/_sync/functions_client.py @@ -47,7 +47,10 @@ def _request( headers: Optional[Dict[str, str]] = None, json: Optional[Dict[Any, Any]] = None, ) -> Response: - response = self._client.request(method, url, json=json, headers=headers) + + user_data = {'data': json} if isinstance(json, str) else {'json': json} + response = self._client.request(method, url, **user_data, headers=headers) + try: response.raise_for_status() except HTTPError as exc: From f35478d8078e577218cc4f61983461b20875fc77 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 24 Jan 2025 17:41:17 -0300 Subject: [PATCH 3/5] fix: fix #185 --- supabase_functions/_async/functions_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase_functions/_async/functions_client.py b/supabase_functions/_async/functions_client.py index c9ab768..42d8d20 100644 --- a/supabase_functions/_async/functions_client.py +++ b/supabase_functions/_async/functions_client.py @@ -48,7 +48,7 @@ async def _request( json: Optional[Dict[Any, Any]] = None, ) -> Response: - user_data = {'data': json} if isinstance(json, str) else {'json': json} + user_data = {"data": json} if isinstance(json, str) else {"json": json} response = await self._client.request(method, url, **user_data, headers=headers) try: From ba74e7d74a36048652f77b7045dcf2ae572ef069 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 24 Jan 2025 17:41:23 -0300 Subject: [PATCH 4/5] fix: fix #185 --- supabase_functions/_sync/functions_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase_functions/_sync/functions_client.py b/supabase_functions/_sync/functions_client.py index 76f6c70..99780eb 100644 --- a/supabase_functions/_sync/functions_client.py +++ b/supabase_functions/_sync/functions_client.py @@ -48,7 +48,7 @@ def _request( json: Optional[Dict[Any, Any]] = None, ) -> Response: - user_data = {'data': json} if isinstance(json, str) else {'json': json} + user_data = {"data": json} if isinstance(json, str) else {"json": json} response = self._client.request(method, url, **user_data, headers=headers) try: From 50c60a1f400f0034a9798bd44748d9f4e3b328f7 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Fri, 24 Jan 2025 17:48:03 -0300 Subject: [PATCH 5/5] fix: fix #185 --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 921fdd6..7415c7d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,7 @@ jobs: run: make run_tests - name: Upload coverage to Coveralls + if: ${{ matrix.python-version }} == "3.12" uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.GITHUB_TOKEN }}