Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PyJWT to 2.3.0 #138

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

aureliendebord
Copy link

This way, we can use this client with the latest version of Django Rest Framework

Copy link

@sondrelg sondrelg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's important to note the difference in versioning for the requirements.txt and the setup.py. The first dictates what should be installed when running this project locally, the second specifies which versions of dependencies are compatible with this package.

@@ -22,7 +22,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools

REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT>=1.7.1,<2", "cryptography>=2.5", "nose>=1.3.7"]
REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT==2.3.0", "cryptography>=2.5", "nose>=1.3.7"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will require users to be on exactly version 2.3.0. I think a better option here is to specify between 2-3.

Suggested change
REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT==2.3.0", "cryptography>=2.5", "nose>=1.3.7"]
REQUIRES = ["urllib3 >= 1.15", "six >= 1.8.0", "certifi >= 14.05.14", "python-dateutil >= 2.5.3", "setuptools >= 21.0.0", "PyJWT>2,<3", "cryptography>=2.5", "nose>=1.3.7"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, the change on the return type of jwt.encode was introduced in 2.0.0 and it's the only thing that could be considered a breaking change in the scope of this project so I guess it'd be alright to loosen the requirement a little bit.

@Arti3DPlayer
Copy link

+1, can someone please update this lib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants