[issue12133] ResourceWarning in urllib.request

2011-07-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: I reopen the issue. -- resolution: fixed - accepted status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12133

[issue12133] ResourceWarning in urllib.request

2011-07-18 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: (Oh, I missed Antoine's comment, yes, reopen a new issue) -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12133

[issue12133] ResourceWarning in urllib.request

2011-07-18 Thread Ugra Dániel
Ugra Dániel daniel.u...@gmail.com added the comment: Sorry, I've forgotten to post a reference to the new bug: #12576 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12133 ___

[issue12133] ResourceWarning in urllib.request

2011-07-16 Thread Ugra Dániel
Ugra Dániel daniel.u...@gmail.com 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

[issue12133] ResourceWarning in urllib.request

2011-07-16 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr 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 rep...@bugs.python.org

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Roundup Robot
Roundup Robot devnull@devnull 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

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Roundup Robot
Roundup Robot devnull@devnull 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

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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 ___

[issue12133] ResourceWarning in urllib.request

2011-06-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Yay! -- nosy: +alexis, eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12133 ___ ___

[issue12133] ResourceWarning in urllib.request

2011-06-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com 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

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Ezio Melotti
New submission from Ezio Melotti ezio.melo...@gmail.com: 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)

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12133 ___ ___

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com 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

[issue12133] ResourceWarning in urllib.request

2011-05-21 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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