This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2006年10月09日 18:34 by mkerrin, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| cgi.patch | mkerrin, 2006年10月09日 18:34 | review | ||
| Messages (6) | |||
|---|---|---|---|
| msg30196 - (view) | Author: Michael Kerrin (mkerrin) | Date: 2006年10月09日 18:34 | |
The WSGI specification says in the section on "Input and Error Streams": The optional "size" argument to readline() is not supported, as it may be complex for server authors to implement, and is not often used in practice. But the current implementation of cgi.FieldStorage in the 2.4.4 branch and on Python 2.5 does call readline with the size argument. It has started to do this in response to the Python bug #1112549 - cgi.FieldStorage memory usage can spike in line-oriented ops. See http://sourceforge.net/tracker/index.php?func=detail&aid=1112549&group_id=5470&atid=105470 I am not 100% sure wheather this is a bug in the WSGI application or cgi.FieldStorage class, Originally I thought it was cgi.FieldStorage that needs to be changed, and hence tried to fix it by wrapping the input stream so that the readline method always uses the read method on the input stream (so has to not to break the above mentioned bug). While this seems to work for me it introduces a level of complexity in the cgi.py file, and possible some other bugs, that makes me think that adding the size argument for readline into the WSGI specification isn't such bad idea after all. I have attached my patch against cgi.FieldStorage if any one thinks this is the best way of fixing this issue. This is an issue for Zope3 has Zope3 doesn't support the size argument and neither does Twisted from which Zope gets its input stream. |
|||
| msg108181 - (view) | Author: Chris McDonough (mcdonc) | Date: 2010年06月19日 13:50 | |
<Review prompted by "500 tracker orphans; need more reviewers"> Although the current WSGI 1.0 spec (http://www.python.org/dev/peps/pep-0333/) still indicates that implementing the size argument to readline is not required, effectively, it is and has been for several years. Stalling on a WSGI 1.1 spec has caused a spec change to be delayed. See also http://www.mail-archive.com/web-sig@python.org/msg02494.html |
|||
| msg108182 - (view) | Author: Jean-Paul Calderone (exarkun) * (Python committer) | Date: 2010年06月19日 13:57 | |
It's not terribly productive to block a fix for this specific issue in the WSGI specification on the big pile of contentious unrelated issues. It would make sense to issue a new WSGI specification with a correction for only this issue. The rest of the WSGI 1.1 issues can wait for a subsequent revision. Of course, actually getting this done involves either getting web-sig behind it or deciding to ignore web-sig and just do it. |
|||
| msg110502 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2010年07月16日 21:30 | |
Practicality beats purity? The patch contains an enhancement to the unit test for cgi. Provided this gets past regrtest on all platforms why can't we go for it? |
|||
| msg139648 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年07月02日 13:52 | |
Now that web-sig has reached agreement on PEP 3333, can an expert update the status of this bug? |
|||
| msg415376 - (view) | Author: Irit Katriel (iritkatriel) * (Python committer) | Date: 2022年03月17日 00:13 | |
cgi/cgitb are deprecated as per PEP 594, so there won't be further enhancements to them. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:20 | admin | set | github: 44104 |
| 2022年03月17日 00:13:34 | iritkatriel | set | status: open -> closed nosy: + iritkatriel messages: + msg415376 resolution: wont fix stage: patch review -> resolved |
| 2014年02月10日 14:08:26 | jcea | set | nosy:
+ jcea |
| 2014年02月03日 19:10:30 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2012年07月21日 14:13:00 | flox | set | nosy:
+ orsenthil versions: + Python 3.3, - Python 3.1 |
| 2011年07月02日 13:52:29 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg139648 |
| 2011年07月02日 13:41:13 | eric.araujo | link | issue6234 superseder |
| 2010年08月27日 03:14:26 | flox | set | nosy:
+ flox versions: + Python 3.1, Python 2.7, Python 3.2, - Python 2.6 |
| 2010年08月04日 10:54:51 | dstanek | set | nosy:
+ dstanek |
| 2010年07月16日 21:30:28 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg110502 |
| 2010年06月19日 13:57:33 | exarkun | set | nosy:
+ exarkun messages: + msg108182 |
| 2010年06月19日 13:50:04 | mcdonc | set | nosy:
+ mcdonc messages: + msg108181 |
| 2009年03月30日 07:21:29 | ajaksu2 | set | keywords:
+ patch stage: patch review type: behavior components: + Library (Lib), - None versions: + Python 2.6, - Python 2.4 |
| 2006年10月09日 18:34:30 | mkerrin | create | |