You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
itsdangerous.TimedJSONWebSignatureSerializer.dumps incorrect return type on python 3 #3081
On Python 3, the return value for itsdangerous.TimedJSONWebSignatureSerializer.dumps is bytes not str so I think the return type should be Union[bytes, str]
Python 3.7
>>> from itsdangerous import TimedJSONWebSignatureSerializer
>>> s = TimedJSONWebSignatureSerializer('test')
>>> test_obj = s.dumps({'foo': 'bar'})
>>> type(test_obj)
<class 'bytes'>
Python 2.7
>>> from itsdangerous import TimedJSONWebSignatureSerializer
>>> s = TimedJSONWebSignatureSerializer('test')
>>> test_obj = s.dumps({'foo': 'bar'})
>>> type(test_obj)
<type 'str'>
Activity