classification
Title: wsgiref.headers.Header() does not update headers list it was created with.
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.1, Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: Marcel.Hellkamp, georg.brandl
Priority: normal Keywords:

Created on 2010-06-17 18:34 by Marcel.Hellkamp, last changed 2010-08-02 20:31 by georg.brandl. This issue is now closed.

Messages (2)
msg108042 - (view) Author: Marcel Hellkamp (Marcel.Hellkamp) Date: 2010-06-17 18:34
The current (3.x) implementation of wsgiref.headers.Headers() does not match the documentation.

Documented behaviour:
"Any changes made to the new Headers object will directly update the headers list it was created with." (/Doc/library/wsgiref.rst)

Actual behaviour:
The initial headers list is not updated.

The error was introduced with revision 68205. See http://svn.python.org/view/python/branches/py3k/Lib/wsgiref/headers.py?view=diff&r1=68204&r2=68205

Revision 68204::
    >>> from wsgiref.headers import Headers
    >>> l = []
    >>> h = Headers(l)
    >>> h.add_header('Test','Test')
    >>> l
    [('Test', 'Test')]

Revision 68205::
    >>> from wsgiref.headers import Headers
    >>> l = []
    >>> h = Headers(l)
    >>> h.add_header('Test','Test')
    >>> l
    []
msg112536 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-08-02 20:31
Thanks, fixed in r83566.
History
Date User Action Args
2010-08-02 20:31:08georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg112536

resolution: fixed
2010-06-17 18:34:15Marcel.Hellkampcreate