Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 4fb07b3

Browse files
authored
Merge pull request #157 from ambitioninc/develop
5.0.0
2 parents a745d9c + e902c8b commit 4fb07b3

File tree

10 files changed

+30
-37
lines changed

10 files changed

+30
-37
lines changed

.travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,15 @@ python:
88

99
env:
1010
matrix:
11-
- DJANGO=2.0
12-
- DJANGO=2.1
1311
- DJANGO=2.2
12+
- DJANGO=3.0
13+
- DJANGO=3.1
1414
- DJANGO=master
1515

1616
addons:
1717
postgresql: '9.6'
1818

1919
matrix:
20-
exclude:
21-
- { python: "3.7", env: DJANGO=2.0 }
22-
2320
include:
2421
- { python: "3.6", env: TOXENV=flake8 }
2522

MANIFEST.in

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
include README.md
22
include LICENSE
3+
recursive-include requirements *

entity/models.py

-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
from django.core.serializers.json import DjangoJSONEncoder
88
from django.db import models
99
from django.db.models import Count, Q
10-
from django.utils.encoding import python_2_unicode_compatible
1110
from python3_utils import compare_on_attr
1211
from six.moves import reduce
1312

@@ -27,7 +26,6 @@ def get_queryset(self):
2726
return super(ActiveEntityKindManager, self).get_queryset().filter(is_active=True)
2827

2928

30-
@python_2_unicode_compatible
3129
class EntityKind(BaseActivatableModel):
3230
"""
3331
A kind for an Entity that is useful for filtering based on different types of entities.
@@ -242,7 +240,6 @@ def get_queryset(self):
242240

243241

244242
@compare_on_attr()
245-
@python_2_unicode_compatible
246243
class Entity(BaseActivatableModel):
247244
"""
248245
Describes an entity and its relevant metadata. Also defines if the entity is active. Filtering functions

entity/tests/models.py

-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from django.db import models
2-
from django.utils.encoding import python_2_unicode_compatible
32

43
from entity.config import EntityConfig, register_entity
54
from entity.models import Entity
@@ -13,7 +12,6 @@ class Meta:
1312
objects = ManagerUtilsManager()
1413

1514

16-
@python_2_unicode_compatible
1715
class TeamGroup(BaseEntityModel):
1816
"""
1917
A grouping of teams.
@@ -24,7 +22,6 @@ def __str__(self):
2422
return self.name
2523

2624

27-
@python_2_unicode_compatible
2825
class Competitor(BaseEntityModel):
2926
"""
3027
An enclosing group for competitors
@@ -47,7 +44,6 @@ class Team(BaseEntityModel):
4744
team_group = models.ForeignKey(TeamGroup, null=True, on_delete=models.CASCADE)
4845

4946

50-
@python_2_unicode_compatible
5147
class Account(BaseEntityModel):
5248
"""
5349
An account entity model

entity/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.2.0'
1+
__version__ = '5.0.0'

release_notes.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
## Release Notes
22

3+
- 5.0.0:
4+
- Django 3.0, Django 3.1
5+
- Drop Django 2.0, 2.1 support
36
- 4.2.0:
47
- Python 3.7, Django 2.2
58
- 4.1.1:

requirements/requirements-testing.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
coverage==4.5.1
22
django-nose==1.4.5
3-
django-dynamic-fixture==2.0.0
3+
django-dynamic-fixture
44
mock==2.0.0
5-
psycopg2==2.7.7
5+
psycopg2>=2.7.7

requirements/requirements.txt

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Django>=2.2
2+
django-activatable-model>=2.0.0
3+
django-manager-utils>=2.0.0
4+
jsonfield>=0.9.20
5+
python3-utils>=0.3
6+
wrapt>=1.10.5

setup.py

+8-15
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,13 @@ def get_version():
1818
raise RuntimeError('Unable to find version string in {0}.'.format(VERSION_FILE))
1919

2020

21-
install_requires = [
22-
'Django>=2.0,<3.0',
23-
'django-activatable-model>=1.2.1',
24-
'django-manager-utils>=1.4.0',
25-
'jsonfield>=0.9.20',
26-
'python3-utils>=0.3',
27-
'wrapt>=1.10.5'
28-
]
29-
30-
tests_require = [
31-
'django-dynamic-fixture',
32-
'django-nose>=1.4',
33-
'mock>=1.0.1',
34-
'psycopg2',
35-
]
21+
def get_lines(file_path):
22+
return open(file_path, 'r').read().split('\n')
23+
24+
25+
install_requires = get_lines('requirements/requirements.txt')
26+
tests_require = get_lines('requirements/requirements-testing.txt')
27+
3628

3729
setup(
3830
name='django-entity',
@@ -48,6 +40,7 @@ def get_version():
4840
'Programming Language :: Python',
4941
'Programming Language :: Python :: 3.6',
5042
'Programming Language :: Python :: 3.7',
43+
'Programming Language :: Python :: 3.8',
5144
'Intended Audience :: Developers',
5245
'License :: OSI Approved :: MIT License',
5346
'Operating System :: OS Independent',

tox.ini

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[tox]
22
envlist =
33
flake8
4-
py{36}-django20
5-
py{36,37}-django21
64
py{36,37}-django22
5+
py{36,37}-django30
6+
py{36,37}-django31
77
py{36,37}-djangomaster
88

99
[testenv]
1010
setenv =
1111
DB = postgres
1212
deps =
13-
django20: Django>=2.0,<2.1
14-
django21: Django>=2.1,<2.2
15-
django22: Django>=2.2,<2.3
13+
django22: Django>=2.2,<3.0
14+
django30: Django>=3.0,<3.1
15+
django31: Django>=3.1,<3.2
1616
djangomaster: https://github.com/django/django/archive/master.tar.gz
1717
-rrequirements/requirements-testing.txt
1818
commands =
@@ -25,7 +25,7 @@ commands = flake8 entity
2525

2626
[travis:env]
2727
DJANGO =
28-
2.0: django20
29-
2.1: django21
3028
2.2: django22
29+
3.0: django30
30+
3.1: django31
3131
master: djangomaster

0 commit comments

Comments
 (0)