-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
stdlibStandard 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
Bug report
Bug description:
#!/usr/bin/python3
from email.message import MIMEPart
from email.policy import compat32
m = MIMEPart(policy=compat32)
m.set_content(b'\x00'*100, 'image', 'phg')
This raises the following exception:
Traceback (most recent call last):
File "[…]/test.py", line 7, in <module>
m.set_content(b'\x00'*100, 'image', 'phg')
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/email/message.py", line 1136, in set_content
content_manager = self.policy.content_manager
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Compat32' object has no attribute 'content_manager'
This is with python3
3.13.3-1 on debian.
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Metadata
Metadata
Assignees
Labels
stdlibStandard 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