-
Notifications
You must be signed in to change notification settings - Fork 303
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 missing setuptools
dep
#4799
Conversation
@@ -53,7 +53,7 @@ python-telegram-bot==13.13 | |||
recurring-ical-events==2.1.0 | |||
redis==5.0.1 | |||
regex==2021.11.2 | |||
requests==2.32.0 | |||
requests==2.32.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, bump requests
because of this message I was seeing when running uv pip compile
:
warning: `requests==2.32.0` is yanked (reason: "Yanked due to conflicts with CVE-2024-35195 mitigation").
@@ -34,7 +34,7 @@ cachetools==4.2.2 | |||
# via | |||
# google-auth | |||
# python-telegram-bot | |||
celery[redis]==5.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand why it's dropping the [redis]
portion here 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, astral-sh/uv#1595 (I don't have a strong opinion to preserve the extra, though)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the reference 👍 (seems like including it/excluding it doesn't make a big difference)
@@ -157,7 +157,7 @@ firebase-admin==5.4.0 | |||
# via fcm-django | |||
flask==3.0.2 | |||
# via slack-export-viewer | |||
google-api-core[grpc]==2.17.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to this comment
setuptools==72.1.0 | ||
# via | ||
# apscheduler | ||
# opentelemetry-instrumentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there's not much we can do here? I assume this means that apscheduler
and opentelemetry-instrumentation
both have a dependency on setuptools
?
@@ -34,7 +34,7 @@ cachetools==4.2.2 | |||
# via | |||
# google-auth | |||
# python-telegram-bot | |||
celery[redis]==5.3.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, astral-sh/uv#1595 (I don't have a strong opinion to preserve the extra, though)
@@ -27,7 +27,7 @@ RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ | |||
&& rm grpcio-1.64.1-cp312-cp312-linux_aarch64.whl; \ | |||
fi | |||
|
|||
RUN pip install uv | |||
RUN pip install uv setuptools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if setuptools is being added through requirements, does it need to be here too? (same above)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess technically no, but I think setuptools
is only being included in requirements.txt
/requirements-dev.txt
because of two transitive dependencies. If those dependencies drop their requirement on setuptools
we'll need this anyways 🤔
Python 3.12's release notes mention:
python/cpython#95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.
What this PR does
tldr; I think we should install
setuptools
into our engineDockerfile
+ in our CI env because Python 3.12 no longer installsdistutils
by default. This should unblock us from being able to merge #4656 and #4555.More details
I would like to be able to merge #4656 and #4555. However, in both of these PRs
setuptools
is being removed fromrequirements-dev.txt
(here and here). This leads to things breaking (CI job #1 and #2) because of:(☝️ from the
pkg_resources
docs.. "The pkg_resources module distributed with setuptools provides an API for Python libraries")Python 3.12 made a change to no longer pre-install
distutils
(relevant release notes):Additionally,
setuptools
is inpip-tools
UNSAFE_PACKAGES
list (related GitHub issue), hence why I think Dependabot is removing it in #4656 and #4555.Checklist
pr:no public docs
PR label added if not required)release:
). These labels dictate how your PR willshow up in the autogenerated release notes.