Skip to content

Commit 064c497

Browse files
Joffrey MANDERPr0Ger
authored andcommitted
apns2.credentials: since version 2.0.0 pyJWT encode method return str
1 parent eecfbcb commit 064c497

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apns2/credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _get_or_create_topic_token(self) -> str:
8787
}
8888
jwt_token = jwt.encode(token_dict, self.__auth_key,
8989
algorithm=self.__encryption_algorithm,
90-
headers=headers).decode('ascii')
90+
headers=headers)
9191

9292
# Cache JWT token for later use. One JWT token per connection.
9393
# https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/establishing_a_token-based_connection_to_apns

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
packages=['apns2'],
99
install_requires=[
1010
'hyper>=0.7',
11-
'PyJWT>=1.4.0,<2.0.0',
11+
'PyJWT>=2.0.0',
1212
'cryptography>=1.7.2',
1313
],
1414
extras_require={

0 commit comments

Comments
 (0)