Skip to content
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

Fix "residual" invalid dynamic behaviour of optional-dependencies #4696

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Oct 21, 2024

Summary of changes

This is reminiscent of #3306.
It is another situation where PEP 621 does not allow mixing dynamic and static configurations.

Without explicitly listing optional-dependencies in dynamic users cannot rely on setup.py to specify extras_require -- in turn, when optional-dependencies is present in dynamic, then it cannot be listed as an static configuration.

Therefore, the only valid situation according to PEP 621, is that static optional-dependencies are honoured exactly as provided, without modifications (this means ignoring any extras_require previously set)..

Closes #3300

Pull Request Checklist

@abravalheri abravalheri changed the title Fix possible invalid dynamic behaviour of optional-dependencies Fix invalid dynamic behaviour of optional-dependencies Oct 21, 2024
@abravalheri abravalheri changed the title Fix invalid dynamic behaviour of optional-dependencies Fix "residual" invalid dynamic behaviour of optional-dependencies Oct 21, 2024
@abravalheri abravalheri marked this pull request as draft October 21, 2024 15:32
@abravalheri
Copy link
Contributor Author

abravalheri commented Oct 21, 2024

Maybe this cannot be done directly this way...
I need to consider #3204.

@abravalheri
Copy link
Contributor Author

abravalheri commented Oct 21, 2024

Maybe this cannot be done directly this way... I need to consider #3204.

OK, so this should no longer be a problem since #3903.
This is because converting requirements with env markers to extras no longer is done in _finalize_requires but rather when writing core metadata and it also does not modify the original value of the distribution attribute.

@abravalheri abravalheri marked this pull request as ready for review October 21, 2024 16:00
@abravalheri abravalheri merged commit 884b845 into pypa:main Oct 21, 2024
25 checks passed
@abravalheri abravalheri deleted the fix-optional-dependencies branch October 21, 2024 16:02
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.

[BUG] PEP 631 TOMLs can conflict with deprecated configuration files
1 participant