lepture / authlib

The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
https://authlib.org/
BSD 3-Clause "New" or "Revised" License
4.45k stars 445 forks source link

Missing runtime dependency to cryptography #580

Open swaeberle opened 11 months ago

swaeberle commented 11 months ago

Describe the bug

authlib depends on cryptography but only defines this in the install_requires array of the packaging configuration (setup.cfg), but not in the dependencies array.

To Reproduce

  1. Install authlib, e.g. pip install authlib This would also install cryptography if not yet available.
  2. Remove cryptography, e.g. pip uninstall cryptography There will be no warning about violating authlib's runtime dependencies, as it is only marked as required during install.
  3. Use authlib, e.g. create a JWT This will fail due to missing dependency cryptography.

Expected behavior

Environment:

Additional context

I ran into this when integrating authlib into a Yocto project. The runtime dependency was not obvious from the setup.cfg, hence I made cryptography only available during installation, but not part of the target system.