Skip to content

Commit 534648a

Browse files
committed
preparing release
1 parent 4d71784 commit 534648a

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

CHANGES

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
(Dev)
1+
2.6
22
-----------
33
* add support do Django 5.x
44
* drop support python 3.9
5+
* drop support django 3.x
56
* move to .pyproject.toml
67

78

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "django-concurrency"
3-
version = "2.5"
3+
version = "2.6.0"
44
description = "Optimistic lock implementation for Django. Prevents users from doing concurrent editing"
55
authors = [
66
{name = "sax", email = "[email protected]"},

src/concurrency/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
__author__ = 'sax'
22

3-
VERSION = __version__ = "2.5"
3+
VERSION = __version__ = "2.5.0"
44
NAME = 'django-concurrency'

src/concurrency/compat.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,4 @@
22
from django.template.exceptions import TemplateDoesNotExist # noqa
33
from django.urls.utils import get_callable # noqa
44

5-
if django.VERSION[:2] >= (4, 0):
6-
concurrency_param_name = 'form-_concurrency_version'
7-
else:
8-
concurrency_param_name = '_concurrency_version'
5+
concurrency_param_name = 'form-_concurrency_version'

tests/test_enable_disable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,12 @@ def test_concurrency_disable_increment():
9090
instance1 = AutoIncConcurrentModel(username=next(nextname))
9191
assert instance1.version == 0
9292
instance1.save()
93+
instance1.refresh_from_db()
9394
assert instance1.version == 1
9495
with concurrency_disable_increment(instance1):
9596
instance1.save()
96-
instance1.save()
97+
instance1.save(update_fields=('username',))
98+
instance1.refresh_from_db()
9799
assert instance1.version == 1
98100
instance1.save()
99101
assert instance1.version == 2

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = d{32,42,50}-py{310,311,312}-{pg,sqlite,mysql},docs,lint,package
2+
envlist = d{42,50}-py{311,312}-{pg,sqlite,mysql},docs,lint,package
33

44

55
[pytest]
@@ -8,6 +8,7 @@ django_find_project = false
88
DJANGO_SETTINGS_MODULE=demo.settings
99
norecursedirs = .tox docs ./demoapp/
1010
python_files=tests/test_*.py
11+
allowlist_externals=pytest
1112
addopts =
1213
-q
1314
-p no:warnings

0 commit comments

Comments
 (0)