Repository navigation
build(python): migrate samples to pyproject.toml and uv - #345
Open
harveymmaunders wants to merge 2 commits into
Open
harveymmaunders wants to merge 2 commits into
harveymmaunders wants to merge 2 commits into
Conversation
- Replace requirements.txt/dev-requirements.txt with pyproject.toml (dev tools in a dependency group) and a committed uv.lock for both the REST and WebSocket samples - Rename the WebSocket project so it no longer clashes with the websockets test dependency; require Python >=3.11 to match CI - Run CI through astral-sh/setup-uv (uv sync --locked, uv run) - Switch Dependabot from the pip to the uv ecosystem - Update READMEs to use uv, with a plain pip fallback (pip install . --group dev) for users who don't use uv Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
astral-sh/setup-uv does not publish a floating v10 tag, so @v10 fails to resolve. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
harveymmaunders
force-pushed
the
feature/python-uv-pyproject
branch
from
October 30, 2026 17:34
006ac82 to
92ca005
Compare
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
Moves the Python REST and WebSocket client samples from
requirements.txt/dev-requirements.txt+ pip topyproject.toml+uv.lock, managed with uv.Changes
pyproject.tomlfor both samples: runtime deps in[project.dependencies], test/lint tools in adevdependency group (PEP 735). Versions are unchanged from the old requirements files.uv.lockand.python-versionare committed.python-websockets-client-samplebecause a project calledwebsocketsclashes with thewebsocketstest dependency.requires-python = ">=3.11"to match the CI matrix (3.11–3.15). The READMEs previously said both 3.9+ and 3.10+.python-base-ci.yml): usesastral-sh/setup-uvwith the matrix Python version and caching, thenuv sync --locked,uv run pytestanduv run black --check. There are no pip steps left.uvecosystem instead ofpip.uv sync/uv run ...), with a plain pip fallback for people who don't use uv:Testing
uv run pytest tests/anduv run black --check .pass on Python 3.15 and 3.11 for both samples (REST: 7 tests, WebSockets: 4 tests).pip install . --group devfollowed by pytest passes for both samples.🤖 Generated with Claude Code