Skip to content

Commit

Permalink
Upgrade dependencies to support Django 5.0 (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4fek authored Mar 17, 2024
1 parent 563348c commit 10baddd
Show file tree
Hide file tree
Showing 12 changed files with 444 additions and 449 deletions.
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ ignore =
S603
D401
S101
F401
F811
W503

per-file-ignores =
*tests/*:D205,D400,D401,S101,S106,E501,E731
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ jobs:

steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install and run tox
run: |
pip install -U pip
pip install tox
tox
Expand All @@ -37,27 +38,28 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
django-version: ['32', '40', '4.1']
python-version: ['3.10', '3.11', '3.12']
django-version: ['32', '40', '41', '42', '50']

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

services:
cassandra:
image: scylladb/scylla:5.1.2
image: scylladb/scylla:5.4
ports:
- 9042:9042
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install and run tox
run: |
pip install -U pip
pip install tox
tox
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014-2023, Rafał Furmański <[email protected]>
Copyright (c) 2014-2024, Rafał Furmański <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,6 @@ To connect to a hosted Cassandra cluster that provides a secure connection bundl
The documentation can be found online [here](http://r4fek.github.io/django-cassandra-engine/).

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

All rights reserved. Licensed under BSD 2-Clause License.
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Django Cassandra Engine - CHANGELOG


## Version 1.9.0 (17.03.2024)

* Support Django up to 4.2
* Add support for Python 3.12

## Version 1.8.0 (02.02.2023)

* Drop support for Django 3.1
Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ in the way you're used to. You can focus on writing a good code.
## Features

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

## Requirements

* Python>=3.7
* Cassandra>=2.0
* Python>=3.8
* Cassandra>=4.0
* cassandra-driver

---
Expand Down
2 changes: 1 addition & 1 deletion docs/license.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 2-clause BSD License

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

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ site_description: Apache Cassandra Database Wrapper for Django
site_url: https://r4fek.github.io/django-cassandra-engine
site_author: Rafał Furmański

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

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

# Options
extra:
version: 1.8.0
version: 1.9.0
logo: images/dj_cassandra.png
author:
github: r4fek
Expand Down
832 changes: 405 additions & 427 deletions poetry.lock

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "django-cassandra-engine"
version = "1.8.0"
version = "1.9.0"
description = "Django Cassandra Engine"
authors = ["Rafał Furmański <[email protected]>"]
license = "2-clause BSD"
Expand All @@ -22,6 +22,7 @@ classifiers = [
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Database',
'Topic :: Internet',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand All @@ -32,9 +33,9 @@ packages = [{ include = "django_cassandra_engine" }]
Changelog = "https://r4fek.github.io/django-cassandra-engine/changelog/"

[tool.poetry.dependencies]
python = "^3.8 || ^3.9 || ^3.10 || ^3.11"
django = "^3.2 || ^4.0 || ^4.1"
scylla-driver = "^3.25.0"
python = "^3.8 || ^3.9 || ^3.10 || ^3.11 || ^3.12"
django = "^3.2 || ^4.0 || ^4.1 || ^4.2 || ^5.0"
scylla-driver = "^3.26.0"

[tool.poetry.dev-dependencies]
black = {version = "*", allow-prereleases = true}
Expand Down
5 changes: 4 additions & 1 deletion testproject/sessionsapp/tests/test_sessions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from datetime import timedelta
import string
import unittest

import django
from django.conf import settings
from django.core.cache import InvalidCacheBackendError
from django.test.utils import override_settings
Expand Down Expand Up @@ -290,6 +290,9 @@ def test_decode(self):
encoded = self.session.encode(data)
self.assertEqual(self.session.decode(encoded), data)

@unittest.skipIf(
django.VERSION[0] >= 5, "Django 5.x does not support PickleSerializer"
)
def test_actual_expiry(self):
# this doesn't work with JSONSerializer (serializing timedelta)
with override_settings(
Expand Down
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
isolated_build = True
envlist = fmt, lint, py{3.8,3.9,3.10,3.11}-django{32,40,41}
envlist = fmt, lint, py{3.10,3.11,3.12}-django{32,40,41,42,50}

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

commands =
poetry run flake8 django_cassandra_engine
poetry run flake8 django_cassandra_engine -vvv

0 comments on commit 10baddd

Please sign in to comment.