Repository navigation
Error parsing email headers: AttributeError: 'ValueTerminal' object has no attribute 'fold' #118643
Copy link
Copy link
Closed
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on May 6, 2024 - addedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
on May 6, 2024 From RFC 822, section 3.11:
Note: While the standard permits folding wherever linear- white-space is permitted, it is recommended that struc- tured fields, such as those containing addresses, limit folding to higher-level syntactic breaks. For address fields, it is recommended that such folding occur between addresses, after the separating comma.I think it means that we should also set
ListSeparator.syntactic_breaktoFalse.But this does not help. It just returns the bug reported in #100884.
- added3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixes
on May 10, 2024 But this does not help. It just returns the bug reported in #100884.
I don't understand this comment, I just tested the code mentioned in that issue setting ListSeparator.syntactic_break to
False and it works. What bug is returned then?- added 3 commits that reference this issue
on May 22, 2024
Metadata
Metadata
Assignees
Labels
3.11only security fixesonly security fixes3.12only security fixesonly security fixes3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-emailtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Bug report
Bug description:
The following code breaks with an attribute error:
The problem was introduced on #100885, setting
ListSeparator.as_ew_allowed = FalsetoTruefixes the problem. Changing any character in the header in the example above also fixes the problem (which makes it harder to understand exactly why it's broken).CPython versions tested on:
3.12
Operating systems tested on:
macOS
Linked PRs