Skip to content

Commit 8987cfd

Browse files
committed
Suppress warning from cryptography about deprecated Python 3.8 support
Short-term solution for <#522>. Similar to previous warning suppression added in <3977fee> Cryptography 48.0.0, which has not been released yet, will drop support for Python 3.8,¹ so we should also drop support for 3.8 soon. ¹ <https://cryptography.io/en/latest/changelog/#v48-0-0>
1 parent 9665127 commit 8987cfd

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

nextstrain/cli/authn/session.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
Authentication sessions.
33
"""
44
import boto3
5-
import jwt
6-
import jwt.exceptions
5+
import warnings
6+
7+
# Ignore noisy warning from cryptography 47.0.0 about deprecated support for Python 3.8
8+
with warnings.catch_warnings():
9+
warnings.filterwarnings(
10+
"ignore",
11+
message = "Python 3\\.8 is no longer supported by the Python core team and support for it is deprecated",
12+
category = UserWarning
13+
)
14+
import jwt
15+
import jwt.exceptions
16+
717
import secrets
818

919
from base64 import b64encode

0 commit comments

Comments
 (0)