[New-bugs-announce] [issue16419] email.message._headers is a list

DDarko report at bugs.python.org
Tue Nov 6 04:39:12 CET 2012

New submission from DDarko:

in Python 3.3 lib.email.message

  File "email/message.py", line 151, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "email/generator.py", line 112, in flatten
  File "email/generator.py", line 171, in _write
  File "email/generator.py", line 197, in _write_headers
    for h, v in msg.raw_items():
  File "email/message.py", line 441, in raw_items
    return iter(self._headers.copy())
AttributeError: 'list' object has no attribute 'copy'

in line 443 is:
return iter(self._headers.copy())
I think that it should be:
return iter(self._headers[:])

components: Library (Lib)
messages: 174952
nosy: DDarko
priority: normal
severity: normal
status: open
title: email.message._headers is a list
type: crash
versions: Python 3.3

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list