requests functional API won't close sockets

Bug #1470860 reported by Roman Podoliaka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
requests (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Triaged
Medium
Unassigned
Vivid
Triaged
Medium
Unassigned
Wily
Fix Released
Medium
Unassigned

Bug Description

Upstream issue: https://github.com/kennethreitz/requests/issues/1882

How to reproduce:

import requests

def make_request():
    resp = requests.get('http://google.com')
    resp.close() # this appears to have no effect, even though the function exists

make_request()

This may result in possible FDs leakage and breaks OpenStack Nova unit tests (nova.tests.unit.test_wsgi.TestWSGIServerWithSSL.test_app_using_ipv6_and_ssl) when 14.04 version of python-requests is used.

The commit fixing the issue: https://github.com/ContinuousFunction/requests/commit/c0e927c52b8f049d6aa816360780580173871ac6

Revision history for this message
Thomas Goirand (thomas-goirand) wrote :

Hi. FYI, I have the same issue when building the package for Debian.

Changed in requests (Ubuntu):
status: New → Confirmed
James Page (james-page)
Changed in requests (Ubuntu Wily):
status: Confirmed → Fix Released
Changed in requests (Ubuntu Vivid):
status: New → Triaged
Changed in requests (Ubuntu Trusty):
status: New → Triaged
importance: Undecided → Medium
Changed in requests (Ubuntu Vivid):
importance: Undecided → Medium
Changed in requests (Ubuntu Wily):
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.