forked from pool/python-apns2
Accepting request 875490 from home:jayvdb:branches:devel:languages:python
- Add pr_122.patch to fix builds OBS-URL: https://build.opensuse.org/request/show/875490 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-apns2?expand=0&rev=5
This commit is contained in:
37
pr_122.patch
Normal file
37
pr_122.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From 62793cb0eff591bb091d349177a7028bf6f0f6bc Mon Sep 17 00:00:00 2001
|
||||
From: Joffrey MANDER <joffrey.mander@polyconseil.fr>
|
||||
Date: Tue, 29 Dec 2020 10:41:56 +0100
|
||||
Subject: [PATCH 1/2] apns2.credentials: since version 2.0.0 pyJWT encode
|
||||
method return str
|
||||
|
||||
---
|
||||
apns2/credentials.py | 2 +-
|
||||
setup.py | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/apns2/credentials.py b/apns2/credentials.py
|
||||
index 655893f..028093e 100644
|
||||
--- a/apns2/credentials.py
|
||||
+++ b/apns2/credentials.py
|
||||
@@ -87,7 +87,7 @@ def _get_or_create_topic_token(self) -> str:
|
||||
}
|
||||
jwt_token = jwt.encode(token_dict, self.__auth_key,
|
||||
algorithm=self.__encryption_algorithm,
|
||||
- headers=headers).decode('ascii')
|
||||
+ headers=headers)
|
||||
|
||||
# Cache JWT token for later use. One JWT token per connection.
|
||||
# https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns
|
||||
diff --git a/setup.py b/setup.py
|
||||
index 2d8fafb..5837572 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -8,7 +8,7 @@
|
||||
packages=['apns2'],
|
||||
install_requires=[
|
||||
'hyper>=0.7',
|
||||
- 'PyJWT>=1.4.0,<2.0.0',
|
||||
+ 'PyJWT>=2.0.0',
|
||||
'cryptography>=1.7.2',
|
||||
],
|
||||
extras_require={
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 26 15:42:17 UTC 2021 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Add pr_122.patch to fix builds
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 26 14:26:56 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
|
||||
@@ -26,6 +26,8 @@ License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/Pr0Ger/PyAPNs2
|
||||
Source0: https://files.pythonhosted.org/packages/source/a/apns2/apns2-%{version}.tar.gz
|
||||
# Subset of https://github.com/Pr0Ger/PyAPNs2/pull/122.patch
|
||||
Patch0: pr_122.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
|
||||
Reference in New Issue
Block a user