Repository navigation
chore: remove stale functions lockfile and upgrade vulnerable dependencies - #1914
Merged
Merged
Conversation
…ncies src/functions/uv.lock was left over from moving functions-py into the monorepo. functions is a uv workspace member, so the file is never read, but Dependabot still reports 51 alerts against it. Upgrade the packages with open Dependabot alerts in the root uv.lock. The fixed releases dropped Python 3.9, so they only apply to the 3.10+ resolutions. Newer anyio uses match statements and no longer pulls in exceptiongroup on 3.11+, which breaks mypy when it is pinned to python_version 3.9 but run on a newer interpreter. Drop the pin in auth, realtime and storage so mypy checks against the running interpreter. The CI matrix still runs mypy on 3.9.
grdsdev
approved these changes
Nov 3, 2026
spydon
added a commit
that referenced
this pull request
Nov 3, 2026
Stacked on #1914. ## Summary Python 3.9 and 3.10 are past end of life, and the security fixes for most dependencies with open Dependabot alerts are only released for Python 3.10+ or 3.11+. Dropping both versions lets the lockfile resolve every package to a single patched version. The PR has two commits so the hand-made changes can be reviewed separately from the mechanical ruff rewrite. ### 1. Drop Python 3.9 and 3.10 - Require `requires-python = ">=3.11"` in every package and in the FastAPI example. - CI tests 3.11, 3.12, 3.13 and 3.14. The FastAPI e2e job tests 3.11 and 3.14. - Remove the "Python versions below 3.10 are deprecated" warnings and the version gates for `StrEnum` and `Self`. - Drop the `strenum` dependency from functions and postgrest. - Allow pytest 9 and pytest-asyncio 1.3+ in functions and supabase, so pytest gets its tmpdir fix. - Relock. Every package now resolves to one version, and every alert against the root `uv.lock` resolves to a patched version. pyarrow is held at 26.0.0 because 26.0.1 was published today without most of its wheels. - Update the devcontainers, READMEs and `AGENTS.md`. ### 2. Ruff pyupgrade fixes for py311 With `target-version = "py311"`, ruff's `keep-runtime-typing` stops applying, so `ruff check --fix` rewrites `Optional[X]` and `Union[X, Y]` to `X | None` and `X | Y` across about 100 files, `_sync` included. The runtime `Union` aliases ruff has no fix for were converted by hand the same way. `ASYNC109` is ignored because it only fires on py311+ and would require removing the public `timeout` parameters on the realtime channel methods. ## Release note This uses `feat:` rather than `feat!:` so release-please cuts a minor release instead of a major one on `main`. Users on 3.9 and 3.10 keep resolving the last compatible release, because pip and uv honour `requires-python`. ## Testing - `make mypy` passes on Python 3.11, 3.12, 3.13 and 3.14. - `make <pkg>.tests` passes for all six packages on Python 3.11, including the infrastructure-backed suites (functions 121, supabase 50 plus xfail/xpass, postgrest 614, storage 151, auth 257, realtime 89). - `make build-sync` followed by `make ruff` produces no diff. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Compatibility** * The minimum supported Python version is now 3.11 across the SDK packages and FastAPI example. Python 3.9 and 3.10 are no longer included in the main CI test matrix. * Development containers now use Python 3.11. CI continues to test through Python 3.14, with updated Python versions in the FastAPI end-to-end workflow. * **Documentation** * Updated installation guidance and prerequisites to specify Python 3.11 or later. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
spydon
added a commit
that referenced
this pull request
Nov 3, 2026
…ncies (#1952) ## Summary - Delete `src/functions/uv.lock`, the same fix #1914 applied to the v2 line. The file was left over from moving functions-py into the monorepo. `src/functions` is a uv workspace member, so uv only reads the root `uv.lock`, but Dependabot still scans this file and reports 66 open alerts against it (pyjwt, virtualenv, setuptools, anyio, certifi and others). The v3 branch never got #1914, so these alerts appeared once v3 became the default branch. - Upgrade the three packages in the root `uv.lock` that still had open alerts: pytest 8.4.2 to 9.2.0, python-dotenv 1.1.1 to 1.2.4 and requests 2.32.5 to 2.34.2. - Allow pytest 9 and pytest-asyncio 1.x in the `functions` and `supabase` dev dependencies. Their upper bounds (`pytest <9.0.0`, `pytest-asyncio <1.2.0` and `<1.1`) blocked the pytest upgrade. pytest-asyncio moves from 1.0.0 to 1.4.1. ## Root lockfile The other open alerts on the root `uv.lock` are already fixed by #1951, which bumped every affected package to a patched version. They should close when Dependabot next rescans the default branch. ## Testing - `uv lock --check` passes. - `supabase_functions` and `supabase` tests pass with pytest 9. - Every package's test suite collects under pytest 9. The infra-backed suites run in CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/functions/uv.lock. It was left over from moving functions-py into the monorepo (chore: include functions-py into monorepo #1204).src/functionsis a uv workspace member, so uv only reads the rootuv.lock, but Dependabot still reports 51 open alerts against this file (including 2 of the 4 critical ones).uv.lock(aiohttp, anyio, cryptography, urllib3, h2, msgpack, ujson and others). This is a targeted--upgrade-packagerefresh, not a fulluv lock --upgrade, so ruff, mypy and the docs toolchain stay on their current versions.python_version = "3.9"from the mypy config ofauth,realtimeandstorage. Newer anyio usesmatchstatements and no longer installsexceptiongroupon Python 3.11+, so mypy pinned to 3.9 but run on a newer interpreter fails on site-packages. mypy now checks against the interpreter it runs on, and the CI matrix still runs it on 3.9.Remaining alerts
The fixed releases of most packages require Python 3.10+, so the lockfile keeps a vulnerable version for the Python 3.9 resolution. Dependabot will keep those root
uv.lockalerts open until Python 3.9 support is dropped.pytestalso stays on 8.4.2 becausesrc/functionspinspytest <9.0.0.Testing
make mypypasses on Python 3.9, 3.10, 3.11, 3.12, 3.13 and 3.14.ruff checkandruff format --checkpass.supabase_functionstests pass on 3.9, 3.10 and 3.14.