diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml index 05cbab3..1d0f18b 100644 --- a/.github/workflows/django.yml +++ b/.github/workflows/django.yml @@ -30,9 +30,14 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.6, 3.7, 3.8, 3.9] - django-version: [2.0, 2.1, 2.2, 3.0, 3.1, 3.2] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] + django-version: [2.0, 2.1, 2.2, 3.0, 3.1, 3.2, 4.0] exclude: + # Django 4.0 is compatible with Python 3.8+ + - python-version: "3.6" + django-version: "4.0" + - python-version: "3.7" + django-version: "4.0" # Python 3.8 is compatible with Django 2.2+ - python-version: "3.8" django-version: "2.0" @@ -47,6 +52,17 @@ jobs: django-version: "2.2" - python-version: "3.9" django-version: "3.0" + # Python 3.10 is compatible with Django 3.2+ + - python-version: "3.10" + django-version: "2.0" + - python-version: "3.10" + django-version: "2.1" + - python-version: "3.10" + django-version: "2.2" + - python-version: "3.10" + django-version: "3.0" + - python-version: "3.10" + django-version: "3.1" steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} diff --git a/README.markdown b/README.markdown index f9be860..7f9d432 100644 --- a/README.markdown +++ b/README.markdown @@ -17,7 +17,7 @@ Features * Order results by relevance. * No need to install additional third-party modules or services. * Fast and scaleable enough for most use cases. -* Supports Django 1.11+, Python 3.6+. +* Supports Django 2+, Python 3.6+. Documentation diff --git a/setup.py b/setup.py index aa9ea1d..217140c 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,8 @@ setup( 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Framework :: Django", ], ) diff --git a/tests/test_watson/urls.py b/tests/test_watson/urls.py index c43a616..92423d6 100644 --- a/tests/test_watson/urls.py +++ b/tests/test_watson/urls.py @@ -1,12 +1,11 @@ -from django.conf.urls import url, include from django.contrib import admin - +from django.urls import include, re_path urlpatterns = [ - url("^simple/", include("watson.urls")), + re_path("^simple/", include("watson.urls")), - url("^custom/", include("watson.urls"), kwargs={ + re_path("^custom/", include("watson.urls"), kwargs={ "query_param": "fooo", "empty_query_redirect": "/simple/", "extra_context": { @@ -16,5 +15,5 @@ urlpatterns = [ "paginate_by": 10, }), - url("^admin/", admin.site.urls), + re_path("^admin/", admin.site.urls), ] diff --git a/watson/urls.py b/watson/urls.py index 735c484..e2583a8 100644 --- a/watson/urls.py +++ b/watson/urls.py @@ -2,14 +2,14 @@ from __future__ import unicode_literals -from django.conf.urls import url +from django.urls import re_path from watson.views import search, search_json app_name = 'watson' urlpatterns = [ - url("^$", search, name="search"), - url("^json/$", search_json, name="search_json"), + re_path("^$", search, name="search"), + re_path("^json/$", search_json, name="search_json"), ]