Skip to content

Commit 10baddd

Browse files
authored
Upgrade dependencies to support Django 5.0 (#167)
1 parent 563348c commit 10baddd

File tree

12 files changed

+444
-449
lines changed

12 files changed

+444
-449
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ ignore =
1919
S603
2020
D401
2121
S101
22+
F401
23+
F811
24+
W503
2225

2326
per-file-ignores =
2427
*tests/*:D205,D400,D401,S101,S106,E501,E731

.github/workflows/tox.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,16 @@ jobs:
2020

2121
steps:
2222
- name: Check out the repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424

2525
- name: Set up Python 3.10
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: "3.10"
2929

3030
- name: Install and run tox
3131
run: |
32+
pip install -U pip
3233
pip install tox
3334
tox
3435
@@ -37,27 +38,28 @@ jobs:
3738
runs-on: ubuntu-latest
3839
strategy:
3940
matrix:
40-
python-version: ['3.8', '3.9', '3.10', '3.11']
41-
django-version: ['32', '40', '4.1']
41+
python-version: ['3.10', '3.11', '3.12']
42+
django-version: ['32', '40', '41', '42', '50']
4243

4344
env:
4445
TOXENV: py${{ matrix.python-version }}-django${{ matrix.django-version }}
4546

4647
services:
4748
cassandra:
48-
image: scylladb/scylla:5.1.2
49+
image: scylladb/scylla:5.4
4950
ports:
5051
- 9042:9042
5152
steps:
5253
- name: Check out the repository
53-
uses: actions/checkout@v3
54+
uses: actions/checkout@v4
5455

5556
- name: Set up Python ${{ matrix.python-version }}
56-
uses: actions/setup-python@v4
57+
uses: actions/setup-python@v5
5758
with:
5859
python-version: ${{ matrix.python-version }}
5960

6061
- name: Install and run tox
6162
run: |
63+
pip install -U pip
6264
pip install tox
6365
tox

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2023, Rafał Furmański <[email protected]>
1+
Copyright (c) 2014-2024, Rafał Furmański <[email protected]>
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ To connect to a hosted Cassandra cluster that provides a secure connection bundl
102102
The documentation can be found online [here](http://r4fek.github.io/django-cassandra-engine/).
103103

104104
## License ##
105-
Copyright (c) 2014-2023, [Rafał Furmański](https://linkedin.com/in/furmanski).
105+
Copyright (c) 2014-2024, [Rafał Furmański](https://linkedin.com/in/furmanski).
106106

107107
All rights reserved. Licensed under BSD 2-Clause License.

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Django Cassandra Engine - CHANGELOG
22

3+
4+
## Version 1.9.0 (17.03.2024)
5+
6+
* Support Django up to 4.2
7+
* Add support for Python 3.12
8+
39
## Version 1.8.0 (02.02.2023)
410

511
* Drop support for Django 3.1

docs/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ in the way you're used to. You can focus on writing a good code.
1919
## Features
2020

2121
* integration with latest `python-driver` from DataStax
22-
* working `flush`, `syncdb`, `migrate`, `sync_cassandra`, `inspectdb` and
22+
* working `flush`, `syncdb`, `migrate`, `sync_cassandra`, `inspectdb` and
2323
`dbshell` commands
2424
* support for creating/destroying test database
2525
* accepts all `cqlengine` and `cassandra.cluster.Cluster` connection options
@@ -29,8 +29,8 @@ in the way you're used to. You can focus on writing a good code.
2929

3030
## Requirements
3131

32-
* Python>=3.7
33-
* Cassandra>=2.0
32+
* Python>=3.8
33+
* Cassandra>=4.0
3434
* cassandra-driver
3535

3636
---

docs/license.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 2-clause BSD License
22

3-
Copyright (c) 2014-2016, Rafał Furmański <[email protected]>
3+
Copyright (c) 2014-2024, Rafał Furmański <[email protected]>
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ site_description: Apache Cassandra Database Wrapper for Django
33
site_url: https://r4fek.github.io/django-cassandra-engine
44
site_author: Rafał Furmański
55

6-
copyright: Copyright 2014-2023, <a href="https://linkedin.com/in/furmanski" title="Rafał Furmański" target="_blank">Rafał Furmański</a>
6+
copyright: Copyright 2014-2024, <a href="https://linkedin.com/in/furmanski" title="Rafał Furmański" target="_blank">Rafał Furmański</a>
77
theme: material
88
google_analytics: ['UA-38726443-3', 'auto']
99

@@ -12,7 +12,7 @@ repo_url: https://github.com/r4fek/django-cassandra-engine
1212

1313
# Options
1414
extra:
15-
version: 1.8.0
15+
version: 1.9.0
1616
logo: images/dj_cassandra.png
1717
author:
1818
github: r4fek

poetry.lock

Lines changed: 405 additions & 427 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-cassandra-engine"
3-
version = "1.8.0"
3+
version = "1.9.0"
44
description = "Django Cassandra Engine"
55
authors = ["Rafał Furmański <[email protected]>"]
66
license = "2-clause BSD"
@@ -22,6 +22,7 @@ classifiers = [
2222
'Programming Language :: Python :: 3.9',
2323
'Programming Language :: Python :: 3.10',
2424
'Programming Language :: Python :: 3.11',
25+
'Programming Language :: Python :: 3.12',
2526
'Topic :: Database',
2627
'Topic :: Internet',
2728
'Topic :: Software Development :: Libraries :: Python Modules',
@@ -32,9 +33,9 @@ packages = [{ include = "django_cassandra_engine" }]
3233
Changelog = "https://r4fek.github.io/django-cassandra-engine/changelog/"
3334

3435
[tool.poetry.dependencies]
35-
python = "^3.8 || ^3.9 || ^3.10 || ^3.11"
36-
django = "^3.2 || ^4.0 || ^4.1"
37-
scylla-driver = "^3.25.0"
36+
python = "^3.8 || ^3.9 || ^3.10 || ^3.11 || ^3.12"
37+
django = "^3.2 || ^4.0 || ^4.1 || ^4.2 || ^5.0"
38+
scylla-driver = "^3.26.0"
3839

3940
[tool.poetry.dev-dependencies]
4041
black = {version = "*", allow-prereleases = true}

testproject/sessionsapp/tests/test_sessions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from datetime import timedelta
22
import string
33
import unittest
4-
4+
import django
55
from django.conf import settings
66
from django.core.cache import InvalidCacheBackendError
77
from django.test.utils import override_settings
@@ -290,6 +290,9 @@ def test_decode(self):
290290
encoded = self.session.encode(data)
291291
self.assertEqual(self.session.decode(encoded), data)
292292

293+
@unittest.skipIf(
294+
django.VERSION[0] >= 5, "Django 5.x does not support PickleSerializer"
295+
)
293296
def test_actual_expiry(self):
294297
# this doesn't work with JSONSerializer (serializing timedelta)
295298
with override_settings(

tox.ini

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
isolated_build = True
3-
envlist = fmt, lint, py{3.8,3.9,3.10,3.11}-django{32,40,41}
3+
envlist = fmt, lint, py{3.10,3.11,3.12}-django{32,40,41,42,50}
44

55
[tox:.package]
66
# note tox will use the same python version as under what tox is installed to package
@@ -16,6 +16,8 @@ deps =
1616
django32: Django>=3.2,<3.3
1717
django40: Django>=4.0,<4.1
1818
django41: Django>=4.1,<4.2
19+
django42: Django>=4.2,<5.0
20+
django50: Django>=5.0,<5.1
1921
djangomaster: https://github.com/django/django/archive/main.tar.gz
2022
djangorestframework
2123
freezegun==0.3.6
@@ -40,4 +42,4 @@ deps =
4042
flake8
4143

4244
commands =
43-
poetry run flake8 django_cassandra_engine
45+
poetry run flake8 django_cassandra_engine -vvv

0 commit comments

Comments
 (0)