diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2b4a9b..c5567e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: max-parallel: 4 matrix: python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + django-version: ["2.2","3.2", "4.2"] steps: - uses: actions/checkout@v3 diff --git a/README.md b/README.md index d43e3c2..f612ab6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Full documentation for project is available at [http://chibisov.github.io/drf-ex * Tested for Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 and 3.12 * Tested for Django Rest Framework 3.12, 3.13, and 3.14 -* Tested for Django 2.2 to 3.2 +* Tested for Django 2.2 to 3.2 & for Django 4.2 * Tested for django-filter 2.1.0 ## Installation: diff --git a/setup.py b/setup.py index 1b29ea6..958e391 100644 --- a/setup.py +++ b/setup.py @@ -56,7 +56,7 @@ def get_package_data(package): url='http://github.com/chibisov/drf-extensions', download_url='https://pypi.python.org/pypi/drf-extensions/', license='BSD', - install_requires=['djangorestframework>=3.10.3', 'packaging>=24.1'], + install_requires=['djangorestframework>=3.10.3', 'packaging>=24.1','Django>=2.2,<5.0'], description='Extensions for Django REST Framework', long_description='DRF-extensions is a collection of custom extensions for Django REST Framework', author='Asif Saif Uddin, Gennady Chibisov', @@ -71,6 +71,9 @@ def get_package_data(package): 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', + 'Framework :: Django', + 'Framework :: Django :: 3.2', + 'Framework :: Django :: 4.2', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.9', diff --git a/tests_app/settings.py b/tests_app/settings.py index 1d3dee8..32c9e9a 100644 --- a/tests_app/settings.py +++ b/tests_app/settings.py @@ -104,6 +104,7 @@ 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', + 'django.contrib.admin', # Uncomment the next line to enable the admin: # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: diff --git a/tests_app/tests/functional/_concurrency/conditional_request/urls.py b/tests_app/tests/functional/_concurrency/conditional_request/urls.py index e4687c8..870e75d 100644 --- a/tests_app/tests/functional/_concurrency/conditional_request/urls.py +++ b/tests_app/tests/functional/_concurrency/conditional_request/urls.py @@ -1,4 +1,4 @@ -from django.conf.urls import url, include +from django.urls import re_path, include from rest_framework import routers from .views import (BookViewSet, BookListCreateView, BookChangeView, BookCustomDestroyView, BookUnconditionalDestroyView, BookUnconditionalUpdateView) @@ -8,14 +8,14 @@ urlpatterns = [ # manually add endpoints for APIView instances - url(r'books_view/(?P[0-9]+)/custom/delete/', BookCustomDestroyView.as_view(), name='book_view-custom_delete'), - url(r'books_view/(?P[0-9]+)/unconditional/delete/', BookUnconditionalDestroyView.as_view(), + re_path(r'books_view/(?P[0-9]+)/custom/delete/', BookCustomDestroyView.as_view(), name='book_view-custom_delete'), + re_path(r'books_view/(?P[0-9]+)/unconditional/delete/', BookUnconditionalDestroyView.as_view(), name='book_view-unconditional_delete'), - url(r'books_view/(?P[0-9]+)/unconditional/update/', BookUnconditionalUpdateView.as_view(), + re_path(r'books_view/(?P[0-9]+)/unconditional/update/', BookUnconditionalUpdateView.as_view(), name='book_view-unconditional_update'), - url(r'books_view/', BookListCreateView.as_view(), name='book_view-list'), - url(r'books_view/(?P[0-9]+)/', BookChangeView.as_view(), name='book_view-detail'), + re_path(r'books_view/', BookListCreateView.as_view(), name='book_view-list'), + re_path(r'books_view/(?P[0-9]+)/', BookChangeView.as_view(), name='book_view-detail'), # include the URLs from the default viewset - url(r'^', include(router.urls)), + re_path(r'^', include(router.urls)), ] diff --git a/tests_app/tests/functional/_examples/etags/remove_etag_gzip_postfix/urls.py b/tests_app/tests/functional/_examples/etags/remove_etag_gzip_postfix/urls.py index 1a0aefc..57df896 100644 --- a/tests_app/tests/functional/_examples/etags/remove_etag_gzip_postfix/urls.py +++ b/tests_app/tests/functional/_examples/etags/remove_etag_gzip_postfix/urls.py @@ -1,8 +1,8 @@ -from django.conf.urls import url +from django.urls import re_path from .views import MyView urlpatterns = [ - url(r'^remove-etag-gzip-postfix/$', MyView.as_view()), + re_path(r'^remove-etag-gzip-postfix/$', MyView.as_view()), ] diff --git a/tests_app/tests/functional/cache/decorators/urls.py b/tests_app/tests/functional/cache/decorators/urls.py index d9c5f6d..4e4d8cc 100644 --- a/tests_app/tests/functional/cache/decorators/urls.py +++ b/tests_app/tests/functional/cache/decorators/urls.py @@ -1,8 +1,8 @@ -from django.conf.urls import url +from django.urls import re_path from .views import HelloView urlpatterns = [ - url(r'^hello/$', HelloView.as_view(), name='hello'), + re_path(r'^hello/$', HelloView.as_view(), name='hello'), ] diff --git a/tox.ini b/tox.ini index f8cd42c..01fdf56 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,7 @@ [tox] envlist = py{38,39}-django{22}-drf{311,312} py{38,39,310,311,312}-django{32}-drf{312,313,314} + py{38,39,310,311,312}-django{42}-drf{314} [testenv] @@ -17,6 +18,7 @@ deps= djangorestframework-guardian django22: Django>=2.2,<3.0 django32: Django>=3.2,<4.0 + django42: Django>=4.2,<5.0 setenv = @@ -24,4 +26,4 @@ setenv = commands = python --version pip freeze - python -Wd {envbindir}/django-admin.py test --settings=settings {posargs} + python -Wd {envbindir}/django-admin test --settings=settings {posargs}