R. David Murray <rdmur...@bitdance.com> added the comment:
The fact that the original report mentions HeaderParserError implies that the new API is being used, though the report didn't make that clear. The problem still exists: >>> m = message_from_string("To: :Foo <f...@example.com> >>> <b...@example.com>\n\n", policy=default) >>> m['To'] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/rdmurray/python/p38/Lib/email/message.py", line 391, in __getitem__ return self.get(name) File "/home/rdmurray/python/p38/Lib/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/home/rdmurray/python/p38/Lib/email/policy.py", line 163, in header_fetch_parse return self.header_factory(name, value) File "/home/rdmurray/python/p38/Lib/email/headerregistry.py", line 602, in __call__ return self[name](name, value) File "/home/rdmurray/python/p38/Lib/email/headerregistry.py", line 197, in __new__ cls.parse(value, kwds) File "/home/rdmurray/python/p38/Lib/email/headerregistry.py", line 343, in parse groups.append(Group(addr.display_name, File "/home/rdmurray/python/p38/Lib/email/_header_value_parser.py", line 315, in display_name return self[0].display_name File "/home/rdmurray/python/p38/Lib/email/_header_value_parser.py", line 382, in display_name return self[0].display_name File "/home/rdmurray/python/p38/Lib/email/_header_value_parser.py", line 564, in display_name if res[0].token_type == 'cfws': IndexError: list index out of range ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32178> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com