From 5bf90a43a9a28fb3306b268d4d02a9a44efa4426 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Wed, 7 Jun 2023 17:12:01 +0100 Subject: [PATCH 01/11] Replace `runserver` with `runserver_plus` (#4373) This reverts commit f93a9f78d9a249718acd20e297fb02b177353912 In #4255, `runserver_plus` was replaced by `runserver` due to some bugs in django-extensions, preventing us to upgrade Django. In #4372, django-extensions was upgraded to a version with a fix, so we can go back to using `runserver_plus`. --- hooks/post_gen_project.py | 4 ++- .../runConfigurations/runserver_plus.xml | 33 +++++++++++++++++++ .../compose/local/django/start | 2 +- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 {{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index b79985a82..927419f8c 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -194,7 +194,9 @@ def handle_js_runner(choice, use_docker, use_async): "gulp-uglify-es", ] if not use_docker: - dev_django_cmd = "uvicorn config.asgi:application --reload" if use_async else "python manage.py runserver" + dev_django_cmd = ( + "uvicorn config.asgi:application --reload" if use_async else "python manage.py runserver_plus" + ) scripts.update( { "dev": "concurrently npm:dev:*", diff --git a/{{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml b/{{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml new file mode 100644 index 000000000..242f861a6 --- /dev/null +++ b/{{cookiecutter.project_slug}}/.idea/runConfigurations/runserver_plus.xml @@ -0,0 +1,33 @@ + + + + + diff --git a/{{cookiecutter.project_slug}}/compose/local/django/start b/{{cookiecutter.project_slug}}/compose/local/django/start index 6415d7fb4..ec57dc8e4 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/start +++ b/{{cookiecutter.project_slug}}/compose/local/django/start @@ -9,5 +9,5 @@ python manage.py migrate {%- if cookiecutter.use_async == 'y' %} exec uvicorn config.asgi:application --host 0.0.0.0 --reload --reload-include '*.html' {%- else %} -exec python manage.py runserver 0.0.0.0:8000 +exec python manage.py runserver_plus 0.0.0.0:8000 {%- endif %} From 34e97530ded6841520cd01b65058dd34696abd3d Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Jun 2023 11:14:04 -0500 Subject: [PATCH 02/11] Update sphinx-rtd-theme from 1.2.1 to 1.2.2 (#4375) --- docs/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index e37d638b0..1ae530fa7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,3 @@ sphinx==6.2.1 -sphinx-rtd-theme==1.2.1 +sphinx-rtd-theme==1.2.2 myst-parser==1.0.0 From d6c8c760e7a679f7d4140fe26c796cfcbc14f623 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Wed, 7 Jun 2023 11:55:10 -0500 Subject: [PATCH 03/11] Update sentry-sdk from 1.25.0 to 1.25.1 (#4376) --- {{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 2714fe6f8..aec79b3d3 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -8,7 +8,7 @@ psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 Collectfast==2.2.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- if cookiecutter.use_sentry == "y" %} -sentry-sdk==1.25.0 # https://github.com/getsentry/sentry-python +sentry-sdk==1.25.1 # https://github.com/getsentry/sentry-python {%- endif %} {%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %} hiredis==2.2.3 # https://github.com/redis/hiredis-py From e4915d62acc86154cd95e13b9498770d16690a29 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 8 Jun 2023 02:31:36 +0000 Subject: [PATCH 04/11] Release 2023.06.07 --- CHANGELOG.md | 21 +++++++++++++++++++++ setup.py | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 06441cb95..4b56dc7c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All enhancements and patches to Cookiecutter Django will be documented in this f +## 2023.06.07 + + +### Changed + +- Replace `runserver` with `runserver_plus` ([#4373](https://github.com/cookiecutter/cookiecutter-django/pull/4373)) + +- Add translations for Brazilian Portuguese ([#4367](https://github.com/cookiecutter/cookiecutter-django/pull/4367)) + +### Updated + +- Update sentry-sdk to 1.25.1 ([#4376](https://github.com/cookiecutter/cookiecutter-django/pull/4376)) + +- Update django-extensions to 3.2.3 ([#4372](https://github.com/cookiecutter/cookiecutter-django/pull/4372)) + +- Update djangorestframework-stubs to 3.14.1 ([#4366](https://github.com/cookiecutter/cookiecutter-django/pull/4366)) + +- Update django-stubs to 4.2.1 ([#4365](https://github.com/cookiecutter/cookiecutter-django/pull/4365)) + +- Update mypy to 1.3.0 ([#4327](https://github.com/cookiecutter/cookiecutter-django/pull/4327)) + ## 2023.06.02 diff --git a/setup.py b/setup.py index 19820f7bc..f9d6222d5 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ except ImportError: from distutils.core import setup # We use calendar versioning -version = "2023.06.02" +version = "2023.06.07" with open("README.rst") as readme_file: long_description = readme_file.read() From 135ea503e4e662a7aaba760b2758bed07ac10162 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 8 Jun 2023 05:15:42 -0500 Subject: [PATCH 05/11] Update werkzeug from 2.3.4 to 2.3.5 (#4377) --- {{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 4728ffbde..3e8b13133 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,6 +1,6 @@ -r base.txt -Werkzeug[watchdog]==2.3.4 # https://github.com/pallets/werkzeug +Werkzeug[watchdog]==2.3.5 # https://github.com/pallets/werkzeug ipdb==0.13.13 # https://github.com/gotcha/ipdb {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.9.6 # https://github.com/psycopg/psycopg2 From 1025d7308362bf7094fa2303ce22b4b51f27770f Mon Sep 17 00:00:00 2001 From: mpsantos Date: Thu, 8 Jun 2023 12:41:35 -0300 Subject: [PATCH 06/11] Translate fixed message in test (#4374) --- .../{{cookiecutter.project_slug}}/users/tests/test_views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py index 0cd0021ff..2c1027038 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/test_views.py @@ -7,6 +7,7 @@ from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, HttpResponseRedirect from django.test import RequestFactory from django.urls import reverse +from django.utils.translation import gettext_lazy as _ from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm from {{ cookiecutter.project_slug }}.users.models import User @@ -72,7 +73,7 @@ class TestUserUpdateView: view.form_valid(form) messages_sent = [m.message for m in messages.get_messages(request)] - assert messages_sent == ["Information successfully updated"] + assert messages_sent == [_("Information successfully updated")] class TestUserRedirectView: From 74b98844c2d68b82a2286d6a0c89217e92071684 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 8 Jun 2023 10:43:28 -0500 Subject: [PATCH 07/11] Update celery to 5.3.0 (#4369) --- {{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 6f33acb7e..9b2159edf 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -16,7 +16,7 @@ redis==4.5.5 # https://github.com/redis/redis-py hiredis==2.2.3 # https://github.com/redis/hiredis-py {%- endif %} {%- if cookiecutter.use_celery == "y" %} -celery==5.2.7 # pyup: < 6.0 # https://github.com/celery/celery +celery==5.3.0 # pyup: < 6.0 # https://github.com/celery/celery django-celery-beat==2.5.0 # https://github.com/celery/django-celery-beat {%- if cookiecutter.use_docker == 'y' %} flower==1.2.0 # https://github.com/mher/flower From b2dfd2683456460a455d0f3031249710a30b5e5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jun 2023 16:47:37 +0100 Subject: [PATCH 08/11] Update to Python 3.11.4 in local Docker compose (#4380) Bumps python from 3.11.3-slim-bullseye to 3.11.4-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/local/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile index db48870d8..b1f459ba5 100644 --- a/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/django/Dockerfile @@ -1,5 +1,5 @@ # define an alias for the specific python version used in this file. -FROM python:3.11.3-slim-bullseye as python +FROM python:3.11.4-slim-bullseye as python # Python build stage FROM python as python-build-stage From 4e4ca84519b5015217fd7b6e7a53c49aa7601df9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jun 2023 16:47:43 +0100 Subject: [PATCH 09/11] Update to Python 3.11.4 in docs Docker compose (#4379) Bumps python from 3.11.3-slim-bullseye to 3.11.4-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- {{cookiecutter.project_slug}}/compose/local/docs/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile index 8239a6635..f9895a083 100644 --- a/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/local/docs/Dockerfile @@ -1,5 +1,5 @@ # define an alias for the specific python version used in this file. -FROM python:3.11.3-slim-bullseye as python +FROM python:3.11.4-slim-bullseye as python # Python build stage From ca780d5665ab46df1ccd7b9fffdcff16f7a3eb0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Jun 2023 16:47:50 +0100 Subject: [PATCH 10/11] Update to Python 3.11.4 in production Docker compose (#4378) Bumps python from 3.11.3-slim-bullseye to 3.11.4-slim-bullseye. --- updated-dependencies: - dependency-name: python dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .../compose/production/django/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile index 4c8695a57..bbe459839 100644 --- a/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/production/django/Dockerfile @@ -25,7 +25,7 @@ RUN npm run build {%- endif %} # define an alias for the specific python version used in this file. -FROM python:3.11.3-slim-bullseye as python +FROM python:3.11.4-slim-bullseye as python # Python build stage FROM python as python-build-stage From 61ebd31e5d5be3401e0b842b0a151c7fc7aa6b91 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Thu, 8 Jun 2023 16:49:59 +0100 Subject: [PATCH 11/11] Update Heroku runtime to Python 3.11.4 --- {{cookiecutter.project_slug}}/runtime.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index afe12ad1b..431fc7e8c 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -python-3.11.3 +python-3.11.4