[issue12133] ResourceWarning in urllib.request

2011-07-18 Thread Ugra Dániel
Ugra Dániel added the comment: Sorry, I've forgotten to post a reference to the new bug: #12576 -- ___ Python tracker ___ ___ Python-

[issue12133] ResourceWarning in urllib.request

2011-07-18 Thread STINNER Victor
STINNER Victor added the comment: (Oh, I missed Antoine's comment, yes, reopen a new issue) -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___ __

[issue12133] ResourceWarning in urllib.request

2011-07-18 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue. -- resolution: fixed -> accepted status: closed -> open ___ Python tracker ___

[issue12133] ResourceWarning in urllib.request

2011-07-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Should I open a new bug report for this one or is it OK to just leave > this comment here? I think it's better to open a new issue, thank you. -- ___ Python tracker ___

[issue12133] ResourceWarning in urllib.request

2011-07-16 Thread Ugra Dániel
Ugra Dániel added the comment: This patch has introduced some problems for me with Python 3.2.1 (64-bit Arch Linux). The following code: with urllib.request.urlopen(url) as page: pass raises "ValueError: I/O operation on closed file." exception when url is "http://www.imdb.com/";. When

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Éric Araujo
Éric Araujo added the comment: Yay! -- nosy: +alexis, eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: I tested the patch on Python 3.3: the full test suite pass on Linux. I applied your patch on Python 2.7, 3.2 and 3.3, thanks Ezio. -- resolution: -> fixed status: open -> closed ___ Python tracker

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 18e6ccc332d5 by Victor Stinner in branch '2.7': Issue #12133: AbstractHTTPHandler.do_open() of urllib.request closes the HTTP http://hg.python.org/cpython/rev/18e6ccc332d5 -- ___ Python tracker

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ad6bdfd7dd4b by Victor Stinner in branch '3.2': Issue #12133: fix a ResourceWarning in urllib.request http://hg.python.org/cpython/rev/ad6bdfd7dd4b New changeset 57a98feb508e by Victor Stinner in branch 'default': (Merge 3.2) Issue #12133: fix a Re

[issue12133] ResourceWarning in urllib.request

2011-06-15 Thread STINNER Victor
STINNER Victor added the comment: Oh, I wrote a similar patch to kill the ResourceWarning of test_pypi_simple (except that I didn't patch test_urllib2). -- nosy: +haypo versions: +Python 2.7, Python 3.2 ___ Python tracker

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Ezio Melotti
Ezio Melotti added the comment: The packaging test (test_pypi_simple.py:test_uses_mirrors) creates a server and a mirror, starts the mirror only, tries to connect to the server, and then falls back on the mirror when the server raises a timeout error. The code in the first message does more or

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Ezio, the connection can be closed via the finally call as you do in the patch. There are times when request object is re-used, but before the connection is made. It may also help to understand how the code in the packaging was invoking it. If you run th

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Ezio Melotti
New submission from Ezio Melotti : In case of error (e.g. timeout error), urllib.request leaves the socket open: import urllib.request as ur import socket s = socket.socket() s.bind(('localhost', 1)) s.listen(0) socket.setdefaulttimeout(5) ur.urlopen('http://localhost.localdomain:1') ou