Skip to content

Commit ff45e55

Browse files
committed
Merge branch 'release/1.4'
* release/1.4: bump 1.4 improve django version detection fixes travis config updates CHANGES open 1.4 fixes django 1.11 compat issue updates changes add South FAQ restores and fixes some tests skipped in django 1.10 add django 1.10 to travis config
2 parents aa1862a + 3f83bb1 commit ff45e55

23 files changed

+171
-75
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ __pycache__
2222
*.pyc
2323
*.egg-info
2424
*.sqlite
25+
.testmondata

.travis.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ env:
1818
- TOXENV=py27-d19-pg
1919
- TOXENV=py27-d19-sqlite
2020
- TOXENV=py27-d19-mysql
21+
- TOXENV=py27-d110-pg
22+
- TOXENV=py27-d110-sqlite
23+
- TOXENV=py27-d110-mysql
24+
- TOXENV=py27-d111-pg
25+
- TOXENV=py27-d111-sqlite
26+
- TOXENV=py27-d111-mysql
2127

2228
- TOXENV=py33-d18-pg
2329
- TOXENV=py33-d18-sqlite
@@ -31,19 +37,26 @@ env:
3137
- TOXENV=py35-d18-sqlite
3238
- TOXENV=py35-d19-pg
3339
- TOXENV=py35-d19-sqlite
40+
- TOXENV=py35-d110-pg
41+
- TOXENV=py35-d110-sqlite
42+
- TOXENV=py35-d111-pg
43+
- TOXENV=py35-d111-sqlite
3444

3545
- TOXENV=pypy-d18-pg
3646
- TOXENV=pypy-d18-sqlite
3747
- TOXENV=pypy-d19-pg
3848
- TOXENV=pypy-d19-sqlite
3949

50+
- TOXENV=pypy-d110-pg
51+
- TOXENV=pypy-d110-sqlite
52+
53+
4054

4155
install:
4256
- pip install tox "coverage<=4.0" python-coveralls>=2.5 coveralls>=0.5 codecov
4357

4458
script:
45-
- tox -e $TOXENV -- py.test tests -v --capture=no --cov=concurrency \
46-
--cov-report=xml --cov-config=tests/.coveragerc
59+
- tox -e $TOXENV -- py.test tests -v --capture=no --cov=concurrency --cov-report=xml --cov-config=tests/.coveragerc
4760

4861
before_success:
4962
- coverage erase

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Release 1.4 (dev)
2+
-----------------
3+
* Django 1.11 compatibility
4+
* some minor support for Django 2.0
5+
16
Release 1.3.2 (10 Sep 2016)
27
-------------------------
38
* fixes bug in ConditionalVersionField that produced 'maximum recursion error' when a model had a ManyToManyField with a field to same model (self-relation)

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Django Concurrency
55

66
django-concurrency is an optimistic lock [1]_ implementation for Django.
77

8-
Supported Django versions: 1.6.x, 1.7.x, 1.8.x, 1.9.
8+
Supported Django versions: 1.8.x, 1.9.x, 1.10.x., 1.11.x
99

1010
It prevents users from doing concurrent editing in Django both from UI and from a
1111
django command.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
version = ".".join(map(str, concurrency.VERSION[0:2]))
8888
# The full version, including alpha/beta/rc tags.
8989
release = concurrency.get_version()
90-
next_version = '1.4'
90+
next_version = '1.5'
9191

9292
# The language for content autogenerated by Sphinx. Refer to documentation
9393
# for a list of supported languages.

docs/faq.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,23 @@ FAQ
99
.. contents::
1010
:local:
1111

12+
.. _south:
13+
14+
South support ?
15+
---------------
16+
South support has been removed after version 1.0
17+
when Django <1.6 support has been removed as well.
18+
19+
If needed add these lines to your ``models.py``::
20+
21+
22+
from south.modelsinspector import add_introspection_rules
23+
add_introspection_rules([], ["^concurrency\.fields\.IntegerVersionField"])
24+
25+
1226
.. _update_fields:
1327

28+
1429
How is managed `update_fields`
1530
------------------------------
1631

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def run_tests(self):
7070
'Programming Language :: Python',
7171
'Framework :: Django :: 1.8',
7272
'Framework :: Django :: 1.9',
73+
'Framework :: Django :: 1.10',
74+
'Framework :: Django :: 1.11',
7375
'Programming Language :: Python :: 2.7',
7476
'Programming Language :: Python :: 3',
7577
'Programming Language :: Python :: 3.3',

src/concurrency/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
__author__ = 'sax'
66
default_app_config = 'concurrency.apps.ConcurrencyConfig'
77

8-
VERSION = __version__ = (1, 3, 2, 'final', 0)
8+
VERSION = __version__ = (1, 4, 0, 'final', 0)
99
NAME = 'django-concurrency'
1010

1111

src/concurrency/config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
from __future__ import absolute_import, unicode_literals
22

33
from django.core.exceptions import ImproperlyConfigured
4-
from django.core.urlresolvers import get_callable
4+
try:
5+
from django.core.urlresolvers import get_callable
6+
except ImportError:
7+
from django.urls.utils import get_callable
58
from django.test.signals import setting_changed
69
from django.utils import six
710

src/concurrency/middleware.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,30 @@
22
from __future__ import absolute_import, unicode_literals
33

44
from django.core.signals import got_request_exception
5-
from django.core.urlresolvers import get_callable
65

76
from concurrency.config import conf
87
from concurrency.exceptions import RecordModifiedError
98

9+
try:
10+
from django.core.urlresolvers import get_callable
11+
except ImportError:
12+
from django.urls.utils import get_callable
13+
14+
1015

1116
class ConcurrencyMiddleware(object):
1217
""" Intercept :ref:`RecordModifiedError` and invoke a callable defined in
1318
:setting:`CONCURRECY_HANDLER409` passing the request and the object.
1419
1520
"""
1621

22+
def __init__(self, get_response=None):
23+
self.get_response = get_response
24+
25+
def __call__(self, request):
26+
response = self.get_response(request)
27+
return response
28+
1729
def process_exception(self, request, exception):
1830
if isinstance(exception, RecordModifiedError):
1931
got_request_exception.send(sender=self, request=request)

0 commit comments

Comments
 (0)