[issue10883] urllib: socket is not closed explicitly

2011-07-25 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Thanks for your patch. ResourceWarning are really useful! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883 ___

[issue10883] urllib: socket is not closed explicitly

2011-07-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset c741ba9e37ef by Nadeem Vawda in branch '3.2': Issue #10883: Fix socket leaks in urllib.request. http://hg.python.org/cpython/rev/c741ba9e37ef New changeset d68765bd6490 by Nadeem Vawda in branch 'default': Merge:

[issue10883] urllib: socket is not closed explicitly

2011-07-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset dbf1e1a27427 by Nadeem Vawda in branch '2.7': Issue #10883: Fix socket leaks in urllib.request. http://hg.python.org/cpython/rev/dbf1e1a27427 -- ___ Python tracker

[issue10883] urllib: socket is not closed explicitly

2011-07-23 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: accepted - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883

[issue10883] urllib: socket is not closed explicitly

2011-07-07 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Updated patch with fixed refcounting mechanism. Also fixes clear_cache() in CacheFTPWrapper to leave the cache in a consistent state for subsequent use. -- Added file: http://bugs.python.org/file22609/issue10883-v2.patch

[issue10883] urllib: socket is not closed explicitly

2011-07-05 Thread Senthil Kumaran
Senthil Kumaran sent...@uthcode.com added the comment: With the patch applied, test_urllib2net fails at test_ftp test case when a valid and invalid url are presented in sequence. I think test needs a change or a further look is needed at the patch. --

[issue10883] urllib: socket is not closed explicitly

2011-07-05 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: The failure seems to occur sporadically. I'm looking into it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883 ___

[issue10883] urllib: socket is not closed explicitly

2011-07-05 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: The problem seems to be that CacheFTPHandler inherits ftp_open() from FTPHandler - FTPHandler.ftp_open() marks the ftpwrapper object to be closed as soon as the current transfer is complete. So CacheFTPHandler's cache ends up full of closed

[issue10883] urllib: socket is not closed explicitly

2011-07-04 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- resolution: - accepted stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883 ___

[issue10883] urllib: socket is not closed explicitly

2011-07-02 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Here's an updated patch implementing reference counting for ftpwrapper. It changes the semantics of ftpwrapper.close() to postpone actually closing the connection until all files have also been closed (like socket.close()). -- Added

[issue10883] urllib: socket is not closed explicitly

2011-06-17 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset ca18f7f35c28 by Victor Stinner in branch '3.2': Issue #10883: test_urllib2net closes socket explicitly http://hg.python.org/cpython/rev/ca18f7f35c28 New changeset 6d38060f290c by Victor Stinner in branch 'default': (Merge 3.2) Issue

[issue10883] urllib: socket is not closed explicitly

2011-06-17 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: ftp_close.patch: - (in passive mode) FTP.ntransfercmd() closes explicitly the socket on error: the caller has not access to the socket on error - OtherNetworkTests of test_urllib2net clears CacheFTPHandler cache: add a

[issue10883] urllib: socket is not closed explicitly

2011-06-15 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: Is there still something to do in this issue? The initial report is fixed. -- versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue10883] urllib: socket is not closed explicitly

2011-06-15 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Yes, the fix I provided only eliminated some of the warnings. As of fd6446a88fe3, test_urllib2net still leaks 5 sockets. -- ___ Python tracker rep...@bugs.python.org

[issue10883] urllib: socket is not closed explicitly

2011-03-23 Thread Roundup Robot
Roundup Robot devnull@devnull added the comment: New changeset 2e5aff2a9e54 by Senthil Kumaran in branch '3.2': issue10883 - Silence some ftp related ResourceWarnings in test_urllib2net. Patch by Nadeem Vawda. http://hg.python.org/cpython/rev/2e5aff2a9e54 New changeset 0937b3618b86 by Senthil

[issue10883] urllib: socket is not closed explicitly

2011-03-20 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: I saw the partial fix suggested by the patch, but for some reason I did not see ResourceWarning being shutup. Do you mean that you aren't getting ResourceWarnings in the first place? Or that you are getting warnings, and the partial fix

[issue10883] urllib: socket is not closed explicitly

2011-03-19 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: Would it be possible to commit this partial fix now? It gets rid of 4 of the 8 warnings that I am currently seeing in test_urllib2net. (As an aside, for anyone reading this who hasn't seen issue11563, test_urllibnet is now warning-free)

[issue10883] urllib: socket is not closed explicitly

2011-03-19 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: I saw the partial fix suggested by the patch, but for some reason I did not see ResourceWarning being shutup. Let's look at this again. The warnings are all from the (old) ftp portion of the code.. --

[issue10883] urllib: socket is not closed explicitly

2011-01-10 Thread STINNER Victor
New submission from STINNER Victor victor.stin...@haypocalc.com: test_urllibnet.py and test_urllibnet2.py emit ResourceWarning: == $ ./python Lib/test/test_urllibnet.py testURLread (__main__.URLTimeoutTest) ... ok test_bad_address (__main__.urlopenNetworkTests) ... ok test_basic