summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.4.rst
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2014-01-17 16:03:19 (GMT)
committerBrett Cannon <brett@python.org>2014-01-17 16:03:19 (GMT)
commitc089f70b54f30398f870216925e75bff398d0254 (patch)
tree504d143699f18cf65cdce88425882df4ab736f9d /Doc/whatsnew/3.4.rst
parent50c8583492dfe475a44ffc3cd4ed96903a844144 (diff)
downloadcpython-c089f70b54f30398f870216925e75bff398d0254.zip
cpython-c089f70b54f30398f870216925e75bff398d0254.tar.gz
cpython-c089f70b54f30398f870216925e75bff398d0254.tar.bz2
Issue #18394: Document that cgi.FieldStorage now cleans up after its
'file' attribute properly in Python 3.4. Thanks to Marcel Hellkamp for pointing out the oversight.
Diffstat (limited to 'Doc/whatsnew/3.4.rst')
-rw-r--r--Doc/whatsnew/3.4.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 6ace6d6..a5bbdf0 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -1560,6 +1560,13 @@ Changes in the Python API
:issue:`18011`.) Note: this change was also inadvertently applied in Python
3.3.3.
+* The :attr:`~cgi.FieldStorage.file` attribute is now automatically closed when
+ the creating :class:`cgi.FieldStorage` instance is garbage collected. If you
+ were pulling the file object out separately from the :class:`cgi.FieldStorage`
+ instance and not keeping the instance alive, then you should either store the
+ entire :class:`cgi.FieldStorage` instance or read the contents of the file
+ before the :class:`cgi.FieldStorage` instance is garbage collected.
+
Changes in the C API
--------------------