Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
Comment thread
o-santi marked this conversation as resolved.
package: ["functions", "realtime", "storage", "auth", "postgrest", "supabase"]
runs-on: ${{ matrix.os }}
steps:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: ci, default, clean, start-infra, stop-infra

PACKAGES := functions realtime storage auth postgrest supabase
PACKAGES := utils functions realtime storage auth postgrest supabase
FORALL_PKGS = $(foreach pkg, $(PACKAGES), $(pkg).$(1))

help::
Expand Down Expand Up @@ -58,6 +58,9 @@ help::
realtime.%:
@$(MAKE) -C src/realtime $*

utils.%:
@$(MAKE) -C src/utils $*

functions.%:
@$(MAKE) -C src/functions $*

Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 23 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "realtime-py: a Realtime python client.";
description = "Supabase-py development flake";

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
Expand Down Expand Up @@ -45,26 +45,40 @@
root = "$REPO_ROOT";
};

pyproject-overlay = final: prev: {
pyproject-overlay = pkgs: final: prev: {
ruamel-yaml-clib = prev.ruamel-yaml-clib.overrideAttrs (old: {
nativeBuildInputs = old.nativeBuildInputs ++ [
(final.resolveBuildSystem {
setuptools = [];
})
];
});

pyiceberg = prev.pyiceberg.overrideAttrs (old: {
buildInputs = (old.buildInputs or []) ++ [ final.poetry-core ];
});
pyroaring = prev.pyroaring.overrideAttrs (old: {
postPatch = (old.postPatch or "") + ''
sed -i '1i from Cython.Build import cythonize' setup.py
sed -i 's/ext_modules=[pyroaring_module]/ext_modules=[cythonize(pyroaring_module)]/' setup.py
'';
nativeBuildInputs = old.nativeBuildInputs ++ [
(final.resolveBuildSystem {
setuptools = [];
})
final.cython
];
});
};

python-for = pkgs: let
extensions = pkgs.lib.composeManyExtensions [
pyproject-build-systems.overlays.default
workspace-overlay
editable-overlay
pyproject-overlay
(pyproject-overlay pkgs)
];
base-python = pkgs.callPackage pyproject-nix.build.packages {
python = pkgs.python311;
python = pkgs.python314;
};
in base-python.overrideScope extensions;
in {
Expand All @@ -79,7 +93,7 @@

# Force uv to use nixpkgs Python interpreter
UV_PROJECT_ENVIRONMENT = python-env;
UV_PYTHON = pkgs.python311.interpreter;
UV_PYTHON = pkgs.python314.interpreter;

# Prevent uv from downloading managed Python's
UV_PYTHON_DOWNLOADS = "never";
Expand All @@ -92,5 +106,8 @@
packages = [ python-env ] ++ (dev-tools pkgs);
};
});
lib = for-all-systems (pkgs: {
python = python-for pkgs;
});
};
}
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ members = [
"src/supabase",
"src/storage",
"src/postgrest",
"src/auth"
"src/auth",
"src/utils",
]

[tool.uv.sources]
realtime = { workspace = true }
supabase_functions = { workspace = true }
supabase_auth = { workspace = true }
supabase_utils = { workspace = true }
storage3 = { workspace = true }
postgrest = { workspace = true }
supabase = { workspace = true }
Expand All @@ -20,7 +22,7 @@ supabase = { workspace = true }
asyncio_mode = "auto"

[tool.ruff]
target-version = "py39"
target-version = "py310"

[tool.ruff.lint]
select = [
Expand Down
29 changes: 24 additions & 5 deletions src/auth/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "supabase_auth"
version = "2.28.3" # {x-release-please-version}
version = "3.0.0a1" # {x-release-please-version}
description = "Python Client Library for Supabase Auth"
authors = [
{name = "Joel Lee", email = "joel@joellee.org" }
Expand All @@ -15,11 +15,11 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dependencies = [
"httpx[http2] >=0.26,<0.29",
"pydantic >=1.10,<3",
"pydantic >=2,<3",
"pyjwt[crypto] >=2.10.1",
"supabase_utils == 3.0.0a1", # x-release-please-version
]

[project.urls]
Expand All @@ -40,6 +40,7 @@ tests = [
"pytest-cov >= 6.2.1",
"pytest-depends >= 1.0.1",
"pytest-asyncio >= 1.0.0",
"supabase_utils[all]",
"pyotp>=2.9.0",
]
lints = [
Expand All @@ -53,13 +54,31 @@ dev = [{ include-group = "lints" }, {include-group = "tests" }]

[tool.pytest.ini_options]
asyncio_mode = "auto"
addopts = "tests"

[tool.ruff.lint]
select = [
# pycodestyle
"E",
# Pyflakes
"F",
# pyupgrade
"UP",
# flake8-bugbear
# "B",
# flake8-simplify
# "SIM",
# isort
"I",
]
ignore = ["E712", "E501", "E402", "UP006", "UP035"]

[build-system]
requires = ["uv_build>=0.8.3,<0.9.0"]
build-backend = "uv_build"

[tool.mypy]
python_version = "3.9"
python_version = "3.10"
check_untyped_defs = true
allow_redefinition = true
follow_untyped_imports = true # for deprecation module that does not have stubs
Expand Down
7 changes: 3 additions & 4 deletions src/auth/scripts/gh-download.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import os
import shutil
import sys
from typing import Optional

from github import Github, GithubException
from github.ContentFile import ContentFile
Expand Down Expand Up @@ -90,9 +89,9 @@ def main(argv) -> None:
print(err)
usage()
sys.exit(2)
repo: Optional[str] = None
branch: Optional[str] = None
folder: Optional[str] = None
repo: str | None = None
branch: str | None = None
folder: str | None = None
for opt, arg in opts:
if opt in ("-r", "--repo"):
repo = arg
Expand Down
12 changes: 4 additions & 8 deletions src/auth/src/supabase_auth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
from __future__ import annotations

from ._async.gotrue_admin_api import AsyncGoTrueAdminAPI # noqa
from ._async.gotrue_client import AsyncGoTrueClient # noqa
from ._async.storage import (
from .admin_api import AsyncSupabaseAuthAdmin, SyncSupabaseAuthAdmin # noqa
from .client import AsyncSupabaseAuthClient, SyncSupabaseAuthClient # noqa
from .session import (
AsyncMemoryStorage, # noqa
AsyncSupportedStorage, # noqa
)
from ._sync.gotrue_admin_api import SyncGoTrueAdminAPI # noqa
from ._sync.gotrue_client import SyncGoTrueClient # noqa
from ._sync.storage import (
SyncMemoryStorage, # noqa
SyncSupportedStorage, # noqa
)
from .types import *
from .types import * # noqa
from .version import __version__ # noqa
1 change: 0 additions & 1 deletion src/auth/src/supabase_auth/_async/__init__.py

This file was deleted.

Loading
Loading