-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
The cybersource-rest-client-python package fails to initialize on Python 3.13 due to a transitive dependency issue with the pgpy package.
See also: SecurityInnovation/PGPy#462
Environment
- Package version: 0.0.70 (latest)
- Python version: 3.13.x
- Operating System: All platforms
Root Cause
- Python 3.13 removed the deprecated
imghdrmodule (https://peps.python.org/pep-0594/) - The
pgpypackage (v0.6.0) importsimghdrin itsconstants.pyfile cybersource-rest-client-pythondepends onpgpy(defined insetup.py)BatchUploadWithMTLSApiis imported in the top-levelCyberSource/__init__.py- This triggers the import chain: CyberSource → BatchUploadWithMTLSApi → PgpEncryption → pgpy → imghdr ❌
Error Traceback
import CyberSource
File "/site-packages/CyberSource/__init__.py", line 1559, in <module>
from .api.o_auth_api import OAuthApi
File "/site-packages/CyberSource/api/__init__.py", line 5, in <module>
from .batch_upload_with_mtls_api import BatchUploadWithMTLSApi
File "/site-packages/CyberSource/api/batch_upload_with_mtls_api.py", line 6, in <module>
from CyberSource.utilities.pgpBatchUpload.pgp_encryption import PgpEncryption
File "/site-packages/CyberSource/utilities/pgpBatchUpload/pgp_encryption.py", line 4, in <module>
import pgpy
File "/site-packages/pgpy/__init__.py", line 4, in <module>
from .pgp import PGPKey
File "/site-packages/pgpy/pgp.py", line 25, in <module>
from .constants import CompressionAlgorithm
File "/site-packages/pgpy/constants.py", line 5, in <module>
import imghdr
ModuleNotFoundError: No module named 'imghdr'
Impact
- Blocks Python 3.13 adoption for all users of this package
- Affects all users, even those not using batch upload functionality, because the import happens at package initialization
Metadata
Metadata
Assignees
Labels
No labels