summaryrefslogtreecommitdiff
path: root/jwt/api_jwt.py
diff options
context:
space:
mode:
Diffstat (limited to 'jwt/api_jwt.py')
-rw-r--r--jwt/api_jwt.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/jwt/api_jwt.py b/jwt/api_jwt.py
index 5664949..d85f6e8 100644
--- a/jwt/api_jwt.py
+++ b/jwt/api_jwt.py
@@ -3,7 +3,7 @@ from __future__ import annotations
import json
import warnings
from calendar import timegm
-from collections.abc import Iterable, Mapping
+from collections.abc import Iterable
from datetime import datetime, timedelta, timezone
from typing import Any, Dict, List, Optional, Type, Union
@@ -47,10 +47,10 @@ class PyJWT:
json_encoder: Optional[Type[json.JSONEncoder]] = None,
sort_headers: bool = True,
) -> str:
- # Check that we get a mapping
- if not isinstance(payload, Mapping):
+ # Check that we get a dict
+ if not isinstance(payload, dict):
raise TypeError(
- "Expecting a mapping object, as JWT only supports "
+ "Expecting a dict object, as JWT only supports "
"JSON objects as payloads."
)