diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34bfeac5..3cacd940 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: [master] pull_request: branches: - - '**' + - '**' jobs: tests: @@ -14,12 +14,9 @@ jobs: matrix: os: [ubuntu-20.04] python-version: ['3.8'] - toxenv: [django22-celery44-drflatest, django22-celery44-drf312, django22-celery50-drflatest, - django22-celery50-drf312, django30-celery44-drflatest, django30-celery44-drf312, - django30-celery50-drflatest, django30-celery50-drf312, django31-celery44-drflatest, - django31-celery44-drf312, django31-celery50-drflatest, django31-celery50-drf312, - django32-celery44-drflatest, django32-celery44-drf312, django32-celery50-drflatest, - django32-celery50-drf312, quality, docs] + toxenv: [django32-celery44-drf312, django32-celery44-drflatest, django32-celery50-drf312, + django32-celery50-drflatest, django40-celery44-drf312, django40-celery44-drflatest, + django40-celery50-drf312, django40-celery50-drflatest, quality, docs] steps: - uses: actions/checkout@v2 @@ -39,7 +36,7 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'django22-celery44-drf312' + if: matrix.python-version == '3.8' && matrix.toxenv == 'django32-celery50-drf312' uses: codecov/codecov-action@v1 with: flags: unittests diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 82ce4617..0cbcfde5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,7 @@ Change Log ---------- .. - All enhancements and patches to cookiecutter-django-app will be documented + All enhancements and patches to django-user-tasks will be documented in this file. It adheres to the structure of http://keepachangelog.com/ , but in reStructuredText instead of Markdown (for ease of incorporation into Sphinx documentation and the PyPI description). @@ -16,6 +16,19 @@ Unreleased * +[2.2.0] - 2022-01-19 +~~~~~~~~~~~~~~~~~~~~ + +Removed ++++++++ + +* Removed Django22,30,31 support. + +Added ++++++++ + +* Added Django40 support in CI + [2.1.0] - 2021-07-07 ~~~~~~~~~~~~~~~~~~~~ diff --git a/requirements/doc.txt b/requirements/doc.txt index 3edbcd2a..15eec2c0 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -74,7 +74,7 @@ idna==3.3 # via requests imagesize==1.3.0 # via sphinx -importlib-metadata==4.10.0 +importlib-metadata==4.10.1 # via # keyring # sphinx diff --git a/setup.py b/setup.py index f394cf38..2fc27210 100644 --- a/setup.py +++ b/setup.py @@ -119,10 +119,8 @@ def is_requirement(line): classifiers=[ 'Development Status :: 4 - Beta', 'Framework :: Django', - 'Framework :: Django :: 2.2', - 'Framework :: Django :: 3.0', - 'Framework :: Django :: 3.1', 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.0', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Natural Language :: English', diff --git a/test_urls.py b/test_urls.py index e457b2f3..cdebb22b 100644 --- a/test_urls.py +++ b/test_urls.py @@ -2,9 +2,9 @@ URLs for user_tasks test suite. """ -from django.conf.urls import url +from django.urls import re_path from django.contrib import admin from user_tasks.urls import urlpatterns -urlpatterns += [url(r'^admin/', admin.site.urls)] +urlpatterns += [re_path(r'^admin/', admin.site.urls)] diff --git a/tox.ini b/tox.ini index 682b7f67..fa51ae5c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,54 +1,52 @@ [tox] -envlist = py38-django{22,30,31,32}-celery{44,50}-drf{312,latest},quality,docs +envlist = py38-django{32,40}-celery{44,50}-drf{312,latest},quality,docs [testenv] -deps = - django22: Django>=2.2,<2.3 - django30: Django>=3.0,<3.1 - django31: Django>=3.1,<3.2 - django32: Django>=3.2,<3.3 - drf312: djangorestframework>=3.12,<3.13 - drflatest: djangorestframework - celery44: -r{toxinidir}/requirements/celery44.txt - celery50: -r{toxinidir}/requirements/celery50.txt - -r{toxinidir}/requirements/test.txt -commands = - python -Wd -m pytest {posargs} +deps = + django32: Django>=3.2,<4.0 + django40: Django>=4.0,<4.1 + drf312: djangorestframework>=3.12,<3.13 + drflatest: djangorestframework + celery44: -r{toxinidir}/requirements/celery44.txt + celery50: -r{toxinidir}/requirements/celery50.txt + -r{toxinidir}/requirements/test.txt +commands = + python -Wd -m pytest {posargs} [testenv:docs] -allowlist_externals = - make - rm -deps = - -r{toxinidir}/requirements/doc.txt -commands = - doc8 --ignore-path docs/_build --ignore-path docs/rest_api.rst README.rst docs - rm -f docs/user_tasks.rst - rm -f docs/modules.rst - make -C docs clean - make -C docs html - python setup.py sdist bdist_wheel - twine check dist/* +allowlist_externals = + make + rm +deps = + -r{toxinidir}/requirements/doc.txt +commands = + doc8 --ignore-path docs/_build --ignore-path docs/rest_api.rst README.rst docs + rm -f docs/user_tasks.rst + rm -f docs/modules.rst + make -C docs clean + make -C docs html + python setup.py sdist bdist_wheel + twine check dist/* [testenv:quality] -setenv= +setenv = DJANGO_SETTINGS_MODULE=test_settings -allowlist_externals = - make - rm - touch -deps = - -r{toxinidir}/requirements/doc.txt - -r{toxinidir}/requirements/quality.txt - -r{toxinidir}/requirements/test.txt -commands = - touch tests/__init__.py - pylint user_tasks - pylint tests - pylint schema - rm tests/__init__.py - pycodestyle schema tests user_tasks - pydocstyle schema tests user_tasks - isort --check-only --diff --recursive schema tests user_tasks manage.py setup.py test_settings.py - make help +allowlist_externals = + make + rm + touch +deps = + -r{toxinidir}/requirements/doc.txt + -r{toxinidir}/requirements/quality.txt + -r{toxinidir}/requirements/test.txt +commands = + touch tests/__init__.py + pylint user_tasks + pylint tests + pylint schema + rm tests/__init__.py + pycodestyle schema tests user_tasks + pydocstyle schema tests user_tasks + isort --check-only --diff schema tests user_tasks manage.py setup.py test_settings.py + make help diff --git a/user_tasks/__init__.py b/user_tasks/__init__.py index 882c81c3..54f2ab99 100644 --- a/user_tasks/__init__.py +++ b/user_tasks/__init__.py @@ -4,10 +4,11 @@ from django.dispatch import Signal -__version__ = '2.1.0' +__version__ = '2.2.0' default_app_config = 'user_tasks.apps.UserTasksConfig' # pylint: disable=invalid-name # This signal is emitted when a user task reaches any final state: # SUCCEEDED, FAILED, or CANCELED -user_task_stopped = Signal(providing_args=['status']) # pylint: disable=invalid-name +# providing_args = ['status'] +user_task_stopped = Signal() # pylint: disable=invalid-name diff --git a/user_tasks/models.py b/user_tasks/models.py index d28aca65..2261b146 100644 --- a/user_tasks/models.py +++ b/user_tasks/models.py @@ -13,7 +13,7 @@ from django.db.models import Q from django.db.models.expressions import F from django.utils.timezone import now -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from model_utils.models import TimeStampedModel