[issue16270] urllib hangs when closing connection

Senthil Kumaran report at bugs.python.org
Sun Jan 22 12:46:13 EST 2017


Senthil Kumaran added the comment:

The original problem here was retrieving files failed (hung) when it was tried via context-manager

1. For e.g after "reverting" the changes, if you use the original file without the context manager, it will succeed.

fobj = urllib.request.urlopen( url )

That indicates the fix in changing something in endtransfer method was improper. I have given more information here: http://bugs.python.org/issue27973#msg286016

The proper fix will be revert the endtransfer changes, but fix it in contextmanager scenario. Add test cases to cover all these scenarios.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16270>
_______________________________________


More information about the Python-bugs-list mailing list