Skip to content

Commit

Permalink
Revert "Ensure connections are properly closed on object destruction" (
Browse files Browse the repository at this point in the history
…#291)

This reverts commit 1922dda.

Fixes #292.
  • Loading branch information
shazow committed Dec 4, 2013
1 parent 7845233 commit 50b2836
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions urllib3/_collections.py
Expand Up @@ -51,9 +51,6 @@ def __init__(self, maxsize=10, dispose_func=None):
self._container = self.ContainerCls()
self.lock = RLock()

def __del__(self):
self.clear()

def __getitem__(self, key):
# Re-insert the item, moving it to the end of the eviction line.
with self.lock:
Expand Down
3 changes: 0 additions & 3 deletions urllib3/connectionpool.py
Expand Up @@ -167,9 +167,6 @@ def __init__(self, host, port=None, strict=False,
self.num_connections = 0
self.num_requests = 0

def __del__(self):
self.close()

def _new_conn(self):
"""
Return a fresh :class:`httplib.HTTPConnection`.
Expand Down
3 changes: 0 additions & 3 deletions urllib3/poolmanager.py
Expand Up @@ -68,9 +68,6 @@ def __init__(self, num_pools=10, headers=None, **connection_pool_kw):
self.pools = RecentlyUsedContainer(num_pools,
dispose_func=lambda p: p.close())

def __del__(self):
self.clear()

def _new_pool(self, scheme, host, port):
"""
Create a new :class:`ConnectionPool` based on host, port and scheme.
Expand Down

0 comments on commit 50b2836

Please sign in to comment.