-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Build: don't pre-install pip and setuptools in images #10834
Conversation
We hit a problem with Python 3.12 and the outdated version of pip that we have pre-installed. Python ships with a vendored version of pip, and we install the latest version of pip and setuptools on each build before installing the requirements. The only breaking change here would be for projects using build.commands, setuptools won't be available anymore, pip is vendored by Python, so that shouldn't be a problem. I think we are fine not installing setuptools, build.commands is in beta, so we can get away with this :) Fixes #10832
I'm fine with this. I'm happy we are continuing moving away from having pre-installed dependencies 😄 |
I think we found some differences when doing this in the past, but I'm not 100% sure. However, we will eventually hit the same problem since we are pinning to a particular version and at some point, the newer Python won't support it 😄 |
Note that once we merge this PR, we will need to re-trigger the CircleCI job that compiles and re-upload all the supported versions to S3. |
It seems it's working. I'm seeing lines like
that only install virtualenv and not setuptools or pip. |
#10834 didn't solve #10832. Having an outdated version of pip is still the main problem, but the outdated version of pip didn't come from the python installation, but from the virtualenv creation. When creating the environment, virtualenv installs some specfic/outdated versions of pip/setuptools/wheels. https://github.com/pypa/virtualenv/blob/20.7.2/src/virtualenv/seed/wheels/embed/__init__.py
#10834 didn't solve #10832. Having an outdated version of pip is still the main problem, but the outdated version of pip didn't come from the python installation, but from the virtualenv creation. When creating the environment, virtualenv installs some specfic/outdated versions of pip/setuptools/wheels. https://github.com/pypa/virtualenv/blob/20.7.2/src/virtualenv/seed/wheels/embed/__init__.py
We hit a problem with Python 3.12 and the outdated version of pip that we have pre-installed.
Python ships with a vendored version of pip,
and we install the latest version of pip and setuptools on each build before installing the requirements.
The only breaking change here would be for projects using build.commands, setuptools won't be available anymore, pip is vendored by Python, so that shouldn't be a problem. I think we are fine not installing setuptools,
build.commands is in beta, so we can get away with this :)
Fixes #10832
We may even consider not installing virtualenv on python3.x and just use venv.