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 christian.heimes
Recipients Jizhou Yang, christian.heimes
Date 2019-05-28.15:04:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559055882.73.0.438695578142.issue37079@roundup.psfhosted.org>
In-reply-to
Content
The documentation refers to ASCII string as Python 3-style ASCII text object. In Python 2, that's the unicode data type. The feature was backported from Python 3. I guess the documentation was directly taken from Python 3's documentation and not updated to reflect Python 2's quirky str type.

You can use the io module to get the proper text type on Python 2 and 3.

import io
with io.open('ca.crt') as f:
    ca_crt = f.read()
History
Date User Action Args
2019-05-28 15:04:42christian.heimessetrecipients: + christian.heimes, Jizhou Yang
2019-05-28 15:04:42christian.heimessetmessageid: <1559055882.73.0.438695578142.issue37079@roundup.psfhosted.org>
2019-05-28 15:04:42christian.heimeslinkissue37079 messages
2019-05-28 15:04:42christian.heimescreate