Skip to content

Commit 895b9e3

Browse files
committed
Merge branch 'release/2.1'
* release/2.1: bump version and updates CHANGES code clean updates gitignore drop support python<3.5 fixes admin integration restore mysql in tox.ini fixes test suite updates CI config code clean updaets README updates setup.py.CHANGES/travis to test py3.7 updates travis config revert travis config to enable python 3.7 add django 2.2rc1 to tox removes six start 2.1 update Pipfile
2 parents 4cca173 + 189acf2 commit 895b9e3

28 files changed

+88
-202
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ __pycache__
2424
*.sqlite
2525
.testmondata
2626
Pipfile.lock
27+
poetry.lock

.travis.yml

Lines changed: 7 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: python
22
sudo: true
33
python:
4-
- 3.5
54
- 3.6
5+
- 3.7
6+
- 3.8
67

78
addons:
89
postgresql: "9.4"
@@ -15,58 +16,24 @@ services:
1516
- MySQL
1617
- PostgreSQL
1718

18-
jobs:
19-
include:
20-
- python: 3.7
21-
env: TRAVIS_PYTHON_VERSION=3.7 DJANGO=2.0 DB=mysql
22-
sudo: required
23-
dist: xenial
24-
25-
- python: 3.7
26-
env: TRAVIS_PYTHON_VERSION=3.7 DJANGO=2.1 DB=pg
27-
sudo: required
28-
dist: xenial
29-
30-
- python: 3.7
31-
env: TRAVIS_PYTHON_VERSION=3.7 DJANGO=2.0 DB=mysql
32-
sudo: required
33-
dist: xenial
34-
35-
- python: 3.7
36-
env: TRAVIS_PYTHON_VERSION=3.7 DJANGO=2.1 DB=pg
37-
sudo: required
38-
dist: xenial
39-
4019

4120
env:
4221
- DJANGO=1.11 DB=pg
43-
- DJANGO=2.0 DB=pg
4422
- DJANGO=2.1 DB=pg
23+
- DJANGO=2.2 DB=pg
24+
- DJANGO=3.0 DB=pg
4525

4626
- DJANGO=1.11 DB=mysql
47-
- DJANGO=2.0 DB=mysql
4827
- DJANGO=2.1 DB=mysql
28+
- DJANGO=2.2 DB=mysql
29+
- DJANGO=3.0 DB=mysql
4930

5031

51-
matrix:
52-
exclude:
53-
- python: 2.7
54-
env: DJANGO=2.0 DB=pg
55-
56-
- python: 2.7
57-
env: DJANGO=2.0 DB=mysql
58-
59-
- python: 2.7
60-
env: DJANGO=2.1 DB=pg
61-
62-
- python: 2.7
63-
env: DJANGO=2.1 DB=mysql
64-
6532
install:
6633
- pip install tox "coverage<=4.0" codecov
6734

6835
script:
69-
- tox -e "py${TRAVIS_PYTHON_VERSION//.}-d${DJANGO//.}-${DB}" -- py.test tests -v
36+
- tox -e "py${TRAVIS_PYTHON_VERSION//.}-d${DJANGO//.}-${DB}" -- pytest tests -v
7037

7138
before_success:
7239
- coverage erase

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Release 2.1
2+
-----------
3+
* drop support Python < 3.5
4+
* add support Django 2.2 / 3.0
5+
* drop support Django < 1.11
6+
7+
18
Release 2.0
29
-----------
310
* drop official support to Django < 1.10

Pipfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ verify_ssl = true
44
name = "pypi"
55

66
[packages]
7-
django = "==2.1"
8-
pre-commit = "*"
97

108
[dev-packages]
9+
django = "*"
10+
pre-commit = "*"
1111
django-reversion = "*"
1212
django-webtest = "*"
1313
mock = "*"
@@ -20,6 +20,7 @@ tox = "*"
2020
"psycopg2-binary" = "*"
2121
check-manifest = "*"
2222
sphinx = "*"
23+
twine="*"
2324

2425
[requires]
2526
python_version = "3.6"

README.rst

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

1111
django-concurrency is an optimistic lock [1]_ implementation for Django.
1212

13-
Supported Django versions: 1.8.x, 1.9.x, 1.10.x., 1.11.x, 2.x
13+
Supported Django versions: 1.11.x, 2.1.x, 2.2.x, 3.x
1414

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

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
# General information about the project.
7373
project = u'Django Concurrency'
74-
copyright = u'2012-2015, Stefano Apostolico'
74+
copyright = u'2012-2019, Stefano Apostolico'
7575

7676
# The version info for the project you're documenting, acts as replacement for
7777
# |version| and |release|, also used in various other places throughout the

setup.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def run_tests(self):
4848
description='Optimistic lock implementation for Django. Prevents users from doing concurrent editing.',
4949
long_description=open('README.rst').read(),
5050
license='MIT License',
51-
keywords='django',
51+
keywords='django, concurrency, optimistic lock, locking, concurrent editing',
5252
setup_requires=['pytest-runner', ],
5353
classifiers=[
5454
'Development Status :: 5 - Production/Stable',
@@ -57,16 +57,14 @@ def run_tests(self):
5757
'License :: OSI Approved :: BSD License',
5858
'Operating System :: OS Independent',
5959
'Programming Language :: Python',
60-
'Framework :: Django :: 1.8',
61-
'Framework :: Django :: 1.9',
62-
'Framework :: Django :: 1.10',
6360
'Framework :: Django :: 1.11',
64-
'Programming Language :: Python :: 2.7',
61+
'Framework :: Django :: 2.1',
62+
'Framework :: Django :: 2.2',
63+
'Framework :: Django :: 3.0',
6564
'Programming Language :: Python :: 3',
66-
'Programming Language :: Python :: 3.3',
67-
'Programming Language :: Python :: 3.4',
68-
'Programming Language :: Python :: 3.5',
6965
'Programming Language :: Python :: 3.6',
66+
'Programming Language :: Python :: 3.7',
67+
'Programming Language :: Python :: 3.8',
7068
'Topic :: Software Development :: Libraries :: Application Frameworks',
7169
'Topic :: Software Development :: Libraries :: Python Modules',
7270
],

src/concurrency/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__author__ = 'sax'
22
default_app_config = 'concurrency.apps.ConcurrencyConfig'
33

4-
VERSION = __version__ = "2.0"
4+
VERSION = __version__ = "2.1"
55
NAME = 'django-concurrency'

src/concurrency/admin.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import absolute_import, unicode_literals
3-
41
import operator
52
import re
63
from functools import reduce
@@ -207,12 +204,12 @@ def save_model(self, request, obj, form, change):
207204
def log_change(self, request, object, message):
208205
if object.pk in self._get_conflicts(request):
209206
return
210-
super(ConcurrencyListEditableMixin, self).log_change(request, object, message)
207+
return super(ConcurrencyListEditableMixin, self).log_change(request, object, message)
211208

212209
def log_deletion(self, request, object, object_repr):
213210
if object.pk in self._get_conflicts(request):
214211
return
215-
super(ConcurrencyListEditableMixin, self).log_deletion(request, object, object_repr)
212+
return super(ConcurrencyListEditableMixin, self).log_deletion(request, object, object_repr)
216213

217214
def message_user(self, request, message, *args, **kwargs):
218215
# This is ugly but we do not want to touch the changelist_view() code.

src/concurrency/api.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
from __future__ import absolute_import, unicode_literals
3-
41
import logging
52

63
from django.db.models import Model

0 commit comments

Comments
 (0)