Skip to content

Commit

Permalink
fix: work around problems with urllib3 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelgieschke committed Apr 28, 2023
1 parent 05ced9e commit 134c2bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ DEBIAN_FRONTEND=noninteractive apt-get install -y python-is-python3 \
|| update-alternatives --install /usr/bin/python python /usr/bin/python3 100

pip3 install docker-compose ansible
pip3 install "urllib3<2"

This comment has been minimized.

Copy link
@felixfontein

felixfontein Apr 28, 2023

You should probably install requests < 2.29.0 instead, as that seems to be the real problem.

This comment has been minimized.

Copy link
@rafaelgieschke

rafaelgieschke Apr 30, 2023

Author Contributor

Thanks for the comment!

This is quite confusing but if I do not miss anything, pip3 install 'requests<2.29' 'urllib3>=2' (only pip3 install 'requests<2.29' is not enough as that will install urllib3>=1.21.1,<1.27) will just break in urllib3 2.0 as well:

    Error connecting: Error while fetching server API version: request() got an unexpected keyword argument 'chunked'
      File "/usr/local/lib/python3.8/dist-packages/docker/api/client.py", line 214, in _retrieve_server_version
        return self.version(api_version=False)["ApiVersion"]
      File "/usr/local/lib/python3.8/dist-packages/docker/api/daemon.py", line 181, in version
        return self._result(self._get(url), json=True)
      File "/usr/local/lib/python3.8/dist-packages/docker/utils/decorators.py", line 46, in inner
        return f(self, *args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/docker/api/client.py", line 237, in _get
        return self.get(url, **self._set_request_timeout(kwargs))
      File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 600, in get
        return self.request("GET", url, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 587, in request
        resp = self.send(prep, **send_kwargs)
      File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 701, in send
        r = adapter.send(request, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 489, in send
        resp = conn.urlopen(
      File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 790, in urlopen
        response = self._make_request(
      File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 496, in _make_request
        conn.request(

Real (temporary) upstream fix seems to be docker/docker-py#3114.

0 comments on commit 134c2bb

Please sign in to comment.