Skip to content

Commit 63fcad9

Browse files
committed
chore: upgrade dependencies
1 parent a3e2c35 commit 63fcad9

File tree

9 files changed

+23
-52
lines changed

9 files changed

+23
-52
lines changed

.pyup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
schedule: "every month"

HISTORY.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ History
66
------------------
77

88
* Adding schematics contrib type ChoicesEnumType.
9+
* Drop support for Django 1.6, 1.7, 1.8.
10+
911

1012

1113
0.5.3 (2019-02-06)

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Features
3838
* ``ChoicesEnum`` can define labels to be used in `choices` fields.
3939
* Django fields included: ``EnumCharField`` and ``EnumIntegerField``.
4040
* Support (tested) for Python 2.7, 3.4, 3.5, 3.6 and 3.7.
41-
* Support (tested) for Django 1.6.1 (with south), 1.7, 1.8, 1.9, 1.10, 1.11, 2.0 and 2.1.
41+
* Support (tested) for Django 1.9, 1.10, 1.11, 2.0 and 2.1.
4242

4343
--------------
4444
Usage examples
@@ -67,7 +67,7 @@ Example with ``Colors``:
6767
6868
6969
Comparison
70-
-----------
70+
----------
7171

7272
All `Enum` types can be compared against their values:
7373

choicesenum/django/fields.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,6 @@ def deconstruct(self):
123123
del kwargs["choices"]
124124
return name, path, args, kwargs
125125

126-
def south_field_triple(self): # pragma: no cover
127-
"Returns a suitable description of this field for South (Django 1.6)"
128-
from south.modelsinspector import introspector
129-
path = "%s.%s" % (self.__class__.__module__, self.__class__.__name__)
130-
args, kwargs = introspector(self)
131-
if 'default' in kwargs and self.default:
132-
kwargs['default'] = repr(self.to_python(self.default).value)
133-
if self.enum:
134-
kwargs['enum'] = repr(self.enum._import_path())
135-
return (str(path), args, kwargs)
136-
137126

138127
def get_base_classes(cls_type): # pragma: no cover, already covered by tox matrix
139128
if hasattr(models, 'SubfieldBase'):

choicesenum/schematics/types.py

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

44
from choicesenum import ChoicesEnum
5-
from schematics.types import BaseType, ValidationError
5+
from schematics.types import BaseType
6+
from schematics.exceptions import ValidationError
67

78

89
class ChoicesEnumType(BaseType):

requirements_dev.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# test
22
-r requirements_test.txt
3-
pytest-django==3.4.4
4-
Django==2.1.5
5-
tox==3.6.1
3+
Django==2.2.5
4+
tox==3.14.0
65

76
# docs
8-
Sphinx==1.8.3
7+
Sphinx==2.2.0
98

109
# build / deploy
11-
PyYAML==4.2b1
12-
wheel==0.32.3
10+
PyYAML==5.1.2
11+
wheel==0.33.6
1312
bumpversion==0.5.3
14-
cryptography==2.4.2
15-
pip==18.1
13+
cryptography==2.7
14+
pip==19.2.3

requirements_test.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# test
2-
mock==2.0.0
3-
pytest==3.10.1
4-
pytest-cov==2.6.0
2+
mock==3.0.5
3+
pytest==4.6.5
4+
pytest-cov==2.7.1
5+
pytest-django==3.4.8
56
pytest-watch==4.2.0
67
pytest-sugar==0.9.2
7-
schematics==1.1.3
8+
schematics==2.1.0
9+
10+

tests/test_django_fields.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -120,23 +120,6 @@ def test_string_field_should_allow_assigning_values(color):
120120
assert instance2.color.display == enum_color.display
121121

122122

123-
@pytest.mark.skipif(django.VERSION[:2] > (1, 6), reason="requires Django 1.6 for south")
124-
def test_south_deconstruct_support(field_cls, enum_for_field_cls):
125-
default_enum = enum_for_field_cls.options()[0]
126-
field = field_cls(
127-
enum=enum_for_field_cls,
128-
default=default_enum,
129-
)
130-
assert field.south_field_triple() == (
131-
'choicesenum.django.fields.{}'.format(field_cls.__name__),
132-
[],
133-
{
134-
'enum': repr(enum_for_field_cls._import_path()),
135-
'default': repr(default_enum.value),
136-
},
137-
)
138-
139-
140123
def test_should_allow_enum_as_a_path_to_class(field_cls, enum_for_field_cls):
141124
# given
142125
import_path = enum_for_field_cls._import_path()

tox.ini

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
py{27}-django-{16,17,18,19,110,111}
3+
py{27}-django-{19,110,111}
44
py{34}-django-{110,111,20}
55
py{35,36,37}-django-{110,111,20,21}
66
py36-flake8
@@ -22,19 +22,12 @@ setenv =
2222
PYTHONPATH = {toxinidir}
2323
DJANGO_SETTINGS_MODULE = tests.settings
2424
deps =
25-
django-{18,19,110,111,20,21}: pytest-django==3.4.4
26-
django-16: Django==1.6.1
27-
django-16: pytest-django==2.9.1
28-
django-16: south==1.0.2
29-
django-17: Django>=1.7,<1.8
30-
django-17: pytest-django==3.1.2
31-
django-18: Django>=1.8,<1.9
25+
-r{toxinidir}/requirements_test.txt
3226
django-19: Django>=1.9,<1.10
3327
django-110: Django>=1.10,<1.11
3428
django-111: Django>=1.11,<1.12
3529
django-20: Django>=2.0,<2.1
3630
django-21: Django>=2.1,<2.2
37-
-r{toxinidir}/requirements_test.txt
3831
commands =
3932
pip install -U pip
4033
py.test --basetemp={envtmpdir} --cov

0 commit comments

Comments
 (0)