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 eric.araujo, ezio.melotti, jammon, jfinkels, michael.foord, r.david.murray, serhiy.storchaka, xtreak
Date 2019-04-17.08:26:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555489590.35.0.644755352234.issue10417@roundup.psfhosted.org>
In-reply-to
Content
> Test that your fix does not break the case of 8-bit non-ascii docstring.

Do you mean double escaping of the backslash as in t\xe4st changed to t\\xe4st due to this PR? 

➜  cpython git:(bpo10417) $ cat /tmp/foo.py
# -*- coding: utf-8 -*-
import unittest

class UnicodeTest(unittest.TestCase):
    def test_unicode_docstring(self):
        u"""docstring with unicode character. t\xe4st"""
        self.assertEqual(1+1, 2)

if __name__ == '__main__':
    unittest.main()

# ASCII encoding

➜  cpython git:(bpo10417) $ PYTHONIOENCODING=ascii ./python.exe /tmp/foo.py --verbose
test_unicode_docstring (__main__.UnicodeTest)
docstring with unicode character. t\xe4st ... ok

----------------------------------------------------------------------
Ran 1 test in 0.019s

OK

# utf-8 encoding

➜  cpython git:(bpo10417) $ ./python.exe /tmp/foo.py --verbose
test_unicode_docstring (__main__.UnicodeTest)
docstring with unicode character. täst ... ok

----------------------------------------------------------------------
Ran 1 test in 0.004s

OK
History
Date User Action Args
2019-04-17 08:26:30xtreaksetrecipients: + xtreak, ezio.melotti, eric.araujo, r.david.murray, michael.foord, jfinkels, jammon, serhiy.storchaka
2019-04-17 08:26:30xtreaksetmessageid: <1555489590.35.0.644755352234.issue10417@roundup.psfhosted.org>
2019-04-17 08:26:30xtreaklinkissue10417 messages
2019-04-17 08:26:29xtreakcreate