classification
Title: make wsgiref.headers.Headers accept empty constructor
Type: feature request Stage: test needed
Components: Library (Lib) Versions: Python 3.2, Python 2.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: pje, ptn, tarek (3)
Priority: Keywords easy

Created on 2009-04-20 16:01 by tarek, last changed 2009-06-17 21:22 by ptn.

Files
File name Uploaded Description Edit Remove
patch ptn, 2009-06-17 15:00
Messages (4)
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.
History
Date User Action Args
2009-06-17 21:22:49ptnsetmessages: + msg89484
2009-06-17 15:03:35tareksetmessages: + msg89459
versions: + Python 3.2, - Python 3.1
2009-06-17 15:00:00ptnsetfiles: + patch
nosy: + ptn
messages: + msg89458

2009-04-22 05:06:35ajaksu2setkeywords: + easy
stage: test needed
2009-04-20 16:01:04tarekcreate