mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Fix a more bytes/str confusion.
Use str.encode('raw-unicode-escape') consistently instead of bytes(string). Remove the convert_eols argument from base64mime.decode(). This matches previous API changes done to the quoprimime module.
This commit is contained in:
parent
ce36ad8a46
commit
8b3d659692
4 changed files with 20 additions and 24 deletions
|
@ -55,7 +55,10 @@ EMPTYSTRING = ''
|
|||
# See also Charset.py
|
||||
MISC_LEN = 7
|
||||
|
||||
HEADER_SAFE_BYTES = b'-!*+/ ' + bytes(ascii_letters) + bytes(digits)
|
||||
HEADER_SAFE_BYTES = (b'-!*+/ ' +
|
||||
ascii_letters.encode('raw-unicode-escape') +
|
||||
digits.encode('raw-unicode-escape'))
|
||||
|
||||
BODY_SAFE_BYTES = (b' !"#$%&\'()*+,-./0123456789:;<>'
|
||||
b'?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`'
|
||||
b'abcdefghijklmnopqrstuvwxyz{|}~\t')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue