This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients barry, bremner, doko, ivyl, lukasz.langa, maxking, r.david.murray, xtreak
Date 2020-07-06.12:32:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594038741.82.0.0485125345546.issue41206@roundup.psfhosted.org>
In-reply-to
Content
There is a behavior change with my fix. 7bit is returned for Content-Transfer-Encoding before commit and skipping the heuristic if line is empty to avoid ValueError will return quoted-printable for Content-Transfer-Encoding. This is a behavior change even if the ValueError is fixed. I would like to confirm which is the correct behavior and to be documented appropriately.

Test Case in test_contentmanager.py : 

    def test_set_text_plain_empty_content_heuristics(self):
        m = self._make_message()
        content = ""
        raw_data_manager.set_content(m, content)
        self.assertEqual(str(m), textwrap.dedent("""\                             
            Content-Type: text/plain; charset="utf-8"                             
            Content-Transfer-Encoding: quoted-printable                           
                                                                                  
                                                                                  
            """))
        self.assertEqual(m.get_payload(decode=True).decode('utf-8'), "\n")
        self.assertEqual(m.get_content(), "\n")
History
Date User Action Args
2020-07-06 12:32:21xtreaksetrecipients: + xtreak, barry, doko, r.david.murray, bremner, lukasz.langa, maxking, ivyl
2020-07-06 12:32:21xtreaksetmessageid: <1594038741.82.0.0485125345546.issue41206@roundup.psfhosted.org>
2020-07-06 12:32:21xtreaklinkissue41206 messages
2020-07-06 12:32:21xtreakcreate