Skip to content

PEP 771: Renamed default-optional-dependency-keys to default-extras #4459

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

astrofrog
Copy link
Contributor

@astrofrog astrofrog commented Jun 10, 2025

I originally used default-optional-dependency-keys because it seemed to me like pyproject.toml avoided the terminology of extras, but @ncoghlan pointed out in https://discuss.python.org/t/pep-771-default-extras-for-python-software-packages-round-2/94905/2 that the specification for optional dependencies in pyproject.toml uses the term extra to refer to the optional dependency keys, which means we can use default-extras instead of default-optional-dependency-keys (which is a name that a lot of people have complained about). Since this change is a no-brainer and there have not been any objections since it was suggested, I am making the change straight away to avoid it being brought up again by others.

FYI @DEKHTIARJonathan and @pradyunsg

@astrofrog astrofrog requested a review from pradyunsg as a code owner June 10, 2025 23:14
@DEKHTIARJonathan
Copy link

DEKHTIARJonathan commented Jun 10, 2025

@astrofrog shall we take the opportunity to emphasize the comment from Paul about pip freeze

https://discuss.python.org/t/pep-771-default-extras-for-python-software-packages-round-2/94905/5

I think this is something that should be left for pip to decide. In fact, we can’t include it in the standard as requirements files and the pip freeze format aren’t standardised. My personal view is that I don’t want the output of pip freeze littered with [] just in case projects define default extras. The output of pip freeze isn’t just a “dumb lockfile” format, it’s also used for human consumption, and for various scripting use cases. As such, I’d rather it stayed human-readable.

Also I would keep this PR open for a week or so - might become the last revision before submission for decision.
CC: @warsaw

@astrofrog
Copy link
Contributor Author

@DEKHTIARJonathan I thought it would be easier to fix this one specific issue in a standalone PR since it is pretty clear cut and just have that be merged soon just to make it easier for anyone reviewing the PEP. But if you'd rather we wait for any other updates we can do that too!

@pradyunsg
Copy link
Member

pradyunsg commented Jun 10, 2025

Since this change is a no-brainer and there have not been any objections since it was suggested, I am making the change straight away to avoid it being brought up again by others.

Whoops, I brought it up again. FWIW, a day isn't really a lot of time for people to respond on d.p.o. 😅

To be fair, this is a somewhat bikeshed heavy aspect of the PEP anyway so it's reasonable to make a choice either way in the text to have the discussion focus on more... semantically significant aspects of the PEP.

Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

Change is OK to merge with my sponsor hat on.

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

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

Well, at least this bikeshed is shorter, so 🥳

@zanieb
Copy link

zanieb commented Jun 11, 2025

Whoops, I brought it up again. FWIW, a day isn't really a lot of time for people to respond on d.p.o.

Yeah, I definitely agree with this. I don't think this change is a no-brainer. I think it's fine to merge — but I'll voice my concerns in the DPO thread.

@astrofrog
Copy link
Contributor Author

Yes I think I jumped the gun on this - I will convert this to a draft and can update it later once there is consensus on this (and any other changes needed)

@astrofrog astrofrog marked this pull request as draft June 11, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants