-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Test metadata as produced by #3903 + #3904 #4029
Merged
Merged
Conversation
This file contains 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 change extracts the logic for writing 'requires.txt' from the ``egg_info`` module into ``_requirestxt``. It also adds the missing pre-processing for ``install_requires`` and ``extras_require`` previously done in ``dist`` but now implemented in ``_requires.txt``.
For the time being, when `setuptools.build_meta` is called, `egg_info.egg_base` is accidentally set to the project root between the several calls to the different build hooks. This means that if the hooks are called, they will try to overwrite `setuptools.egg-info/PKG-INFO`, and for a very short interval of time it will be an empty file. Another process may then try to simultaneously use `importlib.metadata` to list entry-points. However to sort entry-points, `importlib.metadata` will try to read the `Name` field in the `PKG-INFO/METADATA` files and will raise an error/warning if that file is empty. This commit tries to use `os.replace` to avoid having an empty PKG-INFO while `importlib.metadata` is used.
Here we use a specific SHA that we now is "green" to avoid problems with a moving HEAD.
abravalheri
changed the title
Test metadata on #3903, #3904
Test metadata as produced by #3903 + #3904
Aug 29, 2023
(An independent validation library makes the confidence in the code stronger).
abravalheri
force-pushed
the
test-metadata
branch
from
August 29, 2023 17:12
a353820
to
0f64181
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of changes
packaging.metadata
to validate the core metadata as generated by Avoid modification ofinstall_requires
andextra_requires
that deviates from core metadata #3903, Improve core metadata compliance forPKG-INFO
#3904.install_requires
andextra_requires
that deviates from core metadata #3903, Improve core metadata compliance forPKG-INFO
#3904.Closes
Pull Request Checklist
newsfragments/
.(See documentation for details)