python (3.12.0)
ˑe/ d Z g dZddlZddlZddlZddlZddlZddlZddlZ ddl
mZ ddl
mZ
ddl
mZ ddl
mZmZmZ ddlmZ d Zd
Zd
ZdZdZ ej2 d
Z ej2 d Zd Zd Zd dZd Zd Z d!dZ!d"dZ"d#dZ#d Z$d Z%d Z&d Z'd#dZ( ej2 dejR Z*d Z+ d$dZ,d#dZ-y)%zMiscellaneous utilities.)collapse_rfc2231_value
decode_paramsdecode_rfc2231encode_rfc2231
formataddr
formatdateformat_datetimegetaddresses
make_msgid mktime_tz parseaddr parsedateparsedate_tzparsedate_to_datetimeunquote N)quote)AddressList)r )r
r
_parsedate_tz)Charsetz, z
'z[][\\()<>@,:;".]z[\\"]c D | j y# t $ r Y yw xY w)z8Return True if s contains surrogate-escaped binary data.FT)encodeUnicodeEncodeError)ss ?/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/email/utils.py_has_surrogatesr 3 s%
s c J | j dd }|j dd S )Nutf-8surrogateescapereplace)r decode)stringoriginal_bytess r _sanitizer% @ s(
]]7,=>N )44 c V | \ }}|j d |rM |j d d}t j | rd}t j d| }|||d|dS |S # t
$ r7 t
|t rt | }|j | }|d|dcY S w xY w)a The inverse of parseaddr(), this takes a 2-tuple of the form
(realname, email_address) and returns the string value suitable
for an RFC 2822 From, To or Cc header.
If the first element of pair is false, then the second element is
returned unmodified.
The optional charset is the character set that is used to encode
realname in case realname is not ASCII safe. Can be an instance of str or
a Charset-like object which has a header_encode method. Default is
'utf-8'.
asciir "z\\\g<0>z <>)
r
specialsresearch escapesresubr
isinstancestrr
header_encode)paircharsetnameaddressquotesencoded_names r r r L s MD'NN7 CKK F &==T2D$*D&'BBN "