Skip to content

Cannot install alongside djangorestframework-simplejwt #459

@alastair

Description

@alastair

Hi,
I'm integrating workos in a project which already uses djangorestframework-simplejwt. With python 3.12 and pip 25, I am unable to install both packages together:

python -V
Python 3.12.0

pip -V
pip 25.1.1

pip install djangorestframework-simplejwt==5.5.0 workos==5.24.0

...

ERROR: Cannot install djangorestframework-simplejwt==5.5.0 and workos==5.24.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    djangorestframework-simplejwt 5.5.0 depends on pyjwt<2.10.0 and >=1.7.1
    workos 5.24.0 depends on PyJWT>=2.10.0; python_version > "3.8"

In jazzband/djangorestframework-simplejwt#843, drf-simplejwt pinned a lower version of pyjwt due to a change in the way that claims are stored. While annoying, I can understand the motivation for this.

I see that this package also has a specific set of version constraints, although I'm less clear as to the reason for this. In 4f777ef you added python version markers to explicitly pin a lower version of pyjwt when using python 3.8. This makes sense, as the most recent version of pyjwt no longer supports 3.8.

However, for versions of python greater than 3.8, you've explicitly indicated that pyjwt 2.10 or greater is required. If the only reason for this version limiting is to be able to install on python 3.8, and you do also support pyjwt 2.9 (in py 3.8) perhaps it makes sense to allow older versions of pyjwt even with newer versions of python, that is:

PyJWT>=2.9.0; python_version > "3.8"

I'm unsure if there are specific technical reasons in this library which make this not possible.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions