-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Offer direct guidance for replacing bdist_wheel.universal
#4939
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
base: main
Are you sure you want to change the base?
Conversation
This patch marks the wheels as compabible with Python 2 and Python 3 though a tag in the filename that dependency resolvers like the one in pip would use to initially disregard candidates before looking into their core packaging metadata. Ref: pypa/setuptools#4939.
Hi @webknjaz thank you very much for the PR. The original issue motivating #4617 and reported in #4613 was that users expected It appears that |
@abravalheri there's a number of projects that might need backwards compatibility, many versions back. So people end up having to set this option and building across a big matrix of Pythons. This means that they'll have to use a very old version of |
That is fair. Should we add a note saying that compatibility with |
Hello @webknjaz @abravalheri In our project we have following set in setup.cfg
If I understand correctly, the change would be to just set following is that right?
I did a quick test and it seems to work. But if I have set python_tag under the options in setup.cfg. The wheel generated are either py3-none-any.whl (tested) or py2-none-any.whl (didn't check this but am assuming based on py3 whl compilation) depending on the python environment the build was created on which is not maintaining the same behavious as the universal whl creation flag. Update: on how I set under the options as I wasn't if this is the correct usage
Your inputs will be valuable. Thanks |
This is a follow-up to pypa#4617 which deprecated the `universal` flag of `bdist_wheel`. It originally offered people to complain in issues. I, however, think that it's useful to mention the non-deprecated alternative that will keep working past deprecation date. This is what this patch implements.
Probably. I wasn't planning on submitting additional content for this within the scope of the PR, though. It's just a thing I've faced and wanted to document publicly.
Yes, this is correct. It's a direct equivalent of universal. This section is processed by the
This is not a genetic setting applicable to |
Actually, this reminds me of a number of discussions I've had 4 years ago, starting with pypa/packaging.python.org#726 (comment). If anything, it's Twine that would need to validate such things. Because it's about metadata and not backend-specific configs. In fact, it looks like all my issues that still remain open in Twine revolve around this topic: https://github.com/pypa/twine/issues?q=sort%3Aupdated-desc%20is%3Aissue%20is%3Aopen%20author%3Awebknjaz. |
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.
Pull Request Overview
This PR updates the deprecation messaging for the "universal" flag in bdist_wheel to provide direct guidance on replacing it with the recommended configuration alternative.
- Updated the help text for the "universal" option in the command options list.
- Revised the deprecation message in finalize_options to instruct users to set "python_tag = py2.py3" in setup.cfg.
Comments suppressed due to low confidence (2)
setuptools/command/bdist_wheel.py:177
- Consider adding a link or reference to the relevant documentation that explains the
python_tag = py2.py3
configuration in detail.
"*DEPRECATED* make a universal wheel [default: false]\n\nSet `python_tag = py2.py3` in `setup.cfg` instead."
setuptools/command/bdist_wheel.py:276
- For consistency, consider unifying the wording between the help text and this deprecation message, ideally including the same phrasing or reference.
"The use of this setting can be replaced with `python_tag = py2.py3`\n entry in `setup.cfg`."
This is a follow-up to #4617 which deprecated the
universal
flag ofbdist_wheel
. It originally offered people to complain in issues. I, however, think that it's useful to mention the non-deprecated alternative that will keep working past deprecation date. This is what this patch implements.Summary of changes
Ref #4617
Pull Request Checklist
newsfragments/
.(See documentation for details)