Skip to content

Commit

Permalink
Django 3.0 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
kilgoretrout1985 committed Dec 10, 2019
1 parent fec93cd commit 8ce69d3
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.7.7:

- Added Django 3.0 support.
- Dropped Django 2.1 support.
- Tested in Python 3.8.
- Added six as a dependency to support Django 1.11 on Python 2.7 and Django 3.0 simultaneously (https://docs.djangoproject.com/en/3.0/releases/3.0/#removed-private-python-2-compatibility-apis).

1.7.6:

- Reassembled pypi package because of small but important change in pywebpush library it depends on (Google GCM endpoint, which will stop working on May 29th, replaced with FCM endpoint).
Expand Down
2 changes: 1 addition & 1 deletion push/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from __future__ import unicode_literals, absolute_import, division, print_function

import re
from django.utils.six.moves import urllib
from six.moves import urllib
from datetime import timedelta

from PIL import Image
Expand Down
4 changes: 2 additions & 2 deletions push/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pytz

from django.utils.six.moves.urllib.parse import urlparse, urlunparse, parse_qs,\
from six.moves.urllib.parse import urlparse, urlunparse, parse_qs,\
urlencode
import json
from datetime import timedelta
Expand All @@ -16,7 +16,7 @@
from django.core.exceptions import ValidationError
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import python_2_unicode_compatible
from six import python_2_unicode_compatible

from commonstuff.models_base import ModelWith2Images

Expand Down
2 changes: 1 addition & 1 deletion push/templates/push/_head_include.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load staticfiles i18n push_settings %}
{% load static i18n push_settings %}

<link rel="manifest" href="{% url 'push_manifest_json' %}" />

Expand Down
2 changes: 1 addition & 1 deletion push/templates/push/_info_disable_txt.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load i18n staticfiles %}
{% load i18n static %}


<p>{% blocktrans %}Select a browser in which you receive notifications
Expand Down
4 changes: 2 additions & 2 deletions push/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from django.urls import reverse
from django.conf import settings
from django.utils import translation, timezone
from django.utils.six import StringIO
from django.utils.six.moves.urllib.parse import urlsplit, urlunsplit
from six import StringIO
from six.moves.urllib.parse import urlsplit, urlunsplit
from django.contrib.sites.models import Site
#from django.contrib.auth import get_user_model
from django.core.management import call_command
Expand Down
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setuptools.setup(
name='django_infopush',
version='1.7.6',
version='1.7.7',
packages=setuptools.find_packages(), # ['push'],
include_package_data=True,
license='MIT',
Expand All @@ -27,6 +27,7 @@
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
Expand All @@ -40,10 +41,14 @@
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
install_requires=[
'Django>=1.11,<2.3',
'django-commonstuff>=0.8.8',
'Django>=1.11,<3.1',
'django-commonstuff>=0.8.10',
'pytz>=2018.3',
'Pillow>=4.3.0', # for dimensions on image upload
'pywebpush>=1.9.3', # payload encryption
# for simultaneous support of Django 1.11 on Python 2.7 and Django 3.0
# remove six dependency as soon as Django 1.11 and Python 2.7 both end
# their lifecycle
'six>=1.12.0',
]
)
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[tox]
envlist =
{py27}-django{111}
{py36}-django{111,22}
{py37}-django{111,22}
{py38}-django{111,22}
{py36}-django{111,22,30}
{py37}-django{111,22,30}
{py38}-django{111,22,30}

[testenv]
changedir = djangosample
Expand All @@ -17,3 +17,4 @@ deps =
psycopg2-binary
django111: Django>=1.11,<2.0
django22: Django>=2.2,<2.3
django30: Django>=3.0,<3.1

0 comments on commit 8ce69d3

Please sign in to comment.