Skip to content

Commit 875479b

Browse files
authored
Merge pull request #3 from loadsmart/support-python-3.6
Add support for python 3.6
2 parents 991393f + f06aab4 commit 875479b

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
python-version: [3.7, 3.8, 3.9]
18+
python-version: [3.6, 3.7, 3.8, 3.9]
1919

2020
steps:
2121
- uses: actions/checkout@v2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
'django-constance>=2,<3',
4646
'django-waffle>=2,<3',
4747
],
48-
python_requires='>=3.7',
48+
python_requires='>=3.6',
4949
extras_require=extras_require,
5050
packages=find_packages(exclude=['tests']),
5151
include_package_data=True,

tests/factories.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,16 @@
1-
from typing import Generic, TypeVar
2-
31
import factory
42
import waffle
53
from django.contrib.auth import get_user_model
64

7-
T = TypeVar("T")
85
FlagModel = waffle.get_waffle_flag_model()
96
UserModel = get_user_model()
107

118

12-
class BaseFactory(Generic[T], factory.django.DjangoModelFactory):
13-
"""This is a workaround to get type hints to play nice with factory boy."""
14-
15-
@classmethod
16-
def create(cls, **kwargs) -> T:
17-
return super().create(**kwargs)
18-
19-
20-
class FlagFactory(BaseFactory[FlagModel]):
9+
class FlagFactory(factory.django.DjangoModelFactory):
2110
class Meta:
2211
model = FlagModel
2312

2413

25-
class UserFactory(BaseFactory[UserModel]):
14+
class UserFactory(factory.django.DjangoModelFactory):
2615
class Meta:
2716
model = UserModel

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
[tox]
22
envlist=
3-
py{37,38,39}-dj22-drf310-tests
4-
py{37,38,39}-dj{22,31,32}-drf{311,312}-tests
3+
py{36,37,38,39}-dj22-drf310-tests
4+
py{36,37,38,39}-dj{22,31,32}-drf{311,312}-tests
55
py39-djmain-drf312-tests
66
docs
77
lint
88

99
; [gh-actions]
1010
; python=
11+
; 3.6: py36
1112
; 3.7: py37
1213
; 3.8: py38, docs, lint
1314
; 3.9: py39

0 commit comments

Comments
 (0)