Skip to content

Update bundled setupotools in test.wheeldata and remove wheel.whl #132415

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

Closed
stefanor opened this issue Apr 11, 2025 · 9 comments
Closed

Update bundled setupotools in test.wheeldata and remove wheel.whl #132415

stefanor opened this issue Apr 11, 2025 · 9 comments
Labels
dependencies Pull requests that update a dependency file infra CI, GitHub Actions, buildbots, Dependabot, etc. type-bug An unexpected behavior, bug, or error

Comments

@stefanor
Copy link
Contributor

stefanor commented Apr 11, 2025

Bug report

Bug description:

test.wheeldata includes bundled setuptools and wheel wheels to build packages. Since setuptools>=0.70.1, the bdist_wheel method is natively included in setuptools, and there's no necessity to have the wheel library available, to build wheels any more.

Relatedly, wheel>=0.46.0 de-vendored the packaging library, so current versions of wheel can't be used without having packaging available too.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

@stefanor stefanor added the type-bug An unexpected behavior, bug, or error label Apr 11, 2025
@picnixz picnixz added dependencies Pull requests that update a dependency file infra CI, GitHub Actions, buildbots, Dependabot, etc. labels Apr 11, 2025
@AA-Turner
Copy link
Member

Do tests fail with different versions of wheel installed? I'm trying to work out if this is just a cosmetic change.

@stefanor
Copy link
Contributor Author

With the new setuptools, wheel isn't used any more, so bumping it or not makes no difference.

@AA-Turner
Copy link
Member

Adding/updating binary artefacts increases the repository size, with little observable/user benefit in this case (a test file). It might be easier just to do the update though, we will probably see more 'update' PRs (such as @hroncok's #132867, which I imagine was inadvertant -- it took me a couple of minutes to find this issue again).

A

@AA-Turner AA-Turner changed the title Setuptools now includes bdist_wheel Update bundled setupotools in test.wheeldata and remove wheel.whl Apr 24, 2025
@hroncok
Copy link
Contributor

hroncok commented Apr 24, 2025

Sorry for the duplicate issue and PR. I did not find this one.

Here is my rationale from #132866

In Fedora, we use our own setuptools and wheel wheels from WHEEL_PKG_DIR to test Python.

wheel 0.45+ now depends on packaging pypa/wheel#655

Since we would like to update our wheel and we already updated setuptools to a version that does not require wheel to create wheels, I was wondering whether we could update setuptools in https://github.com/python/cpython/tree/main/Lib/test/wheeldata to 70.1+ and drop the wheel.whl. That would make it easier for us to update.

@AA-Turner
Copy link
Member

Ok. I've opened a new PR, as wheeldata isn't covered by the ensurepip tooling, and also to use a newer release. See #132887.

A

@hroncok
Copy link
Contributor

hroncok commented Apr 25, 2025

Thanks

hroncok pushed a commit to hroncok/cpython that referenced this issue Apr 25, 2025
…ldata``

(cherry picked from commit c9f3f5b)
(actual changes in .whl files removed to make this patch smaller)
hugovk added a commit to hugovk/cpython that referenced this issue Apr 25, 2025
@vstinner
Copy link
Member

test_cppext started to fail with this change:

ERROR: test_build_limited (test.test_cppext.TestCPPExt.test_build_limited)
ERROR: test_build_limited_cpp03 (test.test_cppext.TestCPPExt.test_build_limited_cpp03)

  NameError: name 'sys' is not defined. Did you forget to import 'sys'?

I merged #132902 to fix the regression. In fact, the bug was already there before, but the setuptools update caused the regression. It's unclear to me how the code worked before that.

Note: @AA-Turner wrote the same fix than me 4 minutes later, but I merged my fix instead.

hroncok pushed a commit to hroncok/cpython that referenced this issue Apr 25, 2025
…ldata``

(cherry picked from commit c9f3f5b)
(actual changes in .whl files removed to make this patch smaller)

pythongh-127906: Add missing sys import to test_cppext

(cherry picked from commit 9cba148)

Co-Authored-By: Victor Stinner <vstinner@python.org>
vstinner added a commit to vstinner/cpython that referenced this issue Apr 25, 2025
Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
vstinner added a commit that referenced this issue Apr 25, 2025
Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 25, 2025
…ythonGH-132906)

Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
(cherry picked from commit de6482e)

Co-authored-by: Victor Stinner <vstinner@python.org>
vstinner added a commit that referenced this issue Apr 25, 2025
…GH-132906) (#132916)

gh-132415: Use shutil.which() in missing_compiler_executable() (GH-132906)

Replace deprecated distutils.spawn.find_executable() with
shutil.which() in missing_compiler_executable() of test.support.
(cherry picked from commit de6482e)

Co-authored-by: Victor Stinner <vstinner@python.org>
@vstinner
Copy link
Member

More side effects of the change:

@stefanor
Copy link
Contributor Author

Thanks all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file infra CI, GitHub Actions, buildbots, Dependabot, etc. type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants