From d76c243513c1c88cdad87d7c9ae4aa32f3417bad Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Fri, 15 Dec 2023 14:01:14 +0000 Subject: [PATCH] Revert "Fix ResourceWarning unclosed socket" This reverts commit f4144359f695f089480ef16b320fd6e993d47337. --- vcr/patch.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/vcr/patch.py b/vcr/patch.py index d1527a5..a9e86bd 100644 --- a/vcr/patch.py +++ b/vcr/patch.py @@ -371,7 +371,6 @@ class ConnectionRemover: def add_connection_to_pool_entry(self, pool, connection): if isinstance(connection, self._connection_class): self._connection_pool_to_connections.setdefault(pool, set()).add(connection) - pool._put_conn(connection) def remove_connection_to_pool_entry(self, pool, connection): if isinstance(connection, self._connection_class): @@ -387,7 +386,6 @@ class ConnectionRemover: connection = pool.pool.get() if isinstance(connection, self._connection_class): connections.remove(connection) - connection.close() else: readd_connections.append(connection) for connection in readd_connections: