Skip to content

Python 3.12 getting urllib error #156

@debritainc

Description

@debritainc

Hello, I'm getting the following issue, which kills the process on module import:

Runtime.ImportModuleError: Unable to import module 'cybersource': cannot import name 'BaseHTTPResponse' from 'urllib3' (/opt/python/urllib3/init.py)

It's accompanied by this warning as well:

/opt/python/CyberSource/api_client.py:19: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

Here the module versions imported per Cybersource requirements.txt:

certifi==2025.8.3
pycryptodome==3.23.0
PyJWT==2.10.1
DateTime==5.5
setuptools==80.9.0
six==1.17.0
urllib3==1.26.19
jwcrypto==1.5.6
cryptography==45.0.6
cybersource-rest-client-python==0.0.68

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions