From 329493903aac6d3bd6c1a840c90391d10bae8296 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 29 Mar 2021 09:12:28 -0700 Subject: [PATCH 01/77] Update hiredis from 1.1.0 to 2.0.0 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 6e566ecc..d4ed6f83 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -11,7 +11,7 @@ Collectfast==2.2.0 # https://github.com/antonagestam/collectfast sentry-sdk==1.0.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} -hiredis==1.1.0 # https://github.com/redis/hiredis-py +hiredis==2.0.0 # https://github.com/redis/hiredis-py {%- endif %} # Django From 83423025d9b805b7667363fcea66b7ef65bc4f39 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 29 Mar 2021 09:12:29 -0700 Subject: [PATCH 02/77] Update hiredis from 1.1.0 to 2.0.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index a4ab01b0..fd7daccb 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -14,7 +14,7 @@ whitenoise==5.2.0 # https://github.com/evansd/whitenoise {%- endif %} redis==3.5.3 # https://github.com/andymccurdy/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} -hiredis==1.1.0 # https://github.com/redis/hiredis-py +hiredis==2.0.0 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} celery==4.4.6 # pyup: < 5.0,!=4.4.7 # https://github.com/celery/celery From 7b4a0bafb670fb51c061c4f0297a21d05b5fe5db Mon Sep 17 00:00:00 2001 From: Floyd Hightower Date: Mon, 26 Apr 2021 06:43:52 -0400 Subject: [PATCH 03/77] Removing pycharm docs if app does not use pycharm --- {{cookiecutter.project_slug}}/docs/index.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/docs/index.rst b/{{cookiecutter.project_slug}}/docs/index.rst index 5fafc696..cb4cbaed 100644 --- a/{{cookiecutter.project_slug}}/docs/index.rst +++ b/{{cookiecutter.project_slug}}/docs/index.rst @@ -10,8 +10,8 @@ Welcome to {{ cookiecutter.project_name }}'s documentation! :maxdepth: 2 :caption: Contents: - howto - pycharm/configuration + howto{% if cookiecutter.use_pycharm == 'y' %} + pycharm/configuration{% endif %} users From 6b5ad4e8336d30b2b69b3053403b590c638a573d Mon Sep 17 00:00:00 2001 From: Floyd Hightower Date: Mon, 26 Apr 2021 06:17:02 -0500 Subject: [PATCH 04/77] Adding test to validate pycharm docs are removed appropriately --- tests/test_cookiecutter_generation.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index 7e585ea4..cbe3324a 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -282,3 +282,20 @@ def test_error_if_incompatible(cookies, context, invalid_context): assert result.exit_code != 0 assert isinstance(result.exception, FailedHookException) + + +@pytest.mark.parametrize( + ["use_pycharm", "pycharm_docs_exist"], + [ + ("n", False), + ("y", True), + ], +) +def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist): + """.""" + context.update({"use_pycharm": use_pycharm}) + result = cookies.bake(extra_context=context) + + with open(f"{result.project}/docs/index.rst", "r") as f: + has_pycharm_docs = 'pycharm/configuration' in f.read() + assert has_pycharm_docs == pycharm_docs_exist From 6f66b330e659c252cf49ed772fee9c1bf334d3dd Mon Sep 17 00:00:00 2001 From: Floyd Hightower Date: Tue, 27 Apr 2021 05:41:00 -0500 Subject: [PATCH 05/77] Running black on updated file --- tests/test_cookiecutter_generation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index cbe3324a..f62d4bc9 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -297,5 +297,5 @@ def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist) result = cookies.bake(extra_context=context) with open(f"{result.project}/docs/index.rst", "r") as f: - has_pycharm_docs = 'pycharm/configuration' in f.read() + has_pycharm_docs = "pycharm/configuration" in f.read() assert has_pycharm_docs == pycharm_docs_exist From 93ce22615f327e03013ff7449513f13d7b6a12e5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 22 Jun 2021 14:11:04 -0700 Subject: [PATCH 06/77] Update mypy from 0.902 to 0.910 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e77e15b9..4e10401b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ watchgod==0.7 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.902 # https://github.com/python/mypy +mypy==0.910 # https://github.com/python/mypy django-stubs==1.8.0 # https://github.com/typeddjango/django-stubs pytest==6.2.4 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar From 391874b426fa5bb20a95ea59a8b58e1b2bb6daee Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Mon, 5 Jul 2021 16:37:35 -0400 Subject: [PATCH 07/77] Add Redis 6 support --- {{cookiecutter.project_slug}}/.github/workflows/ci.yml | 2 +- {{cookiecutter.project_slug}}/local.yml | 2 +- {{cookiecutter.project_slug}}/production.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml index 70023b53..d2d7f703 100644 --- a/{{cookiecutter.project_slug}}/.github/workflows/ci.yml +++ b/{{cookiecutter.project_slug}}/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: services: {%- if cookiecutter.use_celery == 'y' %} redis: - image: redis:5.0 + image: redis:6.2.4 ports: - 6379:6379 {%- endif %} diff --git a/{{cookiecutter.project_slug}}/local.yml b/{{cookiecutter.project_slug}}/local.yml index 6241ceed..a9f80307 100644 --- a/{{cookiecutter.project_slug}}/local.yml +++ b/{{cookiecutter.project_slug}}/local.yml @@ -64,7 +64,7 @@ services: {%- if cookiecutter.use_celery == 'y' %} redis: - image: redis:5.0 + image: redis:6.2.4 container_name: redis celeryworker: diff --git a/{{cookiecutter.project_slug}}/production.yml b/{{cookiecutter.project_slug}}/production.yml index 3cccdb65..551d05a0 100644 --- a/{{cookiecutter.project_slug}}/production.yml +++ b/{{cookiecutter.project_slug}}/production.yml @@ -47,7 +47,7 @@ services: {%- endif %} redis: - image: redis:5.0 + image: redis:6.2.4 {%- if cookiecutter.use_celery == 'y' %} celeryworker: From 9c62cfe2eb3f3df3101ff8d3d6b035a79d0a53f5 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 6 Jul 2021 20:39:32 -0700 Subject: [PATCH 08/77] Update pillow from 8.2.0 to 8.3.1 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 36f02a3c..5ce15391 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,6 +1,6 @@ pytz==2021.1 # https://github.com/stub42/pytz python-slugify==5.0.2 # https://github.com/un33k/python-slugify -Pillow==8.2.0 # https://github.com/python-pillow/Pillow +Pillow==8.3.1 # https://github.com/python-pillow/Pillow {%- if cookiecutter.use_compressor == "y" %} {%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin From 3e02640e29fe897ed7facfe57930edf4ed381da3 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 8 Jul 2021 07:55:45 -0700 Subject: [PATCH 09/77] Update sentry-sdk from 1.1.0 to 1.3.0 --- {{cookiecutter.project_slug}}/requirements/production.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index 06d33ae0..a560d0f1 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.9.1 # https://github.com/psycopg/psycopg2 Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.1.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.3.0 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==1.1.0 # https://github.com/redis/hiredis-py From 83a7ac6e4d2eb1206faf00b7cefb744f98e80596 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 12 Jul 2021 08:45:29 -0700 Subject: [PATCH 10/77] Update django-allauth from 0.44.0 to 0.45.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index a39de1bc..17583afe 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -32,7 +32,7 @@ uvicorn[standard]==0.14.0 # https://github.com/encode/uvicorn django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/ django-environ==0.4.5 # https://github.com/joke2k/django-environ django-model-utils==4.1.1 # https://github.com/jazzband/django-model-utils -django-allauth==0.44.0 # https://github.com/pennersr/django-allauth +django-allauth==0.45.0 # https://github.com/pennersr/django-allauth django-crispy-forms==1.12.0 # https://github.com/django-crispy-forms/django-crispy-forms {%- if cookiecutter.use_compressor == "y" %} django-compressor==2.4.1 # https://github.com/django-compressor/django-compressor From e295ddb778fbd76ee4ba96643b05392ab632255b Mon Sep 17 00:00:00 2001 From: Mike97M Date: Wed, 14 Jul 2021 16:06:38 +0300 Subject: [PATCH 11/77] Backup - get container ID automatically from docker-compose Backup documentation to show how to use "docker-compose -f local.yml ps -q postgres" to get the container ID instead of hard coding it. --- docs/docker-postgres-backups.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/docker-postgres-backups.rst b/docs/docker-postgres-backups.rst index 6ccb7cf1..875d737e 100644 --- a/docs/docker-postgres-backups.rst +++ b/docs/docker-postgres-backups.rst @@ -55,8 +55,11 @@ With a single backup file copied to ``.`` that would be :: $ docker cp 9c5c3f055843:/backups/backup_2018_03_13T09_05_07.sql.gz . -.. _`command`: https://docs.docker.com/engine/reference/commandline/cp/ +You can also get the container ID using ``docker-compose -f local.yml ps -q postgres`` so if you want to automate your backups, you don't have to check the container ID manually every time. Here is the full command :: + $ docker cp $(docker-compose -f local.yml ps -q postgres):/backups ./backups + +.. _`command`: https://docs.docker.com/engine/reference/commandline/cp/ Restoring from the Existing Backup ---------------------------------- From f702f43fd154aa267d435c146a54e86cec13a48e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 14 Jul 2021 21:03:52 -0700 Subject: [PATCH 12/77] Update tox from 3.23.1 to 3.24.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b48a5ab9..5a12d6dc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ pre-commit==2.13.0 # Testing # ------------------------------------------------------------------------------ -tox==3.23.1 +tox==3.24.0 pytest==6.2.4 pytest-cookies==0.6.1 pytest-instafail==0.4.2 From f1edf59ce467e0e40553226d91a2aa02f533e3d7 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 16 Jul 2021 10:53:41 -0700 Subject: [PATCH 13/77] Update black from 21.6b0 to 21.7b0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index b48a5ab9..edef7ef6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ binaryornot==0.4.4 # Code quality # ------------------------------------------------------------------------------ -black==21.6b0 +black==21.7b0 isort==5.9.1 flake8==3.9.2 flake8-isort==4.0.0 From aaca5aa2a192343f3181b87a3b3176de618cf041 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 16 Jul 2021 10:53:41 -0700 Subject: [PATCH 14/77] Update black from 21.6b0 to 21.7b0 --- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index e77e15b9..792023f0 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -28,7 +28,7 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild flake8==3.9.2 # https://github.com/PyCQA/flake8 flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort coverage==5.5 # https://github.com/nedbat/coveragepy -black==21.6b0 # https://github.com/psf/black +black==21.7b0 # https://github.com/psf/black pylint-django==2.4.4 # https://github.com/PyCQA/pylint-django {%- if cookiecutter.use_celery == 'y' %} pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery From d1ce715e832134e5e3245723287cb5695f6e5e63 Mon Sep 17 00:00:00 2001 From: browniebroke Date: Sat, 17 Jul 2021 00:04:19 +0000 Subject: [PATCH 15/77] Auto-update pre-commit hooks --- {{cookiecutter.project_slug}}/.pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index ac71019a..81c3011b 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -11,12 +11,12 @@ repos: - id: check-yaml - repo: https://github.com/psf/black - rev: 21.6b0 + rev: 21.7b0 hooks: - id: black - repo: https://github.com/timothycrosley/isort - rev: 5.9.1 + rev: 5.9.2 hooks: - id: isort From 91172cc6e2a1aa3483297cf0cf576f7e6df52e20 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 17 Jul 2021 10:28:59 -0700 Subject: [PATCH 16/77] Update whitenoise from 5.2.0 to 5.3.0 --- {{cookiecutter.project_slug}}/requirements/base.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index a39de1bc..6b00cbe2 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ rcssmin==1.0.6 # https://github.com/ndparker/rcssmin {%- endif %} argon2-cffi==20.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} -whitenoise==5.2.0 # https://github.com/evansd/whitenoise +whitenoise==5.3.0 # https://github.com/evansd/whitenoise {%- endif %} redis==3.5.3 # https://github.com/andymccurdy/redis-py {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} From 88c487dfbd1613a84c65fa878353eef029ee6ed2 Mon Sep 17 00:00:00 2001 From: Andrew-Chen-Wang Date: Tue, 27 Jul 2021 01:20:30 -0400 Subject: [PATCH 17/77] Convert trans to translate in templates Signed-off-by: Andrew-Chen-Wang --- .../templates/account/account_inactive.html | 6 ++--- .../templates/account/email.html | 26 +++++++++---------- .../templates/account/email_confirm.html | 10 +++---- .../templates/account/login.html | 18 ++++++------- .../templates/account/logout.html | 8 +++--- .../templates/account/password_change.html | 6 ++--- .../templates/account/password_reset.html | 10 +++---- .../account/password_reset_done.html | 6 ++--- .../account/password_reset_from_key.html | 10 +++---- .../account/password_reset_from_key_done.html | 6 ++--- .../templates/account/password_set.html | 6 ++--- .../templates/account/signup.html | 8 +++--- .../templates/account/signup_closed.html | 6 ++--- .../templates/account/verification_sent.html | 6 ++--- .../account/verified_email_required.html | 14 +++++----- .../templates/base.html | 8 +++--- 16 files changed, 77 insertions(+), 77 deletions(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html index 0713ff11..ab910820 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/account_inactive.html @@ -2,11 +2,11 @@ {% load i18n %} -{% block head_title %}{% trans "Account Inactive" %}{% endblock %} +{% block head_title %}{% translate "Account Inactive" %}{% endblock %} {% block inner %} -

{% trans "Account Inactive" %}

+

{% translate "Account Inactive" %}

-

{% trans "This account is inactive." %}

+

{% translate "This account is inactive." %}

{% endblock %} {%- endraw %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html index 5c9406f3..07b5789e 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/account/email.html @@ -4,13 +4,13 @@ {% load i18n %} {% load crispy_forms_tags %} -{% block head_title %}{% trans "Account" %}{% endblock %} +{% block head_title %}{% translate "Account" %}{% endblock %} {% block inner %} -

{% trans "E-mail Addresses" %}

+

{% translate "E-mail Addresses" %}

{% if user.emailaddress_set.all %} -

{% trans 'The following e-mail addresses are associated with your account:' %}

+

{% translate 'The following e-mail addresses are associated with your account:' %}

{% else %} -

{% trans 'Warning:'%} {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}

+

{% translate 'Warning:'%} {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}

{% endif %} -

{% trans "Add E-mail Address" %}

+

{% translate "Add E-mail Address" %}

{% csrf_token %} {{ form|crispy }} - +
{% endblock %} @@ -63,7 +63,7 @@ {{ block.super }}