classification
Title: Make cgi.FieldStorage a context manager
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: berker.peksag, brett.cannon, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2014-01-17 14:47 by brett.cannon, last changed 2015-10-11 14:55 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
issue20289.diff berker.peksag, 2014-01-20 20:38 review
issue20289_v2.diff berker.peksag, 2015-02-05 06:21 review
Messages (10)
msg208338 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2014-01-17 14:47
It has a file attribute which contains a file, so making it so it can be closed faster than cgi.FieldStorage.__del__ would be good.
msg208579 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2014-01-20 20:38
Here's a patch with a test and documentation update.
msg230737 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2014-11-06 13:01
Added comments on Rietveld.
msg235405 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-04 21:22
Ping.
msg235418 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-02-05 06:21
Here's an updated patch. Thank you Serhiy.
msg235437 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-02-05 13:29
LGTM.
msg235470 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2015-02-06 08:22
Thanks for the review, Serhiy!
msg235471 - (view) Author: Roundup Robot (python-dev) Date: 2015-02-06 08:22
New changeset 367f5e98ffbb by Berker Peksag in branch 'default':
Issue #20289: cgi.FieldStorage() now supports the context management protocol.
https://hg.python.org/cpython/rev/367f5e98ffbb
msg239147 - (view) Author: Roundup Robot (python-dev) Date: 2015-03-24 16:07
New changeset 34930a6faf0d by Serhiy Storchaka in branch 'default':
Issue #20289: The copy module now uses pickle protocol 4 (PEP 3154) and
https://hg.python.org/cpython/rev/34930a6faf0d
msg252808 - (view) Author: Roundup Robot (python-dev) Date: 2015-10-11 14:55
New changeset 80501740ab84 by Serhiy Storchaka in branch '3.5':
No longer skip tests for classes with __getnewargs_ex__.  The copy module
https://hg.python.org/cpython/rev/80501740ab84

New changeset 6f4dd9bc1f20 by Serhiy Storchaka in branch 'default':
No longer skip tests for classes with __getnewargs_ex__.  The copy module
https://hg.python.org/cpython/rev/6f4dd9bc1f20
History
Date User Action Args
2015-10-11 14:55:15python-devsetmessages: + msg252808
2015-03-24 16:07:25python-devsetmessages: + msg239147
2015-02-06 08:22:22python-devsetnosy: + python-dev
messages: + msg235471
2015-02-06 08:22:03berker.peksagsetstatus: open -> closed
resolution: fixed
messages: + msg235470

stage: commit review -> resolved
2015-02-05 13:29:32serhiy.storchakasetmessages: + msg235437
stage: patch review -> commit review
2015-02-05 06:21:25berker.peksagsetfiles: + issue20289_v2.diff

messages: + msg235418
2015-02-04 21:22:13serhiy.storchakasetmessages: + msg235405
2014-11-06 13:01:18serhiy.storchakasettype: behavior -> enhancement

messages: + msg230737
nosy: + serhiy.storchaka
2014-01-20 20:38:50berker.peksagsetfiles: + issue20289.diff
keywords: + patch
2014-01-20 20:38:34berker.peksagsetnosy: + berker.peksag

messages: + msg208579
stage: test needed -> patch review
2014-01-17 14:47:25brett.cannoncreate