fix!: drop support for Python 2.7 (#778)
Drop use of 'six' wrapper library.
Drop 'u"' prefixes.
Drop support for app_engine 'classic' mode (Python 2.7-only).
Release-As: 2.0.0b1
Closes #777.
diff --git a/tests/test_jwt.py b/tests/test_jwt.py
index 39c45bd..0dd7fa9 100644
--- a/tests/test_jwt.py
+++ b/tests/test_jwt.py
@@ -258,9 +258,9 @@
def test_decode_unknown_alg():
- headers = json.dumps({u"kid": u"1", u"alg": u"fakealg"})
+ headers = json.dumps({"kid": "1", "alg": "fakealg"})
token = b".".join(
- map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, u"{}", u"sig"])
+ map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, "{}", "sig"])
)
with pytest.raises(ValueError) as excinfo:
@@ -270,9 +270,9 @@
def test_decode_missing_crytography_alg(monkeypatch):
monkeypatch.delitem(jwt._ALGORITHM_TO_VERIFIER_CLASS, "ES256")
- headers = json.dumps({u"kid": u"1", u"alg": u"ES256"})
+ headers = json.dumps({"kid": "1", "alg": "ES256"})
token = b".".join(
- map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, u"{}", u"sig"])
+ map(lambda seg: base64.b64encode(seg.encode("utf-8")), [headers, "{}", "sig"])
)
with pytest.raises(ValueError) as excinfo: