[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 13d04a8713ad by Brett Cannon in branch 'default': Issue #18394: Document that cgi.FieldStorage now cleans up after its http://hg.python.org/cpython/rev/13d04a8713ad -- ___ Python tracker

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-17 Thread Brett Cannon
Changes by Brett Cannon : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-17 Thread Brett Cannon
Brett Cannon added the comment: While you're right, Marcel, that code which pulls out the file object form FieldStorage would probably have the file closed from underneath it, I don't know if I agree that it's a bad thing. The FieldStorage object created that file, implicitly putting it in cha

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-12 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> brett.cannon keywords: +3.3regression -patch nosy: +larry priority: normal -> release blocker status: closed -> open ___ Python tracker ___

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2014-01-12 Thread Marcel Hellkamp
Marcel Hellkamp added the comment: This change breaks existing applications. The cgi.FieldStorage.file attribute is public and mentioned in the documentation. It even states "You can then read the data at leisure from the file attribute". Consider this example:: form = cgi.FieldStorage()

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-23 Thread Brett Cannon
Brett Cannon added the comment: I managed to write a similar patch to Vajrasky independently, so at least I know the approach is reasonable. =) I'm not backporting since it really isn't that critical; I fixed it just to turn off the ResourceWarning while running the test suite. -- nos

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset c0e9ba7b26d5 by Brett Cannon in branch 'default': Issue #18394: Explicitly close the file object cgi.FieldStorage http://hg.python.org/cpython/rev/c0e9ba7b26d5 -- nosy: +python-dev ___ Python tracker

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-13 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-12 Thread Madison May
Madison May added the comment: I ran into a similar issue (see #18700) with test_cgi. ``/home/mmay/cpython/Lib/test/test_cgi.py:276: ResourceWarning: unclosed file <_io.BufferedRandom name=3>`` -- nosy: +madison.may ___ Python tracker

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-08-12 Thread Vajrasky Kok
Vajrasky Kok added the comment: It happens because if the length of data is more than 1000: def __write(self, line): """line is always bytes, not string""" if self.__file is not None: if self.__file.tell() + len(line) > 1000: self.file = self.make_

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-07-07 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue18394] cgi.FieldStorage triggers ResourceWarning sometimes

2013-07-07 Thread Florent Xicluna
New submission from Florent Xicluna: It happens when POSTing a file for example. When running the test suite: ./python.exe -m test test_cgi Or with the script attached: $ ./python test_fieldstorage.py test_fieldstorage.py:28: ResourceWarning: unclosed file <_io.BufferedRandom name=3> check