diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..9e65275 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: Tests + +on: + push: + branches: [main, master] + pull_request: + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + django-version: ['4.2'] + name: Python ${{ matrix.python-version }} / Django ${{ matrix.django-version }} + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install "django==${{ matrix.django-version }}.*" + pip install . + - name: Run tests + run: python runtests.py diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1905486..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: python -python: - - "3.10" -env: - - DJANGO_VERSION=3.2.* -install: - - pip install django==$DJANGO_VERSION - - python setup.py install -script: - - ./runtests.py -sudo: false diff --git a/README.md b/README.md index fa1103d..ea51c97 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,9 @@ INSTALLED_APPS = ( Include the argcache URLconf in your project urls.py: ``` -url(r'^cache/', include('argcache.urls')), +from django.urls import include, re_path + +re_path(r'^cache/', include('argcache.urls')), ``` If your apps define any cached functions that aren't automatically diff --git a/setup.py b/setup.py index 710a9fb..912b346 100644 --- a/setup.py +++ b/setup.py @@ -25,14 +25,20 @@ }, include_package_data=True, install_requires=[ - 'django>=3.0', + 'django>=4.2,<5.0', ], classifiers=[ 'Environment :: Web Environment', 'Framework :: Django', + 'Framework :: Django :: 4.2', 'Intended Audience :: Developers', - 'License :: OSI Approved :: License :: OSI Approved :: GNU Affero General Public License v3', + 'License :: OSI Approved :: GNU Affero General Public License v3', 'Operating System :: OS Independent', 'Programming Language :: Python', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', ], ) diff --git a/src/signals.py b/src/signals.py index 668aef3..2158843 100644 --- a/src/signals.py +++ b/src/signals.py @@ -32,4 +32,4 @@ ### table_dirty = Signal() """ Emitted when a cache is deleted. """ -cache_deleted = Signal(providing_args=['key_set']) +cache_deleted = Signal() diff --git a/tests/settings.py b/tests/settings.py index 45d3010..7ad9655 100644 --- a/tests/settings.py +++ b/tests/settings.py @@ -35,3 +35,5 @@ 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', ] + +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'