[New-bugs-announce] [issue26960] urllib hangs when closing connection

Chris Beaumont report at bugs.python.org
Wed May 4 20:25:54 EDT 2016

New submission from Chris Beaumont:

http://bugs.python.org/issue16270 identified an issue with ftpwrapper.endtransfer that causes ftp fetches to hang in certain situations. A fix was applied to python 3. I see the same issue on python 2.7, and the patch from 16270 fixes it. Is there a reason this fix hasn't been backported to 2.7?

To reproduce:

import urllib
url = "ftp://ftp.fu-berlin.de/pub/misc/movies/database/ratings.list.gz"
fp = urllib.urlopen(url)
fp.close()  # hangs

components: Library (Lib)
messages: 264868
nosy: Chris Beaumont, giampaolo.rodola
priority: normal
severity: normal
status: open
title: urllib hangs when closing connection
versions: Python 2.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list