-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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(dev): psycopg2-binary 2.9.1 does not work with Django 2.2 #29012
fix(dev): psycopg2-binary 2.9.1 does not work with Django 2.2 #29012
Conversation
f609a1e
to
6dea7ea
Compare
For some odd reason, the URL sometimes doesn't work and requires authentication. I will wait until I can get IT to make the bucket public. |
81f6a76
to
d6b4c44
Compare
scripts/lib.sh
Outdated
# This installs pyscopg-binary2 since there's no arm64 wheel | ||
# This saves having to install postgresql on the Developer's machine + using flags | ||
# https://github.com/psycopg/psycopg2/issues/1286 | ||
pip install "https://storage.googleapis.com/python-arm64-wheels/psycopg2_binary-2.8.6-cp38-cp38-macosx_11_0_arm64.whl" |
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.
Where/how is this being built and uploaded?
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.
magic JK :)
I had commented in the description of the PR:
brew install postgresql
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib -L/opt/homebrew/opt/python@3.8/lib"
pip install psycopg2-binary==2.8.6
I then grab the wheel from the cache.
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.
More like, how are you uploading this? It's not clear what gcloud command maps to https://storage.googleapis.com/python-arm64-wheels.
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.
Oh I see.
I use the web UI to upload it to the bucket. I won't be automating since we're not going to upload many packages or often.
For the incompatibility issue with Django visit [this issue][incompatible], In this PR, we're going to downgrade to the compatible 2.8.6 version (thus, matching the Python 3.6 version), removing the need to install `postgresql` (this means partially reverting #28607) and instead installing a wheel I built on my machine that I have stored in GC storage. Fixes #28958 [incompatible]: psycopg/psycopg2#1293
d6b4c44
to
37e4c49
Compare
# psycopg2-binary does not have an arm64 wheel, thus, we need to build it locally | ||
# by installing postgresql | ||
# See details: https://github.com/psycopg/psycopg2/issues/1286 | ||
brew install postgresql |
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'm going to keep the prerequisites
target for a little longer but remove installing postgresql
@@ -95,7 +95,7 @@ ${red}${bold} | |||
ERROR: You're running a virtualenv with Python ${python_version}. | |||
On Apple M1 machines, we only support >= 3.8.10 < 3.9. | |||
Either run "rm -rf ${venv_name} && direnv allow" to | |||
OR set SENTRY_PYTHON_VERSION=${python_version} to an `.env` file to bypass this check." | |||
OR set SENTRY_PYTHON_VERSION=${python_version} to an .env file to bypass this check." |
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.
My auto-formatting kept trying to fix .env
to $(.env)
. There's no point of keeping the back-ticks since this is not Markdown text.
Oh. @armenzg you had the target branch set to something else. Guess I gotta merge that too then. |
For the incompatibility issue with Django visit this issue,
In this PR, we're going to downgrade to the compatible 2.8.6 version (thus, matching
the Python 3.6 version), removing the need to install
postgresql
(this means partiallyreverting #28607) and instead installing a wheel I built on my machine that I have stored
in GC storage.
I built the wheel like this (see root issue for details):
Fixes #28958