-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Improve core metadata compliance for PKG-INFO
#3904
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
Conversation
5684826 to
07914b3
Compare
|
After some investigation and debugging it seems that the There might be a test that is not isolated modifying the This seems to be a flaky behaviour, and I am having trouble to replicate it locally, but I can see it in can some tests in the CI. |
f7518f2 to
e5b689a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
I noticed that when I improve the isolation of Footnotes
|
This comment was marked as outdated.
This comment was marked as outdated.
3449da1 to
5ea0250
Compare
|
If we try to further enhance However some attributes in |
5ea0250 to
0c94f3d
Compare
|
It seems that an easier approach is not try to change where |
d45557c to
64f35f0
Compare
0c94f3d to
ae8ec5c
Compare
|
@jaraco, would you be OK if I move this PR (#3904) and #3903 ahead?1 The main idea of the 2 PR's is to improve Footnotes
|
|
No problem. Please proceed. I trust your instincts. |
ae8ec5c to
bdb88c0
Compare
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.
bdb88c0 to
f4dd7e2
Compare
Summary of changes
Requires-DisttoPKG-INFOfiles and make them compatible with.dist-info/METADATAPKG-INFOlogic fromsetuptools.disttosetuptools._core_metadata..egg-info/PKG-INFO.importlib.metadatareadingPKG-INFOandsetuptools.build_metawriting toPKG-INFO, which causesimportlib.metadatato emit a deprecation warnings (which will be converted in the future into an error).In the future the
_core_metadatamodule can be used directly to generated.dist-info/METADATA.This is part of a series of PRs:
install_requiresandextra_requiresthat deviates from core metadata #3903PKG-INFO#3904pypa/wheelAPI indist_info#3905pypa/wheelAPI ineditable_wheel#3907bdist_wheelfrompypa/wheel#3908The motivation for this series of PRs is the following:
.egg-infoand.dist-infodirectories is intertwined and implicit(See Adopt bdist_wheel from wheel project #1386).
pypa/wheelAPI which is not stable yet and is very likely to change in the future.pypa/wheelmaintainers previously described that the long term vision is to transferbdist_wheeldirectly to
setuptools(See pypa/wheel#262, pypa/wheel#472, pypa/wheel#472).Pull Request Checklist
changelog.d/.(See documentation for details)