7.3.9 added a def _pkcs12_friendly_name(cert: Certificate) at src/pytak/crypto_functions.py:124, but Certificate is only imported inside a try: from cryptography.x509 import Certificate ... except ImportError: guard. Without the with-crypto extra, Python evaluates the annotation at module load and raises NameError, breaking import pytak.
Repro: pip install pytak==7.3.10 && python -c "import pytak". Worked in 7.3.7.
Potential fix: from __future__ import annotations at the top of crypto_functions.py, defers annotation evaluation, no semantics change.
Same root cause also affects L135, L161-162, L183.
7.3.9 added a
def _pkcs12_friendly_name(cert: Certificate)atsrc/pytak/crypto_functions.py:124, butCertificateis only imported inside atry: from cryptography.x509 import Certificate ... except ImportError:guard. Without thewith-cryptoextra, Python evaluates the annotation at module load and raisesNameError, breakingimport pytak.Repro:
pip install pytak==7.3.10 && python -c "import pytak". Worked in 7.3.7.Potential fix:
from __future__ import annotationsat the top ofcrypto_functions.py, defers annotation evaluation, no semantics change.Same root cause also affects L135, L161-162, L183.