Per
cryptography stopped requiring the use of backend arguments in version 3.1 and deprecated their use in version 36.0. If you are on an older version that requires these arguments please view the appropriate documentation version or upgrade to the latest release.
Note that for forward compatibility backend is still silently accepted by functions that previously required it, but it is ignored and no longer documented.
A lot of code in Azure CLI (mainly keyvault module) still uses backend argument in cryptography:
|
pkey = load_pem_private_key(pem_data, pem_password, default_backend()) |
|
return public.public_key(default_backend()) |
The best practice is to bump cryptography to newer versions (>=3.1):
and stop using deprecated backend argument, just in case cryptography totally removes backend one day.
Additional context
Related issue in Azure Python SDK repo: Azure/azure-sdk-for-python#36579
Per
A lot of code in Azure CLI (mainly
keyvaultmodule) still usesbackendargument incryptography:azure-cli/src/azure-cli/azure/cli/command_modules/keyvault/custom.py
Line 1324 in 47823b5
azure-cli/src/azure-cli/azure/cli/command_modules/keyvault/custom.py
Line 1414 in 47823b5
The best practice is to bump
cryptographyto newer versions (>=3.1):azure-cli/src/azure-cli-core/setup.py
Line 49 in fbe0add
and stop using deprecated
backendargument, just in casecryptographytotally removesbackendone day.Additional context
Related issue in Azure Python SDK repo: Azure/azure-sdk-for-python#36579