jazzband / django-push-notifications

Send push notifications to mobile devices through GCM or APNS in Django.
MIT License
2.24k stars 609 forks source link

Errors when using python 3.(5/6/7/8) and djangorestframework 3.12.1 #590

Closed jamaalscarlett closed 3 years ago

jamaalscarlett commented 3 years ago

There seem to be some breaking changes introduced with drf 3.12.1

From travis-ci run for PR: https://github.com/jazzband/django-push-notifications/pull/589

________________ ERROR collecting tests/test_rest_framework.py _________________
ImportError while importing test module '/home/travis/build/jazzband/django-push-notifications/tests/test_rest_framework.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
.tox/py35-django111-apns030/lib/python3.5/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_rest_framework.py:3: in <module>
    from push_notifications.api.rest_framework import (
push_notifications/api/rest_framework.py:2: in <module>
    from rest_framework.fields import IntegerField
.tox/py35-django111-apns030/lib/python3.5/site-packages/rest_framework/fields.py:15: in <module>
    from django.core.validators import (
E   ImportError: cannot import name 'ProhibitNullCharactersValidator'
=========================== short test summary info ============================

The last successful test run for the master branch was using drf 3.11.0: https://travis-ci.org/github/jazzband/django-push-notifications/builds/711561117

jamaalscarlett commented 3 years ago

Tests are now passing