From 75c423c88e2f5eb3038517314e81315c6fb7c6d3 Mon Sep 17 00:00:00 2001 From: "Nikita P. Shupeyko" Date: Tue, 12 Jun 2018 13:21:10 +0300 Subject: [PATCH 01/12] Update @pydanny and @webyneter bios --- .github/ISSUE_TEMPLATE/paid-support.md | 2 +- README.rst | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/paid-support.md b/.github/ISSUE_TEMPLATE/paid-support.md index 7cd2c4a57..d565e564f 100644 --- a/.github/ISSUE_TEMPLATE/paid-support.md +++ b/.github/ISSUE_TEMPLATE/paid-support.md @@ -7,4 +7,4 @@ Provided your question goes beyound [regular support](https://github.com/pydanny * Daniel Roy Greenfeld, Project Lead ([GitHub](https://github.com/pydanny), [Patreon](https://www.patreon.com/danielroygreenfeld)): expertise in Django and AWS ELB. -* Nikita Shupeyko, Core Developer ([GitHub](https://github.com/webyneter)): expertise in Django, Docker, and Heroku. +* Nikita Shupeyko, Core Developer ([GitHub](https://github.com/webyneter)): expertise in Python/Django, hands-on DevOps and frontend experience. diff --git a/README.rst b/README.rst index 7e24a8369..0eaea5194 100644 --- a/README.rst +++ b/README.rst @@ -98,7 +98,9 @@ Support this Project! This project is run by volunteers. Please support them in their efforts to maintain and improve Cookiecutter Django: -* https://www.patreon.com/danielroygreenfeld: Project lead. Expertise in AWS ELB and Django. +* Daniel Roy Greenfeld, Project Lead (`GitHub `_, `Patreon `_): expertise in Django and AWS ELB. + +* Nikita Shupeyko, Core Developer (`GitHub `_): expertise in Python/Django, hands-on DevOps and frontend experience. Projects that provide financial support to the maintainers: From 636b5f361d196cb15a3f4d07ac430988e124c499 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Fri, 15 Jun 2018 12:10:27 +0100 Subject: [PATCH 02/12] Remove entry from .gitignore causing compose/local to match --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9e4496f1c..54fafb8be 100644 --- a/.gitignore +++ b/.gitignore @@ -215,7 +215,6 @@ tags [Ii]nclude [Ll]ib [Ll]ib64 -[Ll]ocal [Ss]cripts pyvenv.cfg pip-selfcheck.json From a9db5b09826e8c6e033c5f00d1ba736b56f44195 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 15 Jun 2018 14:20:28 -0700 Subject: [PATCH 03/12] Update django-test-plus from 1.0.22 to 1.1.0 --- {{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 c67276107..d3e938ea2 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -22,7 +22,7 @@ coverage==4.5.1 # https://github.com/nedbat/coveragepy # Django # ------------------------------------------------------------------------------ factory-boy==2.11.1 # https://github.com/FactoryBoy/factory_boy -django-test-plus==1.0.22 # https://github.com/revsys/django-test-plus +django-test-plus==1.1.0 # https://github.com/revsys/django-test-plus django-debug-toolbar==1.9.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.0.7 # https://github.com/django-extensions/django-extensions From cec06b2d813c8a78396600f27871f6a5b8b2011c Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Fri, 15 Jun 2018 14:20:32 -0700 Subject: [PATCH 04/12] Update pytest-django from 3.2.1 to 3.3.0 --- {{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 c67276107..60600308b 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -27,4 +27,4 @@ django-test-plus==1.0.22 # https://github.com/revsys/django-test-plus django-debug-toolbar==1.9.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.0.7 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.2.1 # https://github.com/pytest-dev/pytest-django +pytest-django==3.3.0 # https://github.com/pytest-dev/pytest-django From c6c8ca953afcd721bf7ef7b13b3f7a77587bacf9 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Sat, 16 Jun 2018 15:07:40 +0100 Subject: [PATCH 05/12] Remove entry from other .gitignore causing compose/local to match --- {{cookiecutter.project_slug}}/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/.gitignore b/{{cookiecutter.project_slug}}/.gitignore index c6273596b..679fb9026 100644 --- a/{{cookiecutter.project_slug}}/.gitignore +++ b/{{cookiecutter.project_slug}}/.gitignore @@ -330,7 +330,6 @@ tags [Ii]nclude [Ll]ib [Ll]ib64 -[Ll]ocal [Ss]cripts pyvenv.cfg pip-selfcheck.json From 24a7e535c66bc63ac37e112b26215c4eb9d43a51 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sun, 17 Jun 2018 12:36:30 -0700 Subject: [PATCH 06/12] Update psycopg2-binary from 2.7.4 to 2.7.5 --- {{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 ac8e452d0..a72a54186 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -6,7 +6,7 @@ Sphinx==1.7.5 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.7.4 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} -psycopg2-binary==2.7.4 # https://github.com/psycopg/psycopg2 +psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 {%- endif %} # Testing From f3d76a413422092a38b58167bdd4e7a3aea7b405 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Tue, 19 Jun 2018 00:07:14 +0200 Subject: [PATCH 07/12] Update celery from 3.1.25 to 3.1.26.post2 (#1683) --- {{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 6b2ec4b55..a5399ea5a 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ whitenoise==3.3.1 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} -celery==3.1.25 # pyup: <4.0 # https://github.com/celery/celery +celery==3.1.26.post2 # pyup: <4.0 # https://github.com/celery/celery {%- endif %} # Django From 75a0699848dd752c412e750da9fefe4006ba8454 Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Thu, 21 Jun 2018 05:00:47 +0200 Subject: [PATCH 08/12] Update pytest to 3.6.2 (#1690) This PR updates [pytest](https://pypi.org/project/pytest) from **3.6.1** to **3.6.2**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)*
Links - PyPI: https://pypi.org/project/pytest - Changelog: https://pyup.io/changelogs/pytest/ - Repo: https://github.com/pytest-dev/pytest/issues - Homepage: http://pytest.org
--- requirements.txt | 2 +- {{cookiecutter.project_slug}}/requirements/local.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 9f378fdaa..77770fa9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ flake8==3.5.0 # Testing # ------------------------------------------------------------------------------ tox==3.0.0 -pytest==3.6.1 +pytest==3.6.2 pytest-cookies==0.3.0 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index a72a54186..14903b1af 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -11,7 +11,7 @@ psycopg2-binary==2.7.5 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ -pytest==3.6.1 # https://github.com/pytest-dev/pytest +pytest==3.6.2 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.1 # https://github.com/Frozenball/pytest-sugar # Code quality From 5309fbf5e7135087f61f58bb2a940d92596e371b Mon Sep 17 00:00:00 2001 From: Wan Liuyang Date: Thu, 21 Jun 2018 14:53:04 +0800 Subject: [PATCH 09/12] Upgrade celery to 4.2 (#1446) * Update celery to 4.1.0 * Re-add endif closing block * Update local.py * Update base.txt * Update local.py --- {{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 a5399ea5a..5e8f78468 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -10,7 +10,7 @@ whitenoise==3.3.1 # https://github.com/evansd/whitenoise {%- endif %} redis>=2.10.5 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} -celery==3.1.26.post2 # pyup: <4.0 # https://github.com/celery/celery +celery==4.2.0 # pyup: <5.0 # https://github.com/celery/celery {%- endif %} # Django From 07060eaecc07c444470b91b0915b63b6f4fc88f7 Mon Sep 17 00:00:00 2001 From: Nikita Shupeyko Date: Thu, 21 Jun 2018 19:38:48 +0000 Subject: [PATCH 10/12] Extend & enhance Celery configuration (#1679) * CELERY_TASK_TIME_LIMIT * CELERY_TASK_SOFT_TIME_LIMIT * CELERY_ALWAYS_EAGER -> CELERY_TASK_ALWAYS_EAGER * CELERY_EAGER_PROPAGATES = CELERY_TASK_ALWAYS_EAGER Addresses https://github.com/pydanny/cookiecutter-django/pull/1446/files#r167238808 * CELERY_RESULT_BACKEND = CELERY_BROKER_URL always * CELERY_TIMEZONE = TIME_ZONE * CELERY_TASK_EAGER_PROPAGATES = True * Name task limit settings appropriately CELERY_TASK_TIME_LIMIT -> CELERYD_TASK_TIME_LIMIT, CELERY_TASK_SOFT_TIME_LIMIT -> CELERYD_TASK_SOFT_TIME_LIMIT --- .../config/settings/base.py | 16 +++++++++++----- .../config/settings/local.py | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 26bbd479a..e4ab28844 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -229,19 +229,25 @@ MANAGERS = ADMINS # Celery # ------------------------------------------------------------------------------ INSTALLED_APPS += ['{{cookiecutter.project_slug}}.taskapp.celery.CeleryAppConfig'] +if USE_TZ: + # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-timezone + CELERY_TIMEZONE = TIME_ZONE # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-broker_url -CELERY_BROKER_URL = env('CELERY_BROKER_URL', default='django://') +CELERY_BROKER_URL = env('CELERY_BROKER_URL') # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_backend -if CELERY_BROKER_URL == 'django://': - CELERY_RESULT_BACKEND = 'redis://' -else: - CELERY_RESULT_BACKEND = CELERY_BROKER_URL +CELERY_RESULT_BACKEND = CELERY_BROKER_URL # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-accept_content CELERY_ACCEPT_CONTENT = ['json'] # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-task_serializer CELERY_TASK_SERIALIZER = 'json' # http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-result_serializer CELERY_RESULT_SERIALIZER = 'json' +# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-time-limit +# TODO: set to whatever value is adequate in your circumstances +CELERYD_TASK_TIME_LIMIT = 5 * 60 +# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-soft-time-limit +# TODO: set to whatever value is adequate in your circumstances +CELERYD_TASK_SOFT_TIME_LIMIT = 60 {%- endif %} # django-allauth diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index ac11eda56..741f324af 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -76,8 +76,10 @@ INSTALLED_APPS += ['django_extensions'] # noqa F405 # Celery # ------------------------------------------------------------------------------ -# http://docs.celeryproject.org/en/latest/userguide/configuration.html#std:setting-task_always_eager -CELERY_ALWAYS_EAGER = True +# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-always-eager +CELERY_TASK_ALWAYS_EAGER = True +# http://docs.celeryproject.org/en/latest/userguide/configuration.html#task-eager-propagates +CELERY_TASK_EAGER_PROPAGATES = True {%- endif %} # Your stuff... From 83b5f00ac55af641152e99c11b806ac62149dcfa Mon Sep 17 00:00:00 2001 From: Denis Orehovsky Date: Thu, 21 Jun 2018 22:39:19 +0300 Subject: [PATCH 11/12] Add celery prefix for configuration (#1676) * Add celery prefix for configuration * Update CONTRIBUTORS.rst --- CONTRIBUTORS.rst | 2 ++ .../{{cookiecutter.project_slug}}/taskapp/celery.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 0f6761ed5..55ae6d722 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -87,6 +87,7 @@ Listed in alphabetical order. David Díaz `@ddiazpinto`_ @DavidDiazPinto Davur Clementsen `@dsclementsen`_ @davur Delio Castillo `@jangeador`_ @jangeador + Denis Orehovsky `@apirobot`_ Dónal Adams `@epileptic-fish`_ Dong Huynh `@trungdong`_ Emanuel Calso `@bloodpet`_ @bloodpet @@ -172,6 +173,7 @@ Listed in alphabetical order. .. _@amjith: https://github.com/amjith .. _@andor-pierdelacabeza: https://github.com/andor-pierdelacabeza .. _@antoniablair: https://github.com/antoniablair +.. _@apirobot: https://github.com/apirobot .. _@archinal: https://github.com/archinal .. _@areski: https://github.com/areski .. _@arruda: https://github.com/arruda diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py index ed5c71760..b3f0a388b 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py @@ -20,7 +20,9 @@ class CeleryAppConfig(AppConfig): def ready(self): # Using a string here means the worker will not have to # pickle the object when using Windows. - app.config_from_object('django.conf:settings') + # - namespace='CELERY' means all celery-related configuration keys + # should have a `CELERY_` prefix. + app.config_from_object('django.conf:settings', namespace='CELERY') installed_apps = [app_config.name for app_config in apps.get_app_configs()] app.autodiscover_tasks(lambda: installed_apps, force=True) From ee2bb3f2efef6add9a598597354ef5b3d3541f0b Mon Sep 17 00:00:00 2001 From: "pyup.io bot" Date: Fri, 22 Jun 2018 02:50:02 +0200 Subject: [PATCH 12/12] Update pytest-django to 3.3.2 (#1692) This PR updates [pytest-django](https://pypi.org/project/pytest-django) from **3.3.0** to **3.3.2**.
Changelog ### 3.3.1 ``` ------------------ Bug fixes ^^^^^^^^^ * Fixed test for classmethod with Django TestCases again (618, introduced in 598 (3.3.0)). Compatibility ^^^^^^^^^^^^^ * Support Django 2.1 (no changes necessary) (614). ```
Links - PyPI: https://pypi.org/project/pytest-django - Changelog: https://pyup.io/changelogs/pytest-django/ - Docs: https://pytest-django.readthedocs.io/
--- {{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 14903b1af..27655b3f2 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -27,4 +27,4 @@ django-test-plus==1.1.0 # https://github.com/revsys/django-test-plus django-debug-toolbar==1.9.1 # https://github.com/jazzband/django-debug-toolbar django-extensions==2.0.7 # https://github.com/django-extensions/django-extensions django-coverage-plugin==1.5.0 # https://github.com/nedbat/django_coverage_plugin -pytest-django==3.3.0 # https://github.com/pytest-dev/pytest-django +pytest-django==3.3.2 # https://github.com/pytest-dev/pytest-django