Demonware / jose

Python implementation of the Javascript Object Signing and Encryption (JOSE) framework (https://datatracker.ietf.org/wg/jose/charter/)
BSD 3-Clause "New" or "Revised" License
95 stars 34 forks source link

Python 3.5 SyntaxError: invalid syntax #24

Closed wobeng closed 7 years ago

wobeng commented 7 years ago
import jose

  File "/py/env35/local/lib/python3.5/site-packages/jose.py", line 546
    print decrypt(deserialize_compact(jwt), {'k':key},
                ^
SyntaxError: invalid syntax

Is this package compatible with python 3.5?

ParisMeuleman commented 7 years ago

Hi, I suppose you should use the python 3 branch

wobeng commented 7 years ago

Nice, Is this in the pip library? or I have to do git+https://github.com/Demonware/jose.git@python3?

ParisMeuleman commented 7 years ago

looking at https://pypi.python.org/pypi/jose/1.0.0 it seems the pip delivery is python 2 only. (mind you I'm no maintainer of this package)

wobeng commented 7 years ago

python 3 branch worked well. Thanks

Bulletninja commented 5 years ago

I had this issue because i put jose in my requirements.txt if you want to use jose and install it from pip directly (instead of using the github repo) you can install python-jose intead.