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

Fix "Wheel naming is not following PEP 491 convention" #4766

Merged
merged 14 commits into from
Feb 2, 2025
Merged

Conversation

di
Copy link
Member

@di di commented Dec 10, 2024

Summary of changes

Fixes #3777.

Marking this as draft as there is one outstanding failing test that I have been unable to resolve (setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg).

Pull Request Checklist

@abravalheri
Copy link
Contributor

Thank you!

The failing test seems to be happening now regardless of this change: https://github.com/pypa/setuptools/actions/runs/12298183072/job/34321035714#step:3:49.

I don't know if anything changed in the latest versions of Python being distributed to macOS, so that __file__ is no longer available on the scope.

@di
Copy link
Member Author

di commented Dec 12, 2024

Aha, that's a different failure actually, setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg is the test that is legitimately failing and would need to be updated here.

@abravalheri
Copy link
Contributor

setuptools/tests/test_easy_install.py::TestSetupRequires::test_setup_requires_override_nspkg is the test that is legitimately failing and would need to be updated here.

This looks like it is checking deprecated functionality? Not sure we have to account such an edge case since we are moving away from easy_install. Maybe we can do a major bump to show that the change may be considered a breaking change.

@di
Copy link
Member Author

di commented Dec 12, 2024

I'm not sure! I think the test is just broken in a way I haven't been able to figure out (it mixes the distribution name and the namespace name as one thing in the helper functions) but I think the underlying functionality probably still works?

@di
Copy link
Member Author

di commented Jan 9, 2025

All tests are passing, this is now ready for review.

@di di marked this pull request as ready for review January 9, 2025 22:55
Copy link
Member

@jaraco jaraco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't make me happy to approve this change, but I've conceded the fight. Let's align with the spec.

@di di requested a review from jaraco January 27, 2025 16:38
@di
Copy link
Member Author

di commented Jan 29, 2025

This is ready for re-review.

@jaraco jaraco merged commit 75f7782 into pypa:main Feb 2, 2025
23 checks passed
@di di deleted the fix/3777 branch February 2, 2025 23:18
@di
Copy link
Member Author

di commented Feb 24, 2025

@abravalheri @jaraco Would it be possible to get a release out with this change? This is blocking pypi/warehouse#17378 and pypi/warehouse#17377. Happy to prep/propose the release if that would help!

@abravalheri
Copy link
Contributor

Ok, let's get this out before we merge more stuff so that is easier to track breaking changes if any (or gauge any push back from the community).

@abravalheri
Copy link
Contributor

@di, sorry for the delay and thank you for working on this. CI is running for the release https://github.com/pypa/setuptools/tree/refs/tags/v75.8.1.

If we want to be in the safe side, it might make sense to wait some days before to check if we have any pushbacks or bugs reported by the community.

@abravalheri
Copy link
Contributor

But, we had some unexplained CI errors: https://github.com/pypa/setuptools/actions/runs/13523090359/job/37786779855.

I will try to re-run the failed jobs shortly.

@di
Copy link
Member Author

di commented Feb 25, 2025

Thanks! Noted. Feel free to @ me on any related issues if they arise.

albi3ro pushed a commit to PennyLaneAI/pennylane that referenced this pull request Feb 25, 2025
**Context:**
setuptools has had a release recently that normalizes package names:

References:
- pypa/setuptools#4766
-
https://packaging.python.org/en/latest/specifications/name-normalization/#name-normalization


**Description of the Change:**
Due setuptools 75.8.0 and 75.8.1 outputting completely different package
names, we cannot support both, so CI now "pins" to >=75.8.1.

**Benefits:**
Fix CI failures.

**Possible Drawbacks:**
We may need to update docs.

This is also another situation where moving away from setup.py to
pyproject would yield benefits. As then you can specify the minimum
setuptools version as part of the build-backend configuration.

**Related GitHub Issues:**
None.
[sc-85195](https://app.shortcut.com/xanaduai/story/85195/investigate-issue-with-pennylane-ci-failing-with-uv-build-outputting-package-that-doesn-t-match-name-in-setup-py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Wheel naming is not following PEP 491 convention
3 participants