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

Cryptography package changed hazmat primitives [BUG/Question] #25

Closed
bmoore opened this issue Oct 1, 2021 · 3 comments · Fixed by #26
Closed

Cryptography package changed hazmat primitives [BUG/Question] #25

bmoore opened this issue Oct 1, 2021 · 3 comments · Fixed by #26
Labels
question Further information is requested

Comments

@bmoore
Copy link
Contributor

bmoore commented Oct 1, 2021

Describe the bug
If using this package with the most recent version of cryptography, apps crash due to a change in the hazmat primitives.

To Reproduce
Have the following requirements

fastapi[all]
fastapi-azure-auth
uvicorn
pytest

  1. pip install --no-cache-dir -r requirements.txt
  2. Run the sample "getting started" app uvicorn app:app --reload

Stack trace
...
from fastapi_azure_auth import SingleTenantAzureAuthorizationCodeBearer
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/fastapi_azure_auth/init.py", line 1, in
from fastapi_azure_auth.auth import ( # noqa: F401
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/fastapi_azure_auth/auth.py", line 14, in
from fastapi_azure_auth.openid_config import OpenIdConfig
File "/home/vcap/deps/0/python/lib/python3.9/site-packages/fastapi_azure_auth/openid_config.py", line 7, in
from cryptography.hazmat._types import _PUBLIC_KEY_TYPES as KeyTypes
ModuleNotFoundError: No module named 'cryptography.hazmat._types'

Your configuration
Python 3.9.6
using venv

@bmoore bmoore added the question Further information is requested label Oct 1, 2021
@bmoore
Copy link
Contributor Author

bmoore commented Oct 1, 2021

#26

@JonasKs
Copy link
Member

JonasKs commented Oct 1, 2021

Hi👋 Thank you for the report and pull request!
I will have a look tonight.

@bmoore
Copy link
Contributor Author

bmoore commented Oct 1, 2021

Thanks. I updated the toml to point to cryptography 35.0.0 that was released on Wednesday.

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

Successfully merging a pull request may close this issue.

2 participants