You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A bug in future.backports.email.Message.set_boundary causes errors when serializing multipart email Message objects.
Using Python 2.7.15, here is output from serializing a multipart email:
>>> import future.backports.email as email>>> import future.backports.email.mime.multipart>>> m = email.mime.multipart.MIMEMultipart()>>> m.as_string()Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/site-packages/future/backports/email/message.py", line 155, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/local/lib/python2.7/site-packages/future/backports/email/generator.py", line 118, in flatten self._write(msg) File "/usr/local/lib/python2.7/site-packages/future/backports/email/generator.py", line 190, in _write self._write_headers(msg) File "/usr/local/lib/python2.7/site-packages/future/backports/email/generator.py", line 216, in _write_headers for h, v in msg.raw_items(): File "/usr/local/lib/python2.7/site-packages/future/backports/email/message.py", line 446, in raw_items return iter(self._headers.copy())AttributeError: 'list' object has no attribute 'copy'
Another example indicating the source of the bug:
>>> import future.backports.email as email>>> import future.backports.email.mime.multipart>>> m = email.mime.multipart.MIMEMultipart()>>> type(m._headers)<class 'future.types.newlist.newlist'>>>> m.set_boundary('===============6387699881409002085==')>>> type(m._headers)<type 'list'>
The text was updated successfully, but these errors were encountered:
A bug in
future.backports.email.Message.set_boundary
causes errors when serializing multipart email Message objects.Using Python 2.7.15, here is output from serializing a multipart email:
Another example indicating the source of the bug:
The text was updated successfully, but these errors were encountered: