Skip to content

Commit b07d934

Browse files
authored
Upgrading dependencies (#237)
* upgrade dependencies; mark compat code as no cover; new test matrix on readme * requirements: Upgrade Sphinx due to vulnerability issue * chore: Drop support for Python3.4
1 parent 463e60e commit b07d934

File tree

10 files changed

+29
-34
lines changed

10 files changed

+29
-34
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ target/
6565
# Editors
6666
*.sublime-*
6767
.idea/
68+
.vscode/

HISTORY.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
History
33
-------
44

5+
0.7.0 (not released)
6+
--------------------
7+
8+
* Add support Django 3.0 (tks @klette).
9+
* Drop support for Python 3.4.
10+
11+
512
0.6.0 (2019-09-05)
613
------------------
714

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Features
3737
* An ``ChoicesEnum`` that can be used to create constant groups.
3838
* ``ChoicesEnum`` can define labels to be used in `choices` fields.
3939
* Django fields included: ``EnumCharField`` and ``EnumIntegerField``.
40-
* Support (tested) for Python 2.7, 3.4, 3.5, 3.6 and 3.7.
41-
* Support (tested) for Django 1.9, 1.10, 1.11, 2.0 and 2.1.
40+
* Support (tested) for Python 2.7, 3.5, 3.6, 3.7 and 3.8.
41+
* Support (tested) for Django 1.9, 1.10, 1.11, 2.0, 2.1, 2.2 and 3.0.
4242

4343
--------------
4444
Usage examples

choicesenum/django/compat.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,11 @@ def __init__(self, field, model):
1515
self.field = field
1616
if django.VERSION < (2, 1): # pragma: no cover (Django < 2.1 compat)
1717
super(Creator, self).__init__(field.attname, model)
18-
elif django.VERSION < (3, 0):
18+
elif django.VERSION < (3, 0): # pragma: no cover (Django < 3.0 compat)
1919
super(Creator, self).__init__(field.attname)
2020
else: # pragma: no cover
2121
super(Creator, self).__init__(field)
2222

2323
def __set__(self, obj, value):
24-
if hasattr(self, 'field_name'):
25-
obj.__dict__[self.field_name] = self.field.to_python(value)
26-
else:
27-
obj.__dict__[self.field.attname] = self.field.to_python(value)
24+
field_name = getattr(self, 'field_name', self.field.attname)
25+
obj.__dict__[field_name] = self.field.to_python(value)

docs/index.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Welcome to Choices Enum's documentation!
2-
======================================
2+
========================================
33

44
Contents:
55

@@ -8,8 +8,6 @@ Contents:
88

99
readme
1010
installation
11-
usage
12-
modules
1311
contributing
1412
authors
1513
history

docs/usage.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

requirements_dev.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# test
22
-r requirements_test.txt
3-
Django==2.2.8
3+
Django==2.2.13
44
tox==3.14.0
55

66
# docs
7-
Sphinx==2.2.0
7+
Sphinx==3.0.4
88

99
# build / deploy
10-
PyYAML==5.1.2
11-
wheel==0.33.6
12-
bumpversion==0.5.3
13-
cryptography==2.7
14-
pip==19.2.3
10+
PyYAML==5.3.1
11+
wheel==0.34.2
12+
bumpversion==0.6.0
13+
cryptography==3.0
14+
pip==20.2

requirements_test.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# test
22
mock==3.0.5
3-
pytest==4.6.5
3+
pytest==4.6.9
44
pytest-cov==2.7.1
55
pytest-django==3.4.8
66
pytest-watch==4.2.0
7-
pytest-sugar==0.9.2
7+
pytest-sugar==0.9.4
88
schematics==2.1.0
99

1010

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@
3333
zip_safe=False,
3434
keywords='choicesenum',
3535
classifiers=[
36-
'Development Status :: 4 - Beta',
36+
'Development Status :: 5 - Production/Stable',
3737
'Intended Audience :: Developers',
3838
'License :: OSI Approved :: BSD License',
3939
'Natural Language :: English',
4040
"Programming Language :: Python :: 2",
4141
'Programming Language :: Python :: 2.7',
4242
'Programming Language :: Python :: 3',
43-
'Programming Language :: Python :: 3.4',
4443
'Programming Language :: Python :: 3.5',
4544
'Programming Language :: Python :: 3.6',
4645
'Programming Language :: Python :: 3.7',
46+
'Programming Language :: Python :: 3.8',
4747
],
4848
setup_requires=setup_requirements,
4949
)

tox.ini

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tox]
22
envlist =
33
py{27}-django-{19,110,111}
4-
py{34}-django-{110,111,20}
5-
py{35,36,37,38}-django-{110,111,20,21,22}
4+
py{35,36,37}-django-{111,20,21}
5+
py{35,36,37,38}-django-{22}
66
py{36,37,38}-django-{30}
7-
py36-flake8
7+
py38-flake8
88

99
[pytest]
1010
filterwarnings =
@@ -16,7 +16,6 @@ python =
1616
3.7: py37
1717
3.6: py36
1818
3.5: py35
19-
3.4: py34
2019
2.7: py27
2120

2221
[testenv]
@@ -41,10 +40,9 @@ basepython =
4140
py37: python3.7
4241
py36: python3.6
4342
py35: python3.5
44-
py34: python3.4
4543
py27: python2.7
4644

4745

48-
[testenv:py36-flake8]
46+
[testenv:py38-flake8]
4947
commands = flake8 choicesenum/ tests/
5048
deps = flake8

0 commit comments

Comments
 (0)