Skip to content

Commit

Permalink
Add Django 4.1 support (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmkoch authored Aug 27, 2022
1 parent 8ab33ad commit 52406ec
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
django-version: ['2.2', '3.2', '4.0']
django-version: ['2.2', '3.2', '4.0', '4.1']
exclude:
- python-version: '3.10'
django-version: '2.2'
- python-version: '3.7'
django-version: '4.0'

- python-version: '3.7'
django-version: '4.1'
services:
redis:
image: redis:6
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
What’s new in django-cachalot?
==============================

2.5.2
-----
- Added Django 4.1 support (#217)

2.5.1
-----

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.10 and Django 2.2, 3.2, and 4.0-4.1 with the databases PostgreSQL, SQLite, and MySQL.

Note: an upper limit on Django version is set for your safety. Please do not ignore it.

Expand Down
2 changes: 1 addition & 1 deletion cachalot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = (2, 5, 1)
VERSION = (2, 5, 2)
__version__ = ".".join(map(str, VERSION))

try:
Expand Down
2 changes: 1 addition & 1 deletion cachalot/tests/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def test_many_to_many_when_no_sql_check(self):
@all_final_sql_checks
def test_subquery(self):
additional_tables = []
if django_version[0] >= 4 and settings.CACHALOT_FINAL_SQL_CHECK:
if django_version[0] == 4 and django_version[1] < 1 and settings.CACHALOT_FINAL_SQL_CHECK:
# with Django 4.0 comes some query optimalizations that do selects little differently.
additional_tables.append('django_content_type')
qs = Test.objects.filter(owner__in=User.objects.all())
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Quick start
Requirements
............

- Django 2.2, 3.2, 4.0
- Django 2.2, 3.2, 4.0-4.1
- Python 3.7-3.10
- a cache configured as ``'default'`` with one of these backends:

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Django>=2.2,<4.1
Django>=2.2,<4.2
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.2',
'Framework :: Django :: 4.0',
'Framework :: Django :: 4.1',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ 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}-djangomain-{sqlite3,postgresql,mysql}-{redis,memcached,pylibmc,locmem,filebased},

[testenv]
Expand All @@ -15,6 +16,7 @@ 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
djangomain: https://github.com/django/django/archive/main.tar.gz
psycopg2-binary>=2.8,<2.9
mysqlclient
Expand Down Expand Up @@ -51,4 +53,5 @@ DJANGO =
2.2: django2.2
3.2: django3.2
4.0: django4.0
4.1: django4.1
main: djangomain

0 comments on commit 52406ec

Please sign in to comment.