Both the django-mailman3 and the hyperkitty build failures look like the same
issue
, my looking however was focused on the hyperkitty failure as that is the one I
became
aware of first.
First I looked at test history for hyperkitty on reproducible builds and
looking at when relavent
packages changed. It seems that most-likely the change responsible for this
failure was the upload
of python3.8 3.8.4~rc1-1.
Then I decided to try and write a minimal reproducer, the following seems to
reproduce the issue.
#!/usr/bin/python3
from email.message import EmailMessage
from django_mailman3.lib.scrub import Scrubber
msg=EmailMessage()
msg.set_content('this is a test')
msg["From"] = "[email protected]"
msg.add_attachment(b'12345',maintype='text',subtype='plain')
print(msg)
scrubber = Scrubber(msg)
print(scrubber.scrub())
I then decided to go have a look at the 3.8 branch of the cpython repository on
github to see if
there had been any recent changes to the email module and potentially to file a
bug. However it
seems it has already been fixed.
Specifically it seems the issue was introuced in
https://github.com/python/cpython/commit/c1f1ddf30a595c2bfa3c06e54fb03fa212cd28b5
And fixed in.
https://github.com/python/cpython/commit/c1c50345933efca42169f03d79ff4fe3d9c06bdc
Looking at https://www.python.org/dev/peps/pep-0569/ it looks like 3.8.4 final
is
due out today, I presume that will include the fix.