Skip to content

Commit 77b1f0f

Browse files
committed
Merge branch 'release/0.6b'
2 parents 05da58f + 5da0168 commit 77b1f0f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2626
-558
lines changed

.coverage

27.6 KB
Binary file not shown.

.coveragerc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[run]
2+
branch = True
3+
source = concurrency
4+
include =
5+
6+
omit =
7+
8+
9+
[report]
10+
# Regexes for lines to exclude from consideration
11+
exclude_lines =
12+
# Have to re-enable the standard pragma
13+
pragma: no cover
14+
# Don't complain about missing debug-only code:
15+
def __repr__
16+
if self\.debug
17+
# Don't complain if tests don't hit defensive assertion code:
18+
raise AssertionError
19+
raise NotImplementedError
20+
# Don't complain if non-runnable code isn't run:
21+
#if 0:
22+
if __name__ == .__main__.:
23+
24+
ignore_errors = True
25+
26+
[html]
27+
directory = ~build/coverage

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
notes.txt
12
/.idea
23
/.tox
34
docs/build/
@@ -8,6 +9,7 @@ docs/build/
89
*.pyc
910
*.log
1011
*.pot
12+
*.mo
1113
*.pyc
1214
*.egg-info
1315
*.sqlite

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ env:
1212
- DJANGO="Django==1.5.1" DBENGINE=mysql
1313
- DJANGO="Django==1.5.1" DBENGINE=pg
1414

15+
- DJANGO="https://www.djangoproject.com/download/1.6b1/tarball/" DBENGINE=pg
16+
1517
install:
18+
- make install-deps
1619
- sh -c "if [ '$DBENGINE' = 'pg' ]; then pip install -q psycopg2; fi"
1720
- sh -c "if [ '$DBENGINE' = 'mysql' ]; then pip install -q MySQL-python; fi"
1821
- pip install -q $DJANGO
1922
- python setup.py -q install
2023

2124
script:
22-
cd demoproject && ./manage.py test concurrency
25+
- make test
2326

2427
before_install:
2528
- sh -c "if [ '$DBENGINE' = 'pg' ]; then psql -c 'DROP DATABASE IF EXISTS concurrency;' -U postgres; fi"
@@ -37,3 +40,6 @@ matrix:
3740
env: DJANGO="Django==1.4.5" DBENGINE=pg
3841
- python: 3.2
3942
env: DJANGO="Django==1.5.1" DBENGINE=mysql
43+
44+
after_success:
45+
- coveralls

.tx/config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[django-concurrency.django-concurrency]
2+
file_filter = concurrency/locale/<lang>/LC_MESSAGES/django.po
3+
source_file = concurrency/locale/en/LC_MESSAGES/django.po
4+
source_lang = en
5+
6+
[main]
7+
host = https://www.transifex.com
8+
type = PO
9+

CHANGES

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
1+
Release 0.6.0 (beta)
2+
---------------------------------
3+
4+
* new :ref:`disable_concurrency` context manager
5+
* added documentation for :ref:`concurrency.middleware.ConcurrencyMiddleware <concurrencymiddleware>`
6+
* **BACKWARD INCOMPATIBLE** Fixed typo: ``CONCURRECY_SANITY_CHECK`` now ``CONCURRENCY_SANITY_CHECK``
7+
* added :ref:`disable_sanity_check` context manager
8+
* added configuration
9+
* check admin actions for concurrent deletion
10+
* added concurrency check for admin's :ref:`list_editable`
11+
12+
113
Release 0.5.0
214
---------------------------------
15+
316
* python 3.x compatibility
4-
* new :ref:`CONCURRENCY_FIELD_SIGNER`
17+
* new :setting:`CONCURRENCY_FIELD_SIGNER`
518

619

720
Release 0.4.0
821
---------------------------------
922

10-
* start deprecation of ``concurrency.core.VersionChangedError``, ``concurrency.core.RecordModifiedError``, ``concurrency.core.InconsistencyError``,moved in ``concurrency.exceptions``
23+
* start deprecation of ``concurrency.core.VersionChangedError``, ``concurrency.core.RecordModifiedError``,
24+
``concurrency.core.InconsistencyError``,moved in ``concurrency.exceptions``
1125
* start deprecation of ``concurrency.core.apply_concurrency_check``, ``concurrency.core.concurrency_check`` moved in ``concurrency.api``
12-
* added :ref:`CONCURRECY_SANITY_CHECK` settings entry
26+
* added :setting:`CONCURRECY_SANITY_CHECK` settings entry
1327
* signing of version number to avoid tampering (:ref:`concurrentform`)
14-
* added :ref:`ConcurrencyTestMixin` to help test on concurrency managed models
28+
* added :ref:`concurrencytestmixin` to help test on concurrency managed models
1529
* changed way to add concurrency to exisiting models (:ref:`apply_concurrency_check`)
1630
* fixed #4 (thanks FrankBie)
1731
* removed RandomVersionField

MANIFEST.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
include README.rst
22
include AUTHORS
3+
include CHANGES
34
include LICENSE
45
include MANIFEST.in
56
include setup.py
67
recursive-include concurrency *.py
7-
recursive-include docs *
8-
recursive-include demoproject *
9-
recursive-exclude docs/OUT *
8+
recursive-include concurrency/templates *.html
9+
recursive-include docs *.py

Makefile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
VERSION=2.0.0
2+
BUILDDIR='~build'
3+
DJANGO_SETTINGS_MODULE:=demoproject.settings
4+
PYTHONPATH:=${PWD}/demo/:${PWD}
5+
6+
7+
install-deps:
8+
pip install -r demo/demoproject/requirements.pip -r requirements.pip python-coveralls coverage
9+
10+
11+
locale:
12+
cd concurrency && django-admin.py makemessages -l en
13+
export PYTHONPATH=${PYTHONPATH}
14+
cd concurrency && django-admin.py compilemessages --settings=${DJANGO_SETTINGS_MODULE}
15+
16+
docs:
17+
mkdir -p ${BUILDDIR}/
18+
sphinx-build -aE docs ${BUILDDIR}/docs
19+
firefox ${BUILDDIR}/docs/index.html
20+
21+
test:
22+
export PYTHONPATH=${PYTHONPATH}
23+
coverage run demo/manage.py test concurrency --settings=${DJANGO_SETTINGS_MODULE}
24+
25+
coverage:
26+
export PYTHONPATH=${PYTHONPATH}
27+
coverage run demo/manage.py test concurrency --settings=${DJANGO_SETTINGS_MODULE}
28+
coverage report
29+
30+
clean:
31+
rm -fr ${BUILDDIR} dist *.egg-info .coverage
32+
find concurrency/locale -name django.mo | xargs rm -f
33+
34+
.PHONY: docs

README.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,17 @@ Django Concurrency
77
:target: http://travis-ci.org/saxix/django-concurrency/
88

99

10-
django-concurrency is a optimistic locking library for Django 1.4.
10+
.. image:: https://coveralls.io/repos/saxix/django-concurrency/badge.png
11+
:target: https://coveralls.io/r/saxix/django-concurrency
12+
13+
.. image:: https://pypip.in/v/django-concurrency/badge.png
14+
:target: https://crate.io/packages/django-concurrency/
15+
16+
.. image:: https://pypip.in/d/django-concurrency/badge.png
17+
:target: https://crate.io/packages/django-concurrency/
18+
19+
20+
django-concurrency is a optimistic locking library for Django. (requires version >=1.4)
1121

1222
It prevents users from doing concurrent editing in Django both from UI as from a
1323
django command.

concurrency/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import datetime
33
import os
44

5-
VERSION = __version__ = (0, 5, 0, 'final', 0)
5+
VERSION = __version__ = (0, 6, 0, 'beta', 0)
66
__author__ = 'sax'
77

88

@@ -38,12 +38,11 @@ def get_git_changeset():
3838
"""
3939
repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
4040
git_log = subprocess.Popen('git log --pretty=format:%ct --quiet -1 HEAD',
41-
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
42-
shell=True, cwd=repo_dir, universal_newlines=True)
41+
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
42+
shell=True, cwd=repo_dir, universal_newlines=True)
4343
timestamp = git_log.communicate()[0]
4444
try:
4545
timestamp = datetime.datetime.utcfromtimestamp(int(timestamp))
4646
except ValueError:
4747
return None
4848
return timestamp.strftime('%Y%m%d%H%M%S')
49-

0 commit comments

Comments
 (0)