CyberSource / CyberSource/cybersource-rest-client-python

Python 3.12 getting urllib error

Open
#156 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
24
Forks
42
Avg merge
29m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with api_client.py and requirements.txt, then reproduce the module import under Python 3.12 using the dependency versions listed in the report. Done means the cybersource module imports without the urllib3 error; investigate the pkg_resources warning separately if it remains relevant.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.