-
-
Notifications
You must be signed in to change notification settings - Fork 311
Update Hatchling build backend #2403
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
Closed
Closed
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
If this is now required I'm not a fan. The intent is to record the real requires-python here in the static metadata and only override in some CI tests when testing out Python 3.X alpha releases. Moving the real metadata to the metadata_hook obscures a bit too much for my liking.
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 issue is that the spec says that tools must adhere to what is defined statically (e.g. they cannot be changed) and Hatchling had a bug that it was not enforcing that.
If you would prefer I can add an option to enable that unsafe behavior but it would be bad for the ecosystem. What do you think?
FYI here is a comment that explains a little bit https://discuss.python.org/t/respecting-core-metadata-2-2-when-building-from-source-distributions/48886/60
It's not exactly related but the bug was revealed during that discussion/thread.
Uh oh!
There was an error while loading. Please reload this page.
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.
Well, I think PyPA itself is bad for the ecosystem! I'm neck deep in packaging maintaining Pex and I lost patience long ago. I'd rather you not distort your tool for this case and thus continue the trail of tears. Let me step back and consider how to handle this given the thread you pointed to. I won't be back to a keyboard for a few days, but I'll circle back here then and let you know how I'd like to proceed.
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.
Ok, I think I grok the thread you pointed me to. IIUC the criux lies in PEP-621 under https://peps.python.org/pep-0621/#dynamic:
If that were, instead:
All would be well.
@ofek I'll send up a PR and add you as a reviewer that sortof acheives the end I want here using non-canonical fields in pyproject.toml to carry the static metadata / template metadata. That PR may contain comments about the PyPA that you want no association with; so feel free to not comment if you're uncomfortable!
Thanks for hunting down users affected by your rocky release period though, I really appreciate it.