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

Port requirements to PEP735#29281

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

Open
QuLogic wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromQuLogic:pep735
Open

Conversation

QuLogic
Copy link
Member

PR summary

PEP735 introduces the concept of "Dependency Groups"; these essentially replace our use of variousrequirements.txt files.

NOTE: This is waiting forpip to actually implement Dependency Groups:pypa/pip#12963 We may or may not wish to wait for that to bake a bit even after it's been implemented as well.

PR checklist

@QuLogic
Copy link
MemberAuthor

Note,toxdoes support this already, so the stubtest job is the only one (using dependencies) that does work right now.

Copy link
Member

@WeatherGodWeatherGod left a comment

Choose a reason for hiding this comment

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

I was curious about this new PEP, so I took a look through the changes. I think this would be a really neat feature when pip implements it. I know this is just a draft, but I figured I can point out a couple things I noticed, and I had a couple of questions, too.

@@ -71,8 +71,7 @@ stages:

- bash: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r requirements/dev/build-requirements.txt
python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt
python -m pip install --group build --group test --group test-extra
Copy link
Member

Choose a reason for hiding this comment

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

We'll have to see if it matters whether or not we were upgrading certain dependencies or not. I suspect not.


# Extra pip requirements for the Python 3.10+ builds
test-extra = [
"--prefer-binary",
Copy link
Member

Choose a reason for hiding this comment

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

Will command-line arguments andsys.platform references work in this PEP? It isn't entirely clear to me.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ah, the command-line argument probably won't, but we'll have to see how thepip implementation ends up. Thesys.platform should work as these arestandard dependency specifiers.

Copy link
Member

Choose a reason for hiding this comment

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

I learned something new! Neat!

@@ -51,7 +51,7 @@ jobs:
python-version: '3.10'

- name: Install mypy
run: pip3 install -r requirements/testing/mypy.txt -r requirements/testing/all.txt
run: pip3 install --group typing
Copy link
Member

Choose a reason for hiding this comment

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

does this also need group "test"?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I'm hoping not, so we can reduce the install set.

#
# You will first need a matching Matplotlib installation
# e.g (from the Matplotlib root directory)
# pip install --no-build-isolation --editable .[dev]
Copy link
Member

Choose a reason for hiding this comment

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

Is the.[dev] correct? Or should it be just.?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The[dev] is an extra, not a dependency group. It was intended to cover both build and runtime dependencies. It didn't really work though, aspip installed. before its dependencies, so you couldn't get the build ones early enough. Based on the other implementations, dependency groups should be strictly better, since they should install before., but we'll have to see how it's finally implemented. I should probably rewrite this section a bit once that's finalized.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see. I'm not used to seeing an extra be specified against a directory, so I thought it was a typo. And, yeah, extras wouldn't work for installing dependencies.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

No more.[dev] now.

@QuLogic
Copy link
MemberAuthor

I rebased and fixed the comments.pip doesn't yet support this, butpypa/pip#13065 is scheduled for 25.1 next weekend.

@QuLogicQuLogicforce-pushed thepep735 branch 2 times, most recently from2fe2177 to5803913CompareMay 1, 2025 07:36
@QuLogicQuLogic marked this pull request as ready for reviewMay 1, 2025 09:39
Copy link
Member

@dstansbydstansby left a comment

Choose a reason for hiding this comment

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

This is also going to requirepip >= 25.1 for anyone developing Matplotlib - that should at least go in some sort of release note/changelog entry, and be noted in the development setup docs.

@@ -50,12 +50,12 @@ jobs:
- name-suffix: "(Minimum Versions)"
os: ubuntu-22.04
python-version: '3.11'
extra-requirements: '-c requirements/testing/minver.txt'
extra-requirements: 'python -m pip install --upgrade $PRE --group test-minver'
Copy link
Member

Choose a reason for hiding this comment

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

Why the addition of$PRE here?

python -m pip install -r requirements/testing/all.txt -r requirements/testing/extra.txt
python -m pip install --upgrade --group build
python -m pip install --group test
python -m pip install --prefer-binary --group test-extra
Copy link
Member

Choose a reason for hiding this comment

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

Worth a comment explaining the reason for using--prefer-binary just fortest-extra?

{include-group = "doc"},
{include-group = "test"},
{include-group = "test-extra"},
"ruff",
Copy link
Member

Choose a reason for hiding this comment

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

pre-commit should be added here, and perhapsruff dropped since running pre-commit runs ruff.

"types-python-dateutil",
"types-psutil",
"sphinx",
{include-group = "build"},
Copy link
Member

Choose a reason for hiding this comment

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

Given thedoc andtest groups dont' depend onbuild, I don't thinktyping should either, and thebuild group can be additionally specified during the CI install stage.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@WeatherGodWeatherGodWeatherGod left review comments

@dstansbydstansbydstansby left review comments

@DWeslDWeslDWesl left review comments

At least 1 approving review is required to merge this pull request.

Assignees
No one assigned
Projects
None yet
Milestone
future releases
Development

Successfully merging this pull request may close these issues.

4 participants
@QuLogic@WeatherGod@dstansby@DWesl

[8]ページ先頭

©2009-2025 Movatter.jp