From a1ce5437ac1156f7a6e5b863c67738e3d3ee9a0a Mon Sep 17 00:00:00 2001 From: eaglegai Date: Mon, 24 Jun 2024 21:06:27 +0800 Subject: [PATCH] fix for python3-requests 2.32.2 Signed-off-by: eaglegai --- cloudinit/sources/DataSourceLXD.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cloudinit/sources/DataSourceLXD.py b/cloudinit/sources/DataSourceLXD.py index 9d7d7a1ad107..34e1db341906 100644 --- a/cloudinit/sources/DataSourceLXD.py +++ b/cloudinit/sources/DataSourceLXD.py @@ -132,6 +132,11 @@ class LXDSocketAdapter(HTTPAdapter): def get_connection(self, url, proxies=None): return SocketConnectionPool(LXD_SOCKET_PATH) + # Fix for requests 2.32.2+: + # https://github.com/psf/requests/pull/6710 + def get_connection_with_tls_context(self, request, verify, proxies=None, cert=None): + return self.get_connection(request.url, proxies) + def _raw_instance_data_to_dict(metadata_type: str, metadata_value) -> dict: """Convert raw instance data from str, bytes, YAML to dict