-
Notifications
You must be signed in to change notification settings - Fork 161
v0.46.0 Breaking CI build pipelines #660
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
Comments
Duplicate, and already resolved by yanking the release. |
Hm, I am now wondering if this is truly a duplicate. |
I see that your build requirements don't specify a minimum version, so it could be using a old |
Is |
@agronholm Hi yes it is a inhouse build library
But we are still maintaining compatibility with python 2 for some of our work so we also have
|
@agronholm is it possible to get the whl file of the yanked version 0.46.0 ? I could test it by trying your suggestion of listing setuptools>=70.1 . I can no longer install it with pip command |
You can just depend on |
Due to this, that won't work either. |
@agronholm FYI, I did the following steps
To reproduce again,
So suggestion of setting |
I'm confused. Can you clarify which version of |
setuptools version 78.1.0 |
@agronholm Double checked. Upgraded just the setuptools in the venv. It took 78.1.0. Error was gone |
OK, but that also means it will not use |
Due to isolated builds, the |
@agronholm oh yes you right. The isolated build environment might have picked the lower version. Yes in that case it will still impact. |
@agronholm I re-verified. Turns out the mybuildtools library we have already uses
|
Oh, right. The problem with the latest setuptools was constrained to macOS, and you're running Windows. Sorry for not noticing before! |
@agronholm yes no problem |
@agronholm
this is with setuptools 65.5.0 |
This error message likely comes from |
can |
I thought of that, but I really don't want to do it. As you said, it would probably just replace one problem with a bunch of others. Plus it doesn't help with the macOS issue given how vendoring in setuptools works. |
Wheel package released 8th of April (0.46.1) broke installation of sdist-only packages (such as pyspark) in our main images. After investigation, it turned out that this is a combination of things: * The new wheel package does not inject `bdist_wheel` command to setuptools any more. This is because setuptools > 70.1 have the bdist_wheel command vendored in and they do not need wheel at all to build the wheels. * Python official bookworm-slim images that we use as base images - includingthe latest versions released today - have old and sometimes inconsistent version of wheel and setuptools: Python 3.9: wheel: 0.45.1, setuptools: 58.1.0 Python 3.10: wheel: 0.46.1, setuptools: 65.5.1 Python 3.11: wheel: 0.46.1, setuptools: 65.5.1 Python 3.12: no wheel, no setuptools This means that there are the following scenarios that trigger the error that `bdist_wheel` command is missing: * Python 3.9 -> upgrading wheel (Which we did accidentally by other package) and not upgrading setuptools -> error * Python 3.10, 3.11 -> just `pip install pyspark` -> error * Python 3.12 -> all good, latest setuptools would be installed, no wheel needed As a remediation, we are upgrading setuptools to latest released version in our images. We also fix them - similarly to `pip` and `uv` in order to protect against any cases where just upgrading to new setuptools might break thigns (As it happened recently where setuptools upgrade suddenly broke a lot of sdist packages) Our automated pre-commits upgrading installers have been modified to also upgrade setuptools. See pypa/wheel#660 (comment) for details
Also just worth noting - the Python images have been updated 2 hours ago -> so they already contain latest wheel (3.10 and 3.11) but they still contain the old setuptools - and this is something that will likely cause some quite big waves if this is not fixed in those images. I opened an issue in docker-library/python#1023 but I am not sure who and how manages the official images, but hopefully PyPA team might reach out directly to those who release the images. |
…48989) Wheel package released 8th of April (0.46.1) broke installation of sdist-only packages (such as pyspark) in our main images. After investigation, it turned out that this is a combination of things: * The new wheel package does not inject `bdist_wheel` command to setuptools any more. This is because setuptools > 70.1 have the bdist_wheel command vendored in and they do not need wheel at all to build the wheels. * Python official bookworm-slim images that we use as base images - includingthe latest versions released today - have old and sometimes inconsistent version of wheel and setuptools: Python 3.9: wheel: 0.45.1, setuptools: 58.1.0 Python 3.10: wheel: 0.46.1, setuptools: 65.5.1 Python 3.11: wheel: 0.46.1, setuptools: 65.5.1 Python 3.12: no wheel, no setuptools This means that there are the following scenarios that trigger the error that `bdist_wheel` command is missing: * Python 3.9 -> upgrading wheel (Which we did accidentally by other package) and not upgrading setuptools -> error * Python 3.10, 3.11 -> just `pip install pyspark` -> error * Python 3.12 -> all good, latest setuptools would be installed, no wheel needed As a remediation, we are upgrading setuptools to latest released version in our images. We also fix them - similarly to `pip` and `uv` in order to protect against any cases where just upgrading to new setuptools might break thigns (As it happened recently where setuptools upgrade suddenly broke a lot of sdist packages) Our automated pre-commits upgrading installers have been modified to also upgrade setuptools. See pypa/wheel#660 (comment) for details
Temporarily locking wheel to version Update: only lock wheel version can fix my CI |
I can also confirm (see my PR) that simply adding a separate step where you upgrade to latest setuptools also works well (and will not require reversing later -no matter what wheel maintainers or Official Python image maintainers will do. |
I agree with you. in docker image python:3.11-slim: source code
The
|
I am using same python image. Could you please lmk what fixed the issue for you ? |
There is an issue with the 0.46.0 `wheel` version as reported in pypa/wheel#660. We are currently seeing this on the Python packaging pipelines, for example in [this run](https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=740997&view=logs&j=4864752d-f1c3-57c0-06eb-25cee39385a7&s=3fc0883b-27ef-5aa3-1052-0a269c26624c&t=fa95d49e-17f6-501e-c36c-b2949c11fc4a&l=13).
Just posting summary of resolutions which worked for us for reference
Hope that helps. Thanks |
- `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: termux#24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
- `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: termux#24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
It should be noted that while Docker uses the term "Official" it's a community run image independent of any core Python organization (PSF, PyPA, etc.): https://github.com/docker-library/python?tab=readme-ov-file#httpsgithubcomdocker-librarypython |
sample Dockerfile FROM python:3.11-slim
COPY ./requirements.txt /
# add this line
RUN pip3 install wheel==0.45.1
RUN pip3 install -r requirements.txt I don't like it, but it works. and... source issue is in these codes: https://github.com/docker-library/python/blob/f3c69c5acce909a76e287ef1adf8f10c476eb2f0/3.11/bookworm/Dockerfile#L94-L99 |
I'm closing this in favor of docker-library/official-images#662 where the majority of the debugging conversation is happening. |
There is an issue with the 0.46.0 `wheel` version as reported in pypa/wheel#660. We are currently seeing this on the Python packaging pipelines, for example in [this run](https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=740997&view=logs&j=4864752d-f1c3-57c0-06eb-25cee39385a7&s=3fc0883b-27ef-5aa3-1052-0a269c26624c&t=fa95d49e-17f6-501e-c36c-b2949c11fc4a&l=13).
There is an issue with the 0.46.0 `wheel` version as reported in pypa/wheel#660. We are currently seeing this on the Python packaging pipelines, for example in [this run](https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=740997&view=logs&j=4864752d-f1c3-57c0-06eb-25cee39385a7&s=3fc0883b-27ef-5aa3-1052-0a269c26624c&t=fa95d49e-17f6-501e-c36c-b2949c11fc4a&l=13).
xref: pypa/wheel#660 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Enhanced the testing setup to ensure key dependencies are kept up-to-date during the test process. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Jinzhe Zeng <[email protected]>
- `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: termux#24062 (comment) - Lock `wheel` version at 0.46.1 so that if a future `wheel` update causes a similar problem in the future, it doesn't immediately propagate into termux-packages without us explicitly bumping it. Recommended by Tomjo2000 here: termux#24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken temporarily for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
… wheel 0.46.1 - `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: termux#24062 (comment) - Lock `wheel` version at 0.46.1 so that if a future `wheel` update causes a similar problem in the future, it doesn't immediately propagate into termux-packages without us explicitly bumping it. Recommended by Tomjo2000 here: termux#24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken temporarily for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
… wheel 0.46.1 (#24213) - `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: #24062 (comment) - Lock `wheel` version at 0.46.1 so that if a future `wheel` update causes a similar problem in the future, it doesn't immediately propagate into termux-packages without us explicitly bumping it. Recommended by Tomjo2000 here: #24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken temporarily for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
… wheel 0.46.1 (#24213) - `wheel` version 0.46+ now requires `setuptools` version 70 or newer - discussed upstream here: pypa/wheel#660 - discovered in termux-packages here: termux#24062 (comment) - Lock `wheel` version at 0.46.1 so that if a future `wheel` update causes a similar problem in the future, it doesn't immediately propagate into termux-packages without us explicitly bumping it. Recommended by Tomjo2000 here: termux#24062 (comment) - I have confirmed that this change works to fix the build of `python-lxml` **both** - **in `TERMUX_ON_DEVICE_BUILD=false` mode (broken temporarily for 1 week)**, - fixes `error: invalid command 'bdist_wheel'` - **and also in `TERMUX_ON_DEVICE_BUILD=true` mode (broken for 6 months)**. - fixes `ModuleNotFoundError: No module named 'setuptools'` - It seems appropriate to remove the `if [ "${TERMUX_PYTHON_VERSION#*.}" -lt "12" ]` block because there is no longer any `python3.11` so it does not seem like that code is reachable anymore. - `python-torchvision` needed ajustment of its custom `CFLAGS` to be `CXXFLAGS` instead, because the newer `setuptools` is now compiling it using `aarch64-linux-android-clang++` instead of `aarch64-linux-android-clang`. - `python-pip` and `python-pillow` both had locked `setuptools` in their `TERMUX_PKG_PYTHON_COMMON_DEPS` at versions slightly newer than the old global version, now that the global version is newer than either of those, they do not seem to need that anymore.
Summary
The latest release v0.46.0 is breaking the pipelines which were previously working. The following error is raised.
Although wheel is not the direct dependency, I have following configuration, where
wheel
is dependency ofmybuildtools
package.What has changed in the new release that is causing the issue and why it needs to be explicit dependency and not sub dependency? I think the previous version was doing it correctly.
Note: If I downgrade to v0.45.0, the pipelines are succeeding correctly
Platform
Windows 11
Version
v0.46.0
Python version
3.10
The text was updated successfully, but these errors were encountered: