-
Notifications
You must be signed in to change notification settings - Fork 766
Migrate from optional-dependencies to dependency-groups #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: harupy <17039389+harupy@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the Python SDK’s dev dependency handling from pip/extras (optional-dependencies) to uv’s dependency groups, and updates documentation and lockfile accordingly.
Changes:
- Switches from
[project.optional-dependencies]to[dependency-groups]for Python dev dependencies inpyproject.toml. - Regenerates
uv.lockto represent dev dependencies viadev-dependenciesandmetadata.requires-devinstead of extras. - Updates the Python README install instructions to reference
uv syncrather than the old".[dev]"extras pattern.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/pyproject.toml | Defines a dependency-groups.dev group holding the former dev extras, aligning the project with uv’s dependency group model. |
| python/uv.lock | Reflects the new dev dependency representation ([package.dev-dependencies] and [package.metadata.requires-dev]) for the github-copilot-sdk package. |
| python/README.md | Updates installation instructions toward uv-based workflows, though the new pip example currently uses an invalid --group flag and needs correction; also note that CONTRIBUTING.md still references the old ".[dev]" extras pattern and should be updated separately. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
python/README.md
Outdated
|
|
||
| ```bash | ||
| pip install -e ".[dev]" | ||
| pip install -e --group dev . |
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updated installation snippet mixes pip install with a --group flag, but pip itself doesn’t support --group—that flag is specific to uv and will cause this command to fail. To keep the instructions working after switching to dependency groups, this line should either use a valid pip command (without --group) or be rewritten to use uv in a way that correctly installs the dev group (similar to the uv sync example below).
| pip install -e --group dev . | |
| pip install -e . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pip >= v25.1 supports --group: https://pip.pypa.io/en/latest/news/#v25-1
|
@friggeri would you mind taking a look? |
|
@brettcannon do you mind opining? |
Summary
Migrates the Python SDK from pip's optional-dependencies pattern to uv's dependency-groups pattern for dev dependencies.
Changes
[project.optional-dependencies]to[dependency-groups]uv syncinstead ofpip install -e ".[dev]"