Test python 3.8 and Django 3.0

Aligns the doc specs to match tested versions
This commit is contained in:
Hameed Gifford 2020-01-19 01:18:25 -05:00
parent 0fba0345a7
commit 95c6a48108
No known key found for this signature in database
GPG key ID: 488194BBA70CF1E2
11 changed files with 39 additions and 43 deletions

View file

@ -1,16 +1,15 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
- "3.8"
env:
- DJANGO=1.7
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=1.10
- DJANGO=1.11
- DJANGO=2.0
- DJANGO=2.1
- DJANGO=2.2
- DJANGO=3.0
install:
# command to install dependencies
- "pip install coveralls"
@ -22,12 +21,8 @@ script:
- coverage run --branch --source=notifications manage.py test
matrix:
exclude:
- python: "2.7"
env: DJANGO=2.0
- python: "3.5"
env: DJANGO=1.7
- python: "3.6"
env: DJANGO=1.7
env: DJANGO=3.0
after_success:

View file

@ -28,8 +28,8 @@ Nomenclature of this specification is based on the Activity Streams Spec: `<http
Requirements
============
- Python 2.7, 3.4, 3.5, 3.6
- Django 1.7, 1.8, 1.9, 1.10, 1.11, 2.0
- Python 3.5, 3.6, 3.7, 3.8
- Django 1.11, 2.0, 2.1, 2.2, 3.0
Installation
============

View file

@ -11,3 +11,16 @@
__version__ = '1.4.0'
default_app_config = 'notifications.apps.Config' # pylint: disable=invalid-name
# patch jsonfield expectations until they actually update
def _patch_jsonfield_six():
import django
if django.VERSION >= (3,):
from django import utils
import six
utils.six = six
_patch_jsonfield_six()
del _patch_jsonfield_six

View file

@ -11,8 +11,6 @@ from django.core.exceptions import ImproperlyConfigured
from django.db import models
from django.db.models.query import QuerySet
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.utils.six import text_type
from jsonfield.fields import JSONField
from model_utils import Choices
@ -139,7 +137,6 @@ class NotificationQuerySet(models.query.QuerySet):
return qset.update(emailed=True)
@python_2_unicode_compatible
class AbstractNotification(models.Model):
"""
Action model describing the actor acting out a verb (on an optional
@ -290,7 +287,7 @@ def notify_handler(verb, **kwargs):
recipient=recipient,
actor_content_type=ContentType.objects.get_for_model(actor),
actor_object_id=actor.pk,
verb=text_type(verb),
verb=str(verb),
public=public,
description=description,
timestamp=timestamp,

View file

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings

View file

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations

View file

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import jsonfield.fields

View file

@ -1,6 +1,4 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils import timezone

View file

@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-05-04 15:20
from __future__ import unicode_literals
from django.db import migrations, models

View file

@ -29,6 +29,7 @@ setup(
'django>=1.7',
'django-model-utils>=2.0.3',
'jsonfield>=1.0.3',
'six', # for jsonfield on django 3.0 until it drops py2 compat
'pytz',
'swapper'
],
@ -55,18 +56,19 @@ setup(
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
'Framework :: Django :: 1.10',
'Framework :: Django :: 1.9',
'Framework :: Django :: 1.8',
'Framework :: Django :: 1.7',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Framework :: Django :: 2.1',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Utilities'
],
keywords='django notifications github action event stream',

15
tox.ini
View file

@ -1,18 +1,17 @@
# -- FILE: tox.ini
[tox]
envlist =
py{27,33,34}-django17
py{27,33,34,35,36}-django{18,19,110,111}
py{34,35,36}-django200
py{35,36,37,38}-django{111,20,21,22}
py{36,37,38}-django30
[testenv]
commands =
coverage run --branch --source=notifications manage.py test
deps =
coverage
django17: Django>=1.7,<1.8
django18: Django>=1.8,<1.9
django19: Django>=1.9,<1.10
django110: Django>=1.10,<1.11
django111: Django>=1.11,<2.0
django200: Django>=2.0,<3.0
django20: Django>=2.0,<2.1
django21: Django>=2.1,<2.2
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1
django30: six