We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Breaks with requests 2.32.0: Not supported URL scheme http+docker
With requests 2.32.0 (released about an hour ago as I write this), the docker library as called by [tox-docker](https://github.com/tox-dev/tox-docker) fails with the following exception:

```
Traceback (most recent call last):
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/adapters.py", line 532, in send
    conn = self._get_connection(request, verify, proxies=proxies, cert=cert)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/adapters.py", line 400, in _get_connection
    conn = self.poolmanager.connection_from_host(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/urllib3/poolmanager.py", line 304, in connection_from_host
    return self.connection_from_context(request_context)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/urllib3/poolmanager.py", line 326, in connection_from_context
    raise URLSchemeUnknown(scheme)
urllib3.exceptions.URLSchemeUnknown: Not supported URL scheme http+docker

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
                        ^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
    return self.request("GET", url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/adapters.py", line 534, in send
    raise InvalidURL(e, request=request)
requests.exceptions.InvalidURL: Not supported URL scheme http+docker

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox/session/cmd/run/single.py", line 48, in _evaluate
    code, outcomes = run_commands(tox_env, no_test)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox/session/cmd/run/single.py", line 79, in run_commands
    MANAGER.tox_before_run_commands(tox_env)
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox/plugin/manager.py", line 88, in tox_before_run_commands
    self.manager.hook.tox_before_run_commands(tox_env=tox_env)
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__
    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexec
    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicall
    raise exception.with_traceback(exception.__traceback__)
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
    res = hook_impl.function(*args)
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox_docker/tox4/plugin.py", line 73, in tox_before_run_commands
    docker_build_or_pull(container_config, log)
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox_docker/plugin.py", line 57, in docker_build_or_pull
    docker_pull(container_config, log)
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox_docker/plugin.py", line 65, in docker_pull
    docker = docker_module.from_env(version="auto")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/client.py", line 96, in from_env
    return cls(
           ^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: Not supported URL scheme http+docker
```

Reverting to requests 2.31.0 without any other changes fixes the problem.

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docker/transport/basehttpadapter.py`
Content:
```
1 import requests.adapters
2 
3 
4 class BaseHTTPAdapter(requests.adapters.HTTPAdapter):
5     def close(self):
6         super().close()
7         if hasattr(self, 'pools'):
8             self.pools.clear()
9
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/docker/transport/basehttpadapter.py b/docker/transport/basehttpadapter.py
--- a/docker/transport/basehttpadapter.py
+++ b/docker/transport/basehttpadapter.py
@@ -6,3 +6,8 @@
         super().close()
         if hasattr(self, 'pools'):
             self.pools.clear()
+
+    # Fix for requests 2.32.2+:
+    # https://github.com/psf/requests/commit/c98e4d133ef29c46a9b68cd783087218a8075e05
+    def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):
+        return self.get_connection(request.url, proxies)

{"golden_diff": "diff --git a/docker/transport/basehttpadapter.py b/docker/transport/basehttpadapter.py\n--- a/docker/transport/basehttpadapter.py\n+++ b/docker/transport/basehttpadapter.py\n@@ -6,3 +6,8 @@\n         super().close()\n         if hasattr(self, 'pools'):\n             self.pools.clear()\n+\n+    # Fix for requests 2.32.2+:\n+    # https://github.com/psf/requests/commit/c98e4d133ef29c46a9b68cd783087218a8075e05\n+    def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):\n+        return self.get_connection(request.url, proxies)\n", "issue": "Breaks with requests 2.32.0: Not supported URL scheme http+docker\nWith requests 2.32.0 (released about an hour ago as I write this), the docker library as called by [tox-docker](https://github.com/tox-dev/tox-docker) fails with the following exception:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/adapters.py\", line 532, in send\r\n    conn = self._get_connection(request, verify, proxies=proxies, cert=cert)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/adapters.py\", line 400, in _get_connection\r\n    conn = self.poolmanager.connection_from_host(\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/urllib3/poolmanager.py\", line 304, in connection_from_host\r\n    return self.connection_from_context(request_context)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/urllib3/poolmanager.py\", line 326, in connection_from_context\r\n    raise URLSchemeUnknown(scheme)\r\nurllib3.exceptions.URLSchemeUnknown: Not supported URL scheme http+docker\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py\", line 214, in _retrieve_server_version\r\n    return self.version(api_version=False)[\"ApiVersion\"]\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/daemon.py\", line 181, in version\r\n    return self._result(self._get(url), json=True)\r\n                        ^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/utils/decorators.py\", line 46, in inner\r\n    return f(self, *args, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py\", line 237, in _get\r\n    return self.get(url, **self._set_request_timeout(kwargs))\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/sessions.py\", line 602, in get\r\n    return self.request(\"GET\", url, **kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/sessions.py\", line 589, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/sessions.py\", line 703, in send\r\n    r = adapter.send(request, **kwargs)\r\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/requests/adapters.py\", line 534, in send\r\n    raise InvalidURL(e, request=request)\r\nrequests.exceptions.InvalidURL: Not supported URL scheme http+docker\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox/session/cmd/run/single.py\", line 48, in _evaluate\r\n    code, outcomes = run_commands(tox_env, no_test)\r\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox/session/cmd/run/single.py\", line 79, in run_commands\r\n    MANAGER.tox_before_run_commands(tox_env)\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox/plugin/manager.py\", line 88, in tox_before_run_commands\r\n    self.manager.hook.tox_before_run_commands(tox_env=tox_env)\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_hooks.py\", line 513, in __call__\r\n    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_manager.py\", line 120, in _hookexec\r\n    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_callers.py\", line 139, in _multicall\r\n    raise exception.with_traceback(exception.__traceback__)\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/pluggy/_callers.py\", line 103, in _multicall\r\n    res = hook_impl.function(*args)\r\n          ^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox_docker/tox4/plugin.py\", line 73, in tox_before_run_commands\r\n    docker_build_or_pull(container_config, log)\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox_docker/plugin.py\", line 57, in docker_build_or_pull\r\n    docker_pull(container_config, log)\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/tox_docker/plugin.py\", line 65, in docker_pull\r\n    docker = docker_module.from_env(version=\"auto\")\r\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/client.py\", line 96, in from_env\r\n    return cls(\r\n           ^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/client.py\", line 45, in __init__\r\n    self.api = APIClient(*args, **kwargs)\r\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py\", line 197, in __init__\r\n    self._version = self._retrieve_server_version()\r\n                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"/home/eagle/dvl/venvs/gafaelfawr/lib/python3.12/site-packages/docker/api/client.py\", line 221, in _retrieve_server_version\r\n    raise DockerException(\r\ndocker.errors.DockerException: Error while fetching server API version: Not supported URL scheme http+docker\r\n```\r\n\r\nReverting to requests 2.31.0 without any other changes fixes the problem.\n", "before_files": [{"content": "import requests.adapters\n\n\nclass BaseHTTPAdapter(requests.adapters.HTTPAdapter):\n    def close(self):\n        super().close()\n        if hasattr(self, 'pools'):\n            self.pools.clear()\n", "path": "docker/transport/basehttpadapter.py"}], "after_files": [{"content": "import requests.adapters\n\n\nclass BaseHTTPAdapter(requests.adapters.HTTPAdapter):\n    def close(self):\n        super().close()\n        if hasattr(self, 'pools'):\n            self.pools.clear()\n\n    # Fix for requests 2.32.2+:\n    # https://github.com/psf/requests/commit/c98e4d133ef29c46a9b68cd783087218a8075e05\n    def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None):\n        return self.get_connection(request.url, proxies)\n", "path": "docker/transport/basehttpadapter.py"}]}