Skip to content

Commit

Permalink
Fix deprecations (mpdavis#316)
Browse files Browse the repository at this point in the history
* [fix] DeprecationWarning for import Mapping , Iterable from collections lib in files : jws.py , jwt.py

* fmt

---------

Co-authored-by: RaoufJabriSamsaIT <raouf.jabri@samsa-it.de>
  • Loading branch information
asherf and RaoufJabriSAMSA-IT authored May 3, 2023
1 parent b5cdc90 commit 4b0701b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion jose/jws.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import binascii
import json
from collections.abc import Iterable, Mapping

try:
from collections.abc import Iterable, Mapping
except ImportError:
from collections import Mapping, Iterable

from jose import jwk
from jose.backends.base import Key
Expand Down
6 changes: 5 additions & 1 deletion jose/jwt.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import json
from calendar import timegm
from collections.abc import Mapping

try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping
from datetime import datetime, timedelta

from jose import jws
Expand Down

0 comments on commit 4b0701b

Please sign in to comment.