From c56b7c5685ea05d7981a18d009e57295b9bcca5f Mon Sep 17 00:00:00 2001 From: Niko Lindroos Date: Thu, 30 Sep 2021 15:51:05 +0300 Subject: [PATCH 1/4] Updated psycopg2 to psycopg2-binary. About the matter: https://stackoverflow.com/questions/33866695/error-installing-psycopg2-on-macos-10-9-5. Could not upgrade to latest, because it had issues with timezone. This one is also a patch upgrade to last one, so it should not need much testing either. KK-792 --- requirements.in | 2 +- requirements.txt | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/requirements.in b/requirements.in index ae392317..cb49c925 100644 --- a/requirements.in +++ b/requirements.in @@ -12,7 +12,7 @@ drf-oidc-auth==0.10.0 factory-boy graphene-django graphene-file-upload -psycopg2 +psycopg2-binary==2.8.6 sentry-sdk Pillow pycountry diff --git a/requirements.txt b/requirements.txt index 0833ac91..b0eb951e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ # -# This file is autogenerated by pip-compile +# This file is autogenerated by pip-compile with python 3.7 # To update, run: # -# pip-compile requirements.in +# pip-compile # aniso8601==7.0.0 # via graphene @@ -26,6 +26,20 @@ chardet==3.0.4 # via requests cryptography==3.3.2 # via azure-storage-common +django==2.2.24 + # via + # -r requirements.in + # django-anymail + # django-cors-headers + # django-filter + # django-graphql-jwt + # django-guardian + # django-helusers + # django-ilmoitin + # django-mailer + # django-storages + # drf-oidc-auth + # graphene-django django-anymail==7.0.0 # via django-ilmoitin django-cleanup==4.0.0 @@ -52,20 +66,6 @@ django-parler==2.1 # django-ilmoitin django-storages[azure,google]==1.9.1 # via -r requirements.in -django==2.2.24 - # via - # -r requirements.in - # django-anymail - # django-cors-headers - # django-filter - # django-graphql-jwt - # django-guardian - # django-helusers - # django-ilmoitin - # django-mailer - # django-storages - # drf-oidc-auth - # graphene-django djangorestframework==3.10.3 # via drf-oidc-auth drf-oidc-auth==0.10.0 @@ -96,14 +96,14 @@ google-resumable-media==0.5.0 # via google-cloud-storage googleapis-common-protos==1.51.0 # via google-api-core +graphene==2.1.8 + # via graphene-django graphene-django==2.13.0 # via # -r requirements.in # django-graphql-jwt graphene-file-upload==1.2.2 # via -r requirements.in -graphene==2.1.8 - # via graphene-django graphql-core==2.2.1 # via # django-graphql-jwt @@ -131,14 +131,14 @@ protobuf==3.11.3 # via # google-api-core # googleapis-common-protos -psycopg2==2.8.4 +psycopg2-binary==2.8.6 # via -r requirements.in -pyasn1-modules==0.2.8 - # via google-auth pyasn1==0.4.7 # via # pyasn1-modules # rsa +pyasn1-modules==0.2.8 + # via google-auth pycountry==20.7.3 # via -r requirements.in pycparser==2.20 From 0a5dee148200e02885797b2be7caeca90ef76ce6 Mon Sep 17 00:00:00 2001 From: Niko Lindroos Date: Mon, 4 Oct 2021 09:12:29 +0300 Subject: [PATCH 2/4] Fix the CORS issues in Docker-compose env example configuration. --- docker-compose.env.yaml.example | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.env.yaml.example b/docker-compose.env.yaml.example index 195b04f7..5318b91f 100644 --- a/docker-compose.env.yaml.example +++ b/docker-compose.env.yaml.example @@ -1,4 +1,5 @@ DEBUG=1 +CORS_ORIGIN_ALLOW_ALL=1 APPLY_MIGRATIONS=1 CREATE_SUPERUSER=1 ADD_DEFAULT_LANGUAGES=1 From 25182738bebfb26790f496a4a0483d9e8bab20ce Mon Sep 17 00:00:00 2001 From: Niko Lindroos Date: Mon, 4 Oct 2021 09:26:15 +0300 Subject: [PATCH 3/4] Ignore vscode setup files. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f86dad9b..4a404bfe 100644 --- a/.gitignore +++ b/.gitignore @@ -78,3 +78,5 @@ var/ venv/ .pytest_cache/ docker-compose.env.yaml + +.vscode/ From f03d4f73cc01f5091ef8e6a73986dfb1a54442c1 Mon Sep 17 00:00:00 2001 From: Niko Lindroos Date: Wed, 6 Oct 2021 10:55:53 +0300 Subject: [PATCH 4/4] Added some documentation for psycopg2-binary package Django 2.2 needs psycopg2 2.8. Mac needs the binary. The psycopg2-binary should be replacesd with psycopg2 when possible: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary. KK-792l --- requirements.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/requirements.in b/requirements.in index cb49c925..eb5b0b38 100644 --- a/requirements.in +++ b/requirements.in @@ -12,7 +12,11 @@ drf-oidc-auth==0.10.0 factory-boy graphene-django graphene-file-upload -psycopg2-binary==2.8.6 +# Django 2.2 needs psycopg2 2.8. Mac needs the binary. +# The psycopg2-binary should be replacesd +# with psycopg2 when possible +# https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary +psycopg2-binary < 2.9 sentry-sdk Pillow pycountry