Skip to content
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

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ Pillow==8.2.0; python_version == '3.6'
Pillow==8.3.1; python_version > '3.6'
progressbar2==3.32.0
python-rapidjson==1.4
psycopg2-binary==2.8.6; python_version == '3.6'
# For development only: This version removes needing to setting flags for Apple's M1 chipset
psycopg2-binary==2.9.1; python_version > '3.6'
psycopg2-binary==2.8.6
PyJWT==2.1.0
python-dateutil==2.8.1
python-memcached==1.59
Expand Down
14 changes: 7 additions & 7 deletions scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Copy link
Member Author

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.

EOF
return 1
fi
Expand Down Expand Up @@ -129,6 +129,12 @@ install-py-dev() {
# This helps when getsentry calls into this script
cd "${HERE}/.." || exit
echo "--> Installing Sentry (for development)"
if query-apple-m1; then
# 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
fi
# SENTRY_LIGHT_BUILD=1 disables webpacking during setup.py.
# Webpacked assets are only necessary for devserver (which does it lazily anyways)
# and acceptance tests, which webpack automatically if run.
Expand Down Expand Up @@ -258,12 +264,6 @@ reset-db() {

prerequisites() {
brew update -q && brew bundle -q
if query-apple-m1; then
# 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
Copy link
Member Author

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

fi
}

direnv-help() {
Expand Down