Skip to content

Commit b8c483b

Browse files
committed
open 1.3 alpha
1 parent 88ecb87 commit b8c483b

37 files changed

+178
-109
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ coverage.xml
99
.cache
1010
notes.txt
1111
docs/build/
12+
__pycache__
1213
/dist
1314
/build
1415
/MANIFEST

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Release 1.3 (dev)
2+
-----------------
3+
* drop support for Python < 3.3
4+
* add support Django>1.10
5+
* change license
6+
7+
18
Release 1.2 (05 Apr 2016)
29
-------------------------
310
* better support for django 1.9 ( ``TemplateDoesNotExist`` is now in ``django.template.exceptions``

LICENSE

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
* Copyright (c) 2010, Stefano Apostolico ([email protected])
2-
* Dual licensed under the MIT or GPL Version 2 licenses.
1+
Copyright (c) 2010-2016, Stefano Apostolico ([email protected])
32

4-
Redistribution and use in source and binary forms, with or without modification,
5-
are permitted provided that the following conditions are met:
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
69

7-
1. Redistributions of source code must retain the above copyright notice,
8-
this list of conditions and the following disclaimer.
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
912

10-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
11-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
12-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
13-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
14-
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
15-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
16-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
17-
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
18-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
19-
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13+
Any use in a commercial product must be notified to the author by email
14+
indicating company name and product name
2015

16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

MANIFEST.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ include *.py
1010
exclude Makefile
1111
exclude .editorconfig
1212
exclude .tx
13+
exclude .pyc
1314

1415
recursive-exclude .tx *
16+
recursive-exclude __pycache__ *
17+
recursive-exclude . *.pyc
1518

1619
recursive-include docs *
1720
recursive-include src *

setup.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
#!/usr/bin/env python
2+
import imp
23
import os
34
import sys
4-
import imp
5-
from distutils import log
6-
from distutils.command.clean import clean as CleanCommand
7-
from distutils.dir_util import remove_tree
85

96
from setuptools import find_packages, setup
107
from setuptools.command.test import test as TestCommand
@@ -58,7 +55,7 @@ def run_tests(self):
5855
long_description=open('README.rst').read(),
5956
license='MIT License',
6057
keywords='django',
61-
setup_requires=['pytest-runner',],
58+
setup_requires=['pytest-runner', ],
6259
install_requires=install_requires,
6360
tests_require='django\n' + test_requires,
6461
extras_require={'test': test_requires,

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, 2, 0, 'final', 0)
8+
VERSION = __version__ = (1, 3, 0, 'alpha', 0)
99
NAME = 'django-concurrency'
1010

1111

src/concurrency/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from django.http import HttpResponse, HttpResponseRedirect
1717
from django.utils.encoding import force_text
1818
from django.utils.safestring import mark_safe
19-
from django.utils.translation import ugettext as _, ungettext
19+
from django.utils.translation import ungettext
2020

2121
from concurrency import core, forms
2222
from concurrency.api import get_revision_of_object

src/concurrency/management/commands/triggers.py

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from optparse import make_option
3-
42
from django.core.exceptions import ImproperlyConfigured
53
from django.core.management.base import BaseCommand
64
from django.db import connections
@@ -12,20 +10,37 @@
1210
class Command(BaseCommand):
1311
args = ''
1412
help = 'register Report classes and create one ReportConfiguration per each'
15-
requires_model_validation = False
16-
# requires_system_checks = False
17-
18-
option_list = BaseCommand.option_list + (
19-
make_option('-d', '--database',
20-
action='store',
21-
dest='database',
22-
default=None,
23-
help='limit to this database'),
24-
make_option('-t', '--trigger',
25-
action='store',
26-
dest='trigger',
27-
default=None,
28-
help='limit to this trigger name'))
13+
14+
requires_system_checks = False
15+
16+
def add_arguments(self, parser):
17+
"""
18+
Entry point for subclassed commands to add custom arguments.
19+
"""
20+
subparsers = parser.add_subparsers(help='sub-command help',
21+
dest='command')
22+
23+
subparsers.add_parser('list',
24+
cmd=parser,
25+
help="command_a help")
26+
subparsers.add_parser('drop',
27+
cmd=parser,
28+
help="command_a help")
29+
subparsers.add_parser('create',
30+
cmd=parser,
31+
help="command_a help")
32+
33+
parser.add_argument('-d', '--database',
34+
action='store',
35+
dest='database',
36+
default=None,
37+
help='limit to this database')
38+
39+
parser.add_argument('-t', '--trigger',
40+
action='store',
41+
dest='trigger',
42+
default=None,
43+
help='limit to this trigger name')
2944

3045
def _list(self, databases):
3146
for alias, triggers in get_triggers(databases).items():
@@ -34,7 +49,9 @@ def _list(self, databases):
3449
self.stdout.write(" {}".format(trigger))
3550
self.stdout.write('')
3651

37-
def handle(self, cmd='list', *args, **options):
52+
def handle(self, *args, **options):
53+
54+
cmd = options['command']
3855
database = options['database']
3956
if database is None:
4057
databases = [alias for alias in connections]

tests/conftest.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1+
import os
2+
import platform
13
import sys
4+
25
import django
6+
37
import pytest
48

9+
py_impl = getattr(platform, 'python_implementation', lambda: None)
10+
PYPY = py_impl() == 'PyPy'
11+
PURE_PYTHON = os.environ.get('PURE_PYTHON', False)
12+
513
windows = pytest.mark.skipif(sys.platform != 'win32', reason="requires windows")
614

715
win32only = pytest.mark.skipif("sys.platform != 'win32'")
816

9-
skipIfDjangoVersion = lambda v: pytest.mark.skipif("django.VERSION[:2]>={}".format(v),
10-
reason="Skip if django>={}".format(v))
17+
skippypy = pytest.mark.skipif(PYPY, reason='skip on pypy')
18+
19+
# skipIfDjangoVersion = lambda v: pytest.mark.skipif("django.VERSION[:2]>={}".format(v),
20+
# reason="Skip if django>={}".format(v))
1121

1222

1323
def pytest_configure():

tests/demoapp/demo/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
from django.contrib import admin
44
from django.contrib.admin.sites import NotRegistered
55

6-
from concurrency.admin import ConcurrentModelAdmin
7-
from concurrency.api import disable_concurrency
8-
96
from demo.models import * # noqa
107
from demo.models import (
118
ListEditableConcurrentModel, NoActionsConcurrentModel, ReversionConcurrentModel
129
)
1310

11+
from concurrency.admin import ConcurrentModelAdmin
12+
from concurrency.api import disable_concurrency
13+
1414
try:
1515
from reversion import VersionAdmin
1616
except ImportError:

0 commit comments

Comments
 (0)