Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use dev dependency-group#14085

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Avasam wants to merge1 commit intopython:main
base:main
Choose a base branch
Loading
fromAvasam:using-dependency-groups-for-dev-dependencies

Conversation

Avasam
Copy link
Collaborator

@AvasamAvasam commentedMay 16, 2025
edited
Loading

Wouldclose#13974, but as previously mentioned, there's some blockers from uv:

AFAIK there's currently no way to have a dependency group with local files be both pip and uv compatible:

[dependency-groups]dev = [# ... snipped out all other requirements that don't matter for this example# Utilities for typeshed infrastructure scripts."ts_utils @ file:lib",# Works with pip but not uv][tool.uv.sources]ts_utils = {path ="lib",editable =true }# Works with uv but obviously not pip
PS> uv pip install--group=deverror: Failed to parse entryin group`dev`:`ts_utils @ file:lib`  Caused by: relative path without a working directory: libts_utils @ file:lib

@github-actionsGitHub Actions
Copy link
Contributor

According tomypy_primer, this change has no effect on the checked open source code. 🤖🎉

- name: Run mypy_primer
shell: bash
run: |
cd typeshed_to_test
MYPY_VERSION=$(grep mypy==requirements-tests.txt| cut -d = -f 3)
MYPY_VERSION=$(python3 -m dependency_groups dev |grep mypy== | cut -d = -f3)
Copy link
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

An alternative that is less "correct" but doesn't depend ondependency_groups and is still pretty solid to random spaces

Suggested change
MYPY_VERSION=$(python3 -m dependency_groups dev | grepmypy== | cut -d = -f3)
MYPY_VERSION=$(grep -E 'mypy\s+?==' pyproject.toml | awk -F '[ ="]+' '{print $3}')

@AvasamAvasam added status: deferredIssue or PR deferred until some precondition is fixed project: infrastructuretypeshed build, test, documentation, or distribution related labelsMay 16, 2025
@Akuli
Copy link
Collaborator

Akuli commentedMay 16, 2025
edited
Loading

I don't like how this makes usinguv mandatory. Currently you can still dopip install -r requirements-tests.txt if you don't want to useuv.

Edit: I guesspip install -e . will work, but this still feels like a downgrade to me:-r is super simple to understand or explain.

@Avasam
Copy link
CollaboratorAuthor

Avasam commentedMay 17, 2025
edited
Loading

pip install --group=dev isn't a uv command. You need pip 25.1 though.

The reason this is draft is because at the moment it would only work with uv OR pip. Because uv doesn't support (yet?) relative file paths in dependencies. So there's no way to configure dependency groups to satisfy both tools.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
project: infrastructuretypeshed build, test, documentation, or distribution relatedstatus: deferredIssue or PR deferred until some precondition is fixed
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Merge requirements-tests.txt into pyproject.toml?
2 participants
@Avasam@Akuli

[8]ページ先頭

©2009-2025 Movatter.jp