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

djangorestframework-jwt: fix build error #120957

Closed
wants to merge 1 commit into from

Conversation

critbase
Copy link
Contributor

@critbase critbase commented Apr 28, 2021

This package depends on an older version of 'pyjwt' than is packaged in
nixpkgs.

Motivation for this change

Currently, building djangorestframework-jwt errors out:

ERROR: Could not find a version that satisfies the requirement PyJWT<2.0.0,>=1.5.2 (from djangorestframework-jwt)
ERROR: No matching distribution found for PyJWT<2.0.0,>=1.5.2
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

This package depends on an older version of 'pyjwt' than is packaged in
nixpkgs.
@r-rmcgibbo
Copy link

r-rmcgibbo commented Apr 28, 2021

Result of nixpkgs-review pr 120957 at 1c4234f run on aarch64-linux 1

2 packages built successfully:
  • python38Packages.djangorestframework-jwt
  • python39Packages.djangorestframework-jwt
1 suggestion:
  • warning: python-include-tests

    Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.

    Near pkgs/development/python-modules/djangorestframework-jwt/default.nix:37:0:

       |
    37 |     description = "JSON Web Token Authentication support for Django REST Framework";
       | ^
    

Result of nixpkgs-review pr 120957 at 1c4234f run on x86_64-linux 1

2 packages built successfully:
  • python38Packages.djangorestframework-jwt
  • python39Packages.djangorestframework-jwt
1 suggestion:
  • warning: python-include-tests

    Consider adding a checkPhase for tests, or if not feasible, pythonImportsCheck.

    Near pkgs/development/python-modules/djangorestframework-jwt/default.nix:37:0:

       |
    37 |     description = "JSON Web Token Authentication support for Django REST Framework";
       | ^
    

@SuperSandro2000
Copy link
Member

Would version 2.0.0 just work if we widen the version constraint?

Also I am not sure if we can or cannot add such things. @dotlambda

@dotlambda
Copy link
Member

dotlambda commented Apr 30, 2021

Let's switch to this fork: https://github.com/Styria-Digital/django-rest-framework-jwt. We might want to call the package drf-jwt and make djangorestframework-jwt an alias.

@dotlambda
Copy link
Member

Anyone working on that?

@critbase
Copy link
Contributor Author

@dotlambda Is that fork a drop-in replacement? If so, I think that's a good idea; I don't like the idea of keeping an unmaintained library in repos, especially when there's a good fork.

@dotlambda
Copy link
Member

Is that fork a drop-in replacement?

According to jpadilla/django-rest-framework-jwt#484, it is.
But if you're looking for a better alternative, they suggest https://github.com/jazzband/django-rest-framework-simplejwt.

Closing this PR in favor of #121825.

@dotlambda dotlambda closed this May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants