|
msg86199 - (view) |
Author: Tarek Ziadé (tarek) *  |
Date: 2009-04-20 16:01 |
wsgiref.headers.Headers will let you manage a collection of HTTP
response headers, but the constructor forces you to provide a list:
>>> from wsgiref.headers import Headers
>>> headers = Headers([])
>>> headers.add_header('Content-Type', 'text/plain')
A logical change would be to allowed creating an empty Headers instance:
>>> from wsgiref.headers import Headers
>>> headers = Headers()
>>> headers.add_header('Content-Type', 'text/plain')
|
|
msg89458 - (view) |
Author: Pablo Torres Navarrete (ptn) |
Date: 2009-06-17 15:00 |
Patch attached. While I was at it, I also removed stupid whitespace and
generally made the module more PEP8-compliant.
|
|
msg89459 - (view) |
Author: Tarek Ziadé (tarek) *  |
Date: 2009-06-17 15:03 |
I have added another issue for PEP 8 compliancy at #5801
|
|
msg89484 - (view) |
Author: Pablo Torres Navarrete (ptn) |
Date: 2009-06-17 21:22 |
Added a pointer from #5801 to here.
|
|
msg121680 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2010-11-20 16:42 |
Correct and update patch + update test case
|
|
msg121681 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2010-11-20 16:43 |
here is the updated test case
|
|
msg121690 - (view) |
Author: Ramiro Batista da Luz (ramiroluz) |
Date: 2010-11-20 17:29 |
I applied the patches for wsgiref.headers and test_headers.py, ran the test with runtests.sh test_headers.py and it passed.
I also tried the code in the description:
>>> from wsgiref.headers import Headers
>>> headers = Headers()
>>> headers.add_header('Content-Type', 'text/plain')
>>>
|
|
msg121829 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2010-11-21 01:40 |
FTR, note that “svn diff file1 file2...” will give you one file for many edits. It’s easier to review and apply.
Regarding the change, I don’t know if wsgiref 3.2 has to be compatible with Python 2.1, which would exclude using the ternary operation.
The change from type to isinstance will probably be rejected, since WSGI does not accept subclasses for the things it defines.
|
|
msg121958 - (view) |
Author: Phillip J. Eby (pje) *  |
Date: 2010-11-21 18:38 |
Yes, please consider the type->isinstance part of the change rejected. I just got done reverting a bunch of those in 3.2. Where WSGI specifies types, it means "type() is", not "isinstance".
(The 3.x version of wsgiref does not need to be executable on 2.x versions, but this doesn't mean the protocol itself can be altered in backwards-incompatible ways, just the implementation.)
|
|
msg121959 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2010-11-21 18:42 |
Do I have to resubmit the patch or can you use the existing one?
|
|
msg122276 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2010-11-24 13:37 |
Re-submitting the patch for Lib/wsgiref/headers.py w/o the isinstance change
|
|
msg122318 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2010-11-24 22:51 |
Here is the correction for the docs. I would love to see this making it into 3.2 release.
|
|
msg122323 - (view) |
Author: Ramiro Batista da Luz (ramiroluz) |
Date: 2010-11-25 01:32 |
I reviewed the patch.
- I applied all the patchs(3 files).
- Ran make and make html in the Doc directory.
- Ran the test_wsgiref.py
- Ran the python interpreter and typed the suggested code:
>>> from wsgiref.headers import Headers
>>> headers = Headers([])
>>> headers.add_header('Content-Type', 'text/plain')
>>> headers = Headers()
>>> headers.add_header('Content-Type', 'text/plain')
>>>
- Read the documentation in a web browser.
All in the revision 86742.
|
|
msg122352 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2010-11-25 11:30 |
LGTM.
|
|
msg130169 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2011-03-06 13:37 |
Here's the single-file patch against the revision.
|
|
msg130181 - (view) |
Author: Phillip J. Eby (pje) *  |
Date: 2011-03-06 17:58 |
Looks good to me.
|
|
msg130752 - (view) |
Author: SilentGhost (SilentGhost) |
Date: 2011-03-13 17:53 |
> Looks good to me.
Would you mind committing it then?
|
|
msg131578 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-03-21 00:15 |
I think the doc should say something like “default value is an empty list”, for maximum clarity.
|
|
| Date |
User |
Action |
Args |
| 2011-03-21 00:15:52 | eric.araujo | set | nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz messages:
+ msg131578 versions:
+ Python 3.3, - Python 3.2 |
| 2011-03-13 17:53:45 | SilentGhost | set | nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz messages:
+ msg130752 |
| 2011-03-06 17:58:41 | pje | set | nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz messages:
+ msg130181 |
| 2011-03-06 13:37:41 | SilentGhost | set | files:
- wsgiref.rst.diff nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz |
| 2011-03-06 13:37:28 | SilentGhost | set | files:
- headers.py.diff nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz |
| 2011-03-06 13:37:21 | SilentGhost | set | files:
- test_wsgiref.py.diff nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz |
| 2011-03-06 13:37:06 | SilentGhost | set | files:
+ issue5800.diff nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz messages:
+ msg130169
|
| 2011-01-15 15:22:59 | SilentGhost | set | status: open -> languishing nosy:
pje, tarek, eric.araujo, ptn, SilentGhost, ramiroluz |
| 2010-11-25 11:30:26 | eric.araujo | set | assignee: pje messages:
+ msg122352 |
| 2010-11-25 01:32:58 | ramiroluz | set | messages:
+ msg122323 |
| 2010-11-24 22:51:52 | SilentGhost | set | files:
+ wsgiref.rst.diff
messages:
+ msg122318 |
| 2010-11-24 13:47:07 | djc | set | keywords:
+ needs review |
| 2010-11-24 13:37:35 | SilentGhost | set | files:
+ headers.py.diff keywords:
+ patch messages:
+ msg122276
|
| 2010-11-24 13:36:56 | SilentGhost | set | files:
- headers.py.diff |
| 2010-11-21 18:42:56 | SilentGhost | set | messages:
+ msg121959 |
| 2010-11-21 18:38:51 | pje | set | messages:
+ msg121958 |
| 2010-11-21 01:40:30 | eric.araujo | set | nosy:
+ eric.araujo messages:
+ msg121829
|
| 2010-11-20 17:29:00 | ramiroluz | set | nosy:
+ ramiroluz messages:
+ msg121690
|
| 2010-11-20 17:13:24 | r.david.murray | set | keywords:
- patch stage: test needed -> patch review versions:
- Python 2.7 |
| 2010-11-20 16:43:05 | SilentGhost | set | files:
+ test_wsgiref.py.diff
messages:
+ msg121681 |
| 2010-11-20 16:42:34 | SilentGhost | set | files:
+ headers.py.diff
nosy:
+ SilentGhost messages:
+ msg121680
keywords:
+ patch |
| 2009-06-17 21:22:49 | ptn | set | messages:
+ msg89484 |
| 2009-06-17 15:03:35 | tarek | set | messages:
+ msg89459 versions:
+ Python 3.2, - Python 3.1 |
| 2009-06-17 15:00:00 | ptn | set | files:
+ patch nosy:
+ ptn messages:
+ msg89458
|
| 2009-04-22 05:06:35 | ajaksu2 | set | keywords:
+ easy stage: test needed |
| 2009-04-20 16:01:04 | tarek | create | |