Skip to content

Version 0.56.0#482

Merged
TheElementalOfDestruction merged 11 commits into
masterfrom
next-release
Jul 18, 2026
Merged

Version 0.56.0#482
TheElementalOfDestruction merged 11 commits into
masterfrom
next-release

Conversation

@TheElementalOfDestruction

Copy link
Copy Markdown
Collaborator

**v0.56.0

  • [TeamMsgExtractor #478] Expand allowable versions of ebcdic to include 2.x. The 2.0 release is a pure technical release with no functional changes; it only drops support for Python 2 and 3.8. The lower bound is unchanged so installs on Python 3.8 will continue to resolve to ebcdic 1.1.1.
  • [TeamMsgExtractor #469] Expanded beautifulsoup to allow for versions up to 5.*.*. I was previously hesitant to do so because they sometimes do what seems like non backwards compatible changes in minor versions, but it looks like this should be fine.
  • [TeamMsgExtractor #471] Added .strip() to file name determination to ensure that folders with trailing spaces would be corrected before being used.
  • [TeamMsgExtractor #481] Fixed a typo that caused an HTML body created from plain text to end with </head> instead of </html>.
  • [TeamMsgExtractor #476] Fixed MessageBase.asEmailMessage() raising ValueError when a message has multiple To recipients.

glorat and others added 11 commits April 18, 2026 19:56
Multiple To recipients produce duplicate TO keys in msg.header. The
header-copy loop was assigning each individually, but EmailMessage
enforces a single TO field. Duplicate keys are now merged into one
comma-separated value before assignment.

Adds example multi-to.msg and tests covering both parsing and EML
conversion.
The header dedup dict was keyed case-sensitively, so 'TO' and 'To'
were treated as separate keys and both assigned to the EmailMessage,
triggering the single-field constraint. Dedup now keys by lowercased
name while preserving the original casing of the first occurrence.

Adds multi-to-to.msg and tests covering both parsing and EML conversion.
… headers

Improper header unfolding left tab characters mid-value after stripping
newlines. RFC 2047 encoded words using invalid charsets (e.g. malformed
GB2312) were passed raw to EmailMessage, whose folding code then failed
to re-encode the decoded replacement characters via as_bytes().

Fix uses proper RFC 5322 unfolding and re-encodes problematic encoded
words as UTF-8 before assigning to EmailMessage.
Real-world emails often label headers as GB2312 but use byte sequences
only valid in GBK (a strict superset). The previous latin-1 fallback
produced garbled display names. Now tries GBK/CP936 before latin-1
when a GB2312-declared encoded word fails to decode.
Issue #478

ebcdic 2.0 is a pure technical release with no functional changes; it
only drops support for Python 2 and 3.8. Keeping the lower bound at
1.1.1 means installs on Python 3.8 continue to resolve to ebcdic 1.1.1.
Fix asEmailMessage() raises ValueError when message has multiple TO recipients
@TheElementalOfDestruction
TheElementalOfDestruction merged commit f9a078f into master Jul 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants