diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd1d6d3..ed666d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,13 @@ jobs: strategy: fail-fast: false matrix: - python-version: ['3.7', '3.8', '3.9', '3.10'] - django-version: ['2.2', '3.2', '4.0'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + django-version: ['3.2', '4.1', '4.2'] exclude: - - python-version: '3.10' - django-version: '2.2' - python-version: '3.7' - django-version: '4.0' + django-version: '4.1' + - python-version: '3.7' + django-version: '4.2' services: redis: @@ -70,7 +70,7 @@ jobs: ${{ matrix.python-version }}-v1- - name: Install dependencies run: | - sudo apt-get install -y libmemcached-dev zlib1g-dev + sudo apt-get install -y libmemcached-dev zlib1g-dev libpq-dev python -m pip install --upgrade pip wheel python -m pip install tox tox-gh-actions coveralls - name: Tox Test diff --git a/.gitignore b/.gitignore index c0c219b..45e07f2 100644 --- a/.gitignore +++ b/.gitignore @@ -57,6 +57,7 @@ coverage.xml # Django stuff: *.log local_settings.py +*.sqlite3 db.sqlite3 db.sqlite3-journal diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 16e8e81..fe0f555 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ What’s new in django-cachalot? ============================== +2.5.0 +----- + +- Dropped Django 3.2 support. Added Django 4.1-4.2 and Python 3.11 support (#229) + 2.4.5 ----- diff --git a/README.rst b/README.rst index 48fc720..1928f98 100644 --- a/README.rst +++ b/README.rst @@ -39,7 +39,7 @@ Table of Contents: Quickstart ---------- -Cachalot officially supports Python 3.7-3.10 and Django 2.2, 3.2, and 4.0 with the databases PostgreSQL, SQLite, and MySQL. +Cachalot officially supports Python 3.7-3.11 and Django 3.2, 4.1, 4.2 with the databases PostgreSQL, SQLite, and MySQL. Note: an upper limit on Django version is set for your safety. Please do not ignore it. diff --git a/cachalot/__init__.py b/cachalot/__init__.py index a14f00d..f40c7d4 100644 --- a/cachalot/__init__.py +++ b/cachalot/__init__.py @@ -1,10 +1,4 @@ -VERSION = (2, 4, 5) +VERSION = (2, 5, 0) __version__ = ".".join(map(str, VERSION)) -try: - from django import VERSION as DJANGO_VERSION - - if DJANGO_VERSION < (3, 2): - default_app_config = "cachalot.apps.CachalotConfig" -except ImportError: # pragma: no cover - default_app_config = "cachalot.apps.CachalotConfig" +default_app_config = "cachalot.apps.CachalotConfig" diff --git a/docs/index.rst b/docs/index.rst index fedf53f..46051d0 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,8 +11,8 @@ Caches your Django ORM queries and automatically invalidates them. .. image:: http://img.shields.io/pypi/v/django-cachalot.svg?style=flat-square&maxAge=3600 :target: https://pypi.python.org/pypi/django-cachalot -.. image:: http://img.shields.io/travis/noripyt/django-cachalot/master.svg?style=flat-square&maxAge=3600 - :target: https://travis-ci.org/noripyt/django-cachalot +.. image:: https://github.com/noripyt/django-cachalot/actions/workflows/ci.yml/badge.svg + :target: https://github.com/noripyt/django-cachalot/actions/workflows/ci.yml .. image:: http://img.shields.io/coveralls/noripyt/django-cachalot/master.svg?style=flat-square&maxAge=3600 :target: https://coveralls.io/r/noripyt/django-cachalot?branch=master diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 9f911cb..836f15b 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -4,8 +4,8 @@ Quick start Requirements ............ -- Django 2.2, 3.2, 4.0 -- Python 3.7-3.10 +- Django 3.2, 4.1, 4.2 +- Python 3.7-3.11 - a cache configured as ``'default'`` with one of these backends: - `django-redis `_ diff --git a/requirements.txt b/requirements.txt index 9e8cdd1..316ec43 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -Django>=2.2,<4.1 +Django>=3.2,<4.3 diff --git a/requirements/tests.txt b/requirements/tests.txt index 4e17260..8503267 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -2,7 +2,8 @@ django>=2 -psycopg2-binary +psycopg2 +psycopg mysqlclient django-redis python-memcached diff --git a/setup.py b/setup.py index 8f1a12a..a788af3 100755 --- a/setup.py +++ b/setup.py @@ -25,14 +25,15 @@ setup( 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', - 'Framework :: Django :: 2.2', 'Framework :: Django :: 3.2', - 'Framework :: Django :: 4.0', + 'Framework :: Django :: 4.1', + 'Framework :: Django :: 4.2', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Internet :: WWW/HTTP', ], license='BSD', diff --git a/tox.ini b/tox.ini index 780eb86..119530c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,8 +1,8 @@ [tox] envlist = - py{37,38,39}-django2.2-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased}, py{37,38,39,310}-django3.2-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased}, - py{38,39,310}-django4.0-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased}, + py{38,39,310}-django4.1-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased}, + py{38,39,310,311}-django4.2-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased}, py{38,39,310}-djangomain-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased}, [testenv] @@ -11,12 +11,15 @@ basepython = py38: python3.8 py39: python3.9 py310: python3.10 + py311: python3.11 deps = django2.2: Django>=2.2,<2.3 django3.2: Django>=3.2,<4.0 - django4.0: Django>=4.0,<4.1 + django4.1: Django>=4.1,<4.2 + django4.2: Django>=4.2,<4.3 djangomain: https://github.com/django/django/archive/main.tar.gz - psycopg2-binary>=2.8,<2.9 + psycopg2>=2.8,<2.9 + psycopg mysqlclient django-redis python-memcached @@ -45,10 +48,11 @@ python = 3.8: py38 3.9: py39 3.10: py310 + 3.11: py311 [gh-actions:env] DJANGO = - 2.2: django2.2 3.2: django3.2 - 4.0: django4.0 + 4.1: django4.1 + 4.2: django4.2 main: djangomain