diff --git a/edx_ace/channel/push_notification.py b/edx_ace/channel/push_notification.py index aec9142d..312dac4a 100644 --- a/edx_ace/channel/push_notification.py +++ b/edx_ace/channel/push_notification.py @@ -45,7 +45,7 @@ def deliver(self, message: Message, rendered_message: RenderedPushNotification) """ device_tokens = self.get_user_device_tokens(message.recipient.lms_user_id) if not device_tokens: - LOG.info(f'Recipient {message.recipient.email_address} has no push token. Skipping push notification.') + LOG.info('Recipient %s has no push token. Skipping push notification.', message.recipient.email_address) return for token in device_tokens: @@ -69,8 +69,8 @@ def send_message(self, message: Message, token: str, rendered_message: RenderedP try: send_message(token, message, settings.FCM_APP_NAME) except Exception as e: - LOG.exception(f'Failed to send push notification to {token}') - raise FatalChannelDeliveryError(f'Failed to send push notification to {token}') + LOG.exception(f'Failed to send push notification to %s', token) + raise FatalChannelDeliveryError(f'Failed to send push notification to {token}') from e @staticmethod def collect_apns_config(notification_data: dict) -> APNSConfig: diff --git a/requirements/base.in b/requirements/base.in index 5d1959fe..f7cf00e8 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -9,5 +9,4 @@ six stevedore>=1.10.0 firebase-admin==6.5.0 - --e git+https://github.com/jazzband/django-push-notifications.git@0f7918136b5e6a9aec83d6513aad5b0f12143a9f#egg=django_push_notifications +django-push-notifications==3.1.0 diff --git a/requirements/ci.txt b/requirements/ci.txt index ed41257f..0e9d0fbb 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -12,11 +12,11 @@ colorama==0.4.6 # via tox distlib==0.3.8 # via virtualenv -filelock==3.14.0 +filelock==3.15.3 # via # tox # virtualenv -packaging==24.0 +packaging==24.1 # via # pyproject-api # tox @@ -28,7 +28,7 @@ pluggy==1.5.0 # via tox pyproject-api==1.6.1 # via tox -tox==4.15.0 +tox==4.15.1 # via -r requirements/ci.in virtualenv==20.26.2 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index ebd9be0d..c106406d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,8 +4,6 @@ # # make upgrade # --e git+https://github.com/jazzband/django-push-notifications.git@0f7918136b5e6a9aec83d6513aad5b0f12143a9f#egg=django_push_notifications - # via -r requirements/base.in asgiref==3.8.1 # via django astroid==3.2.2 @@ -22,7 +20,7 @@ cachetools==5.3.3 # via # google-auth # tox -certifi==2024.2.2 +certifi==2024.6.2 # via requests cffi==1.16.0 # via cryptography @@ -44,7 +42,7 @@ code-annotations==1.8.0 # via edx-lint colorama==0.4.6 # via tox -cryptography==42.0.7 +cryptography==42.0.8 # via pyjwt diff-cover==9.0.0 # via -r requirements/dev.in @@ -58,6 +56,8 @@ django==4.2.13 # -r requirements/base.in # django-push-notifications # edx-i18n-tools +django-push-notifications==3.1.0 + # via -r requirements/base.in docutils==0.21.2 # via readme-renderer edx-i18n-tools==1.6.0 @@ -66,7 +66,7 @@ edx-lint==5.3.6 # via # -r requirements/dev.in # -r requirements/quality.in -filelock==3.14.0 +filelock==3.15.3 # via # tox # virtualenv @@ -79,9 +79,9 @@ google-api-core[grpc]==2.19.0 # google-cloud-core # google-cloud-firestore # google-cloud-storage -google-api-python-client==2.129.0 +google-api-python-client==2.134.0 # via firebase-admin -google-auth==2.29.0 +google-auth==2.30.0 # via # google-api-core # google-api-python-client @@ -97,19 +97,19 @@ google-cloud-core==2.4.1 # google-cloud-storage google-cloud-firestore==2.16.0 # via firebase-admin -google-cloud-storage==2.16.0 +google-cloud-storage==2.17.0 # via firebase-admin google-crc32c==1.5.0 # via # google-cloud-storage # google-resumable-media -google-resumable-media==2.7.0 +google-resumable-media==2.7.1 # via google-cloud-storage -googleapis-common-protos==1.63.0 +googleapis-common-protos==1.63.1 # via # google-api-core # grpcio-status -grpcio==1.63.0 +grpcio==1.64.1 # via # google-api-core # grpcio-status @@ -155,7 +155,7 @@ mccabe==0.7.0 # via pylint mdurl==0.1.2 # via markdown-it-py -more-itertools==10.2.0 +more-itertools==10.3.0 # via # jaraco-classes # jaraco-functools @@ -163,7 +163,7 @@ msgpack==1.0.8 # via cachecontrol nh3==0.2.17 # via readme-renderer -packaging==24.0 +packaging==24.1 # via # build # pyproject-api @@ -174,7 +174,7 @@ pbr==6.0.0 # via stevedore pip-tools==7.4.1 # via -r requirements/dev.in -pkginfo==1.10.0 +pkginfo==1.11.1 # via twine platformdirs==4.2.2 # via @@ -187,7 +187,7 @@ pluggy==1.5.0 # tox polib==1.2.0 # via edx-i18n-tools -proto-plus==1.23.0 +proto-plus==1.24.0 # via # google-api-core # google-cloud-firestore @@ -204,7 +204,7 @@ pyasn1==0.6.0 # rsa pyasn1-modules==0.4.0 # via google-auth -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via -r requirements/quality.in pycparser==2.22 # via cffi @@ -217,7 +217,7 @@ pygments==2.18.0 # rich pyjwt[crypto]==2.8.0 # via firebase-admin -pylint==3.2.2 +pylint==3.2.3 # via # edx-lint # pylint-celery @@ -249,7 +249,7 @@ pyyaml==6.0.1 # edx-i18n-tools readme-renderer==43.0 # via twine -requests==2.31.0 +requests==2.32.3 # via # cachecontrol # google-api-core @@ -286,13 +286,13 @@ text-unidecode==1.3 # via python-slugify tomlkit==0.12.5 # via pylint -tox==4.15.0 +tox==4.15.1 # via -r requirements/dev.in twine==5.1.0 # via -r requirements/dev.in uritemplate==4.1.1 # via google-api-python-client -urllib3==2.2.1 +urllib3==2.2.2 # via # requests # twine @@ -302,7 +302,7 @@ wheel==0.43.0 # via # -r requirements/dev.in # pip-tools -zipp==3.17.0 +zipp==3.19.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/doc.txt b/requirements/doc.txt index 9089f194..782bbb4f 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -4,8 +4,6 @@ # # make upgrade # --e git+https://github.com/jazzband/django-push-notifications.git@0f7918136b5e6a9aec83d6513aad5b0f12143a9f#egg=django_push_notifications - # via -r requirements/base.in accessible-pygments==0.0.5 # via pydata-sphinx-theme alabaster==0.7.16 @@ -24,19 +22,21 @@ cachecontrol==0.14.0 # via firebase-admin cachetools==5.3.3 # via google-auth -certifi==2024.2.2 +certifi==2024.6.2 # via requests cffi==1.16.0 # via cryptography charset-normalizer==3.3.2 # via requests -cryptography==42.0.7 +cryptography==42.0.8 # via pyjwt django==4.2.13 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # django-push-notifications +django-push-notifications==3.1.0 + # via -r requirements/base.in doc8==1.1.1 # via -r requirements/doc.in docutils==0.20.1 @@ -55,9 +55,9 @@ google-api-core[grpc]==2.19.0 # google-cloud-core # google-cloud-firestore # google-cloud-storage -google-api-python-client==2.129.0 +google-api-python-client==2.134.0 # via firebase-admin -google-auth==2.29.0 +google-auth==2.30.0 # via # google-api-core # google-api-python-client @@ -73,19 +73,19 @@ google-cloud-core==2.4.1 # google-cloud-storage google-cloud-firestore==2.16.0 # via firebase-admin -google-cloud-storage==2.16.0 +google-cloud-storage==2.17.0 # via firebase-admin google-crc32c==1.5.0 # via # google-cloud-storage # google-resumable-media -google-resumable-media==2.7.0 +google-resumable-media==2.7.1 # via google-cloud-storage -googleapis-common-protos==1.63.0 +googleapis-common-protos==1.63.1 # via # google-api-core # grpcio-status -grpcio==1.63.0 +grpcio==1.64.1 # via # google-api-core # grpcio-status @@ -119,7 +119,7 @@ markupsafe==2.1.5 # via jinja2 mdurl==0.1.2 # via markdown-it-py -more-itertools==10.2.0 +more-itertools==10.3.0 # via # jaraco-classes # jaraco-functools @@ -127,15 +127,15 @@ msgpack==1.0.8 # via cachecontrol nh3==0.2.17 # via readme-renderer -packaging==24.0 +packaging==24.1 # via # pydata-sphinx-theme # sphinx pbr==6.0.0 # via stevedore -pkginfo==1.10.0 +pkginfo==1.11.1 # via twine -proto-plus==1.23.0 +proto-plus==1.24.0 # via # google-api-core # google-cloud-firestore @@ -154,7 +154,7 @@ pyasn1-modules==0.4.0 # via google-auth pycparser==2.22 # via cffi -pydata-sphinx-theme==0.15.2 +pydata-sphinx-theme==0.15.3 # via sphinx-book-theme pygments==2.18.0 # via @@ -174,7 +174,7 @@ readme-renderer==43.0 # via # -r requirements/doc.in # twine -requests==2.31.0 +requests==2.32.3 # via # cachecontrol # google-api-core @@ -210,7 +210,7 @@ sphinx==7.3.7 # -r requirements/doc.in # pydata-sphinx-theme # sphinx-book-theme -sphinx-book-theme==1.1.2 +sphinx-book-theme==1.1.3 # via -r requirements/doc.in sphinxcontrib-applehelp==1.0.8 # via sphinx @@ -232,13 +232,13 @@ stevedore==5.2.0 # doc8 twine==5.1.0 # via -r requirements/doc.in -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via pydata-sphinx-theme uritemplate==4.1.1 # via google-api-python-client -urllib3==2.2.1 +urllib3==2.2.2 # via # requests # twine -zipp==3.17.0 +zipp==3.19.2 # via importlib-metadata diff --git a/requirements/pip-tools.txt b/requirements/pip-tools.txt index 0adf54ba..c62445a3 100644 --- a/requirements/pip-tools.txt +++ b/requirements/pip-tools.txt @@ -8,7 +8,7 @@ build==1.2.1 # via pip-tools click==8.1.7 # via pip-tools -packaging==24.0 +packaging==24.1 # via build pip-tools==7.4.1 # via -r requirements/pip-tools.in diff --git a/requirements/pip.txt b/requirements/pip.txt index 8ed3e673..78b740a4 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -8,7 +8,7 @@ wheel==0.43.0 # via -r requirements/pip.in # The following packages are considered to be unsafe in a requirements file: -pip==24.0 +pip==24.1 # via -r requirements/pip.in -setuptools==69.5.1 +setuptools==70.1.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index 1b74fb2e..d5cbb0fa 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -35,11 +35,11 @@ pbr==6.0.0 # via stevedore platformdirs==4.2.2 # via pylint -pycodestyle==2.11.1 +pycodestyle==2.12.0 # via -r requirements/quality.in pydocstyle==6.3.0 # via -r requirements/quality.in -pylint==3.2.2 +pylint==3.2.3 # via # edx-lint # pylint-celery diff --git a/requirements/test.txt b/requirements/test.txt index df92650d..f84b8af2 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,8 +4,6 @@ # # make upgrade # --e git+https://github.com/jazzband/django-push-notifications.git@0f7918136b5e6a9aec83d6513aad5b0f12143a9f#egg=django_push_notifications - # via -r requirements/base.in asgiref==3.8.1 # via django attrs==23.2.0 @@ -16,15 +14,15 @@ cachecontrol==0.14.0 # via firebase-admin cachetools==5.3.3 # via google-auth -certifi==2024.2.2 +certifi==2024.6.2 # via requests cffi==1.16.0 # via cryptography charset-normalizer==3.3.2 # via requests -coverage[toml]==7.5.1 +coverage[toml]==7.5.3 # via pytest-cov -cryptography==42.0.7 +cryptography==42.0.8 # via pyjwt ddt==1.7.2 # via -r requirements/test.in @@ -32,6 +30,8 @@ ddt==1.7.2 # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in # django-push-notifications +django-push-notifications==3.1.0 + # via -r requirements/base.in firebase-admin==6.5.0 # via -r requirements/base.in google-api-core[grpc]==2.19.0 @@ -41,9 +41,9 @@ google-api-core[grpc]==2.19.0 # google-cloud-core # google-cloud-firestore # google-cloud-storage -google-api-python-client==2.129.0 +google-api-python-client==2.134.0 # via firebase-admin -google-auth==2.29.0 +google-auth==2.30.0 # via # google-api-core # google-api-python-client @@ -59,19 +59,19 @@ google-cloud-core==2.4.1 # google-cloud-storage google-cloud-firestore==2.16.0 # via firebase-admin -google-cloud-storage==2.16.0 +google-cloud-storage==2.17.0 # via firebase-admin google-crc32c==1.5.0 # via # google-cloud-storage # google-resumable-media -google-resumable-media==2.7.0 +google-resumable-media==2.7.1 # via google-cloud-storage -googleapis-common-protos==1.63.0 +googleapis-common-protos==1.63.1 # via # google-api-core # grpcio-status -grpcio==1.63.0 +grpcio==1.64.1 # via # google-api-core # grpcio-status @@ -81,7 +81,7 @@ httplib2==0.22.0 # via # google-api-python-client # google-auth-httplib2 -hypothesis[pytz]==6.102.4 +hypothesis[pytz]==6.103.2 # via # -r requirements/test.in # hypothesis-pytest @@ -97,7 +97,7 @@ mock==5.1.0 # via -r requirements/test.in msgpack==1.0.8 # via cachecontrol -packaging==24.0 +packaging==24.1 # via # pudb # pytest @@ -107,7 +107,7 @@ pbr==6.0.0 # via stevedore pluggy==1.5.0 # via pytest -proto-plus==1.23.0 +proto-plus==1.24.0 # via # google-api-core # google-cloud-firestore @@ -134,7 +134,7 @@ pyjwt[crypto]==2.8.0 # via firebase-admin pyparsing==3.1.2 # via httplib2 -pytest==8.2.1 +pytest==8.2.2 # via # hypothesis-pytest # pytest-cov @@ -150,7 +150,7 @@ python-dateutil==2.9.0.post0 # via -r requirements/base.in pytz==2024.1 # via hypothesis -requests==2.31.0 +requests==2.32.3 # via # cachecontrol # google-api-core @@ -172,13 +172,13 @@ sqlparse==0.5.0 # via django stevedore==5.2.0 # via -r requirements/base.in -typing-extensions==4.11.0 +typing-extensions==4.12.2 # via urwid uritemplate==4.1.1 # via google-api-python-client -urllib3==2.2.1 +urllib3==2.2.2 # via requests -urwid==2.6.12 +urwid==2.6.14 # via # pudb # urwid-readline diff --git a/setup.py b/setup.py index 6d4ed5c0..fa87d5fb 100644 --- a/setup.py +++ b/setup.py @@ -113,7 +113,7 @@ def is_requirement(line): install_requires=load_requirements('requirements/base.in'), extras_require={ 'sailthru': ["sailthru-client>2.2,<2.3"], - 'push_notifications': ["django-push-notifications[FCM]>3.0.2"] + 'push_notifications': ["django-push-notifications[FCM]>=3.1.0"] }, license="AGPL 3.0", zip_safe=False,