79509616

Date: 2025-03-14 16:08:35
Score: 0.5
Natty:
Report link

Actually, discovered the issue. I was using azure-identity, which currently has an issue with one of it's dependencies, Cryptography. I was able to fix the issue by putting an older version of cryptography (43.0.3) in my requirements.txt

This is the link to the github issue:

https://github.com/Azure/azure-sdk-for-python/issues/38725

In case something happens to the link, here's the answer from one of the cryptography devs explaining what happened:

---------------------------------------------------------------------------
Hi folks, I'm one of the pyca/cryptography developers 😄

This isn't a bug in the pyca/cryptography project. Instead it's a confluence of several factors in the Python and Azure Functions ecosystem interacting in unfortunate ways.

I'm not an Azure user, but Azure Functions appears to have two ways of building Python environments for deployment: local and remote. Remote is recommended for deploying Linux functions because any packages containing native code need to be compatible with the deployment environment and the local host may be a different operating system or even CPU architecture.

However, when you construct an environment on a Linux host and install packages that contain native code and offer precompiled wheels pip will prioritize the highest libc version that's compatible with the underlying distribution of the host. Previously, for glibc-based distributions pyca/cryptography shipped 2.17 (aka manylinux2014) and 2.28 compatible wheels, but with 44 we now ship 2.34 as well.

If the host running the build process (Azure Functions remote build, a GitHub Actions runner, etc) possesses a glibc 2.34 or newer then pip will download the 2.34+ compatible wheel where previously it would have fetched the 2.28+ compatible wheel. This works fine on that host, but when deployed subsequently to Azure Functions the glibc version is older (this comment suggests 2.31), which causes it to fail.

While pinning to 43.0.x is a short term workaround, it is not the correct solution. pyca/cryptography is one of the earlier projects to ship a 2.34 wheel, but usage will only expand in the next year.

Azure has a few possible improvement paths here:

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Filler text (0.5): ---------------------------------------------------------------------------
  • Low reputation (1):
Posted by: Ben Halladay