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

advice for maintainers on dropping universal=1 wheels #726

Closed
graingert opened this issue May 7, 2020 · 3 comments · Fixed by #858
Closed

advice for maintainers on dropping universal=1 wheels #726

graingert opened this issue May 7, 2020 · 3 comments · Fixed by #858
Labels
good first issue help wanted type: enhancement A self-contained enhancement or new feature

Comments

@graingert
Copy link
Contributor

graingert commented May 7, 2020

There should be some advice on what to do about universal wheels when dropping support for python versions in this guide: https://packaging.python.org/guides/dropping-older-python-versions/

eg, should this:

# setup.cfg
[bdist_wheel]
universal=1

be removed?

@graingert graingert changed the title advice for maintainers on dropping universal=1 advice for maintainers on dropping universal=1 wheels May 7, 2020
@webknjaz webknjaz added type: enhancement A self-contained enhancement or new feature good first issue help wanted labels Mar 8, 2021
@webknjaz
Copy link
Member

webknjaz commented Mar 8, 2021

Yes! It's a great idea! I keep having universal=1 in some places because it never occured to me that it should be changed. Earlier today @gaborbernat pointed out to me that this is wrong and causes the wheels to be py2.py3. I somehow didn't realize this.

So I was about to file an issue about it when I found this one :)

The docs change should point out that the maintainers should be mindful of what their wheel tags are compared to what's written in the Requires-Python fields in metadata.

It also seems like a good idea to improve the linting side of the problem in the ecosystem: pypa/twine#739.

P.S. I tested that projects having such metadata mismatches are harmless (if they don't have a hard conflict in that metadata) and pip seems to do the right thing but it's still a good idea to keep it in sync.

@hugovk
Copy link
Contributor

hugovk commented Mar 8, 2021

Yep, comparing wheel filenames created with and without the flag:

pyflakes-2.2.0-py2.py3-none-any.whl
pyflakes-2.2.0-py3-none-any.whl

Their contents are identical, except for pyflakes-2.2.0.dist-info/WHEEL (and RECORD's hash of this file):

Wheel-Version: 1.0
Generator: bdist_wheel (0.36.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any
Wheel-Version: 1.0
Generator: bdist_wheel (0.36.0)
Root-Is-Purelib: true
Tag: py3-none-any

webknjaz added a commit to sphinx-contrib/sphinxcontrib-towncrier that referenced this issue Mar 8, 2021
Before this change, `[bdist_wheel]` section of `setup.cfg` had
`universal = 1` set and causing our automation to publish wheels
tagged with `py2.py3` which implies that this wheel contains Python 2
compatible code.
It is now corrected to produce just `py3` tag instead.

Thanks to Bernát Gábor for pointing out that it's misconfigured!

Ref: pypa/packaging.python.org#726

Co-Authored-By: Bernát Gábor <[email protected]>
webknjaz added a commit to webknjaz/packaging.python.org that referenced this issue Mar 9, 2021
@webknjaz
Copy link
Member

webknjaz commented Mar 9, 2021

Here you go #858.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue help wanted type: enhancement A self-contained enhancement or new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants