docker / docker/docker-py

urllib3 version conflict

Open
#1,526 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status/wontfix
Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

ssladapter.py makes an attempt to import urllib3 from requests and if it fails, attempts to import urllib3 directly -- see https://github.com/docker/docker-py/blob/453964466741a1c85fc420c8b40fb5710f40b017/docker/transport/ssladapter.py#L10-L13. This may result in an older version of urllib3 being used at runtime. For example, the line at https://github.com/docker/docker-py/blob/453964466741a1c85fc420c8b40fb5710f40b017/docker/transport/ssladapter.py#L22 fails for versions of urllib3 before version 1.8 with the following exception:

AttributeError: 'module' object has no attribute 'connection'

Proposal for resolution: Specify urllib3>=1.8 in requirements.txt and setup.py, import directly from urllib3 rather than import from the version bundled w/ requests.

Contributor guide

Open the contributing guide

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 docker/transport/ssladapter.py at the import and connection references cited in the issue, then inspect requirements.txt and setup.py. Update the dependency declarations and import behavior described in the proposal, and verify that the adapter works with urllib3 1.8 or newer without selecting an older bundled version.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.