/opt/alt/python37/lib64/python3.7/email/__pycache__
NameSizeModeActions
base64mime.cpython-37.opt-1.pyc32320644editdlrm
base64mime.cpython-37.opt-2.pyc14550644editdlrm
base64mime.cpython-37.pyc32320644editdlrm
charset.cpython-37.opt-1.pyc114890644editdlrm
charset.cpython-37.opt-2.pyc51540644editdlrm
charset.cpython-37.pyc115260644editdlrm
contentmanager.cpython-37.opt-1.pyc72920644editdlrm
contentmanager.cpython-37.opt-2.pyc72920644editdlrm
contentmanager.cpython-37.pyc72920644editdlrm
encoders.cpython-37.opt-1.pyc16610644editdlrm
encoders.cpython-37.opt-2.pyc13100644editdlrm
encoders.cpython-37.pyc16610644editdlrm
errors.cpython-37.opt-1.pyc61880644editdlrm
errors.cpython-37.opt-2.pyc46460644editdlrm
errors.cpython-37.pyc61880644editdlrm
feedparser.cpython-37.opt-1.pyc104740644editdlrm
feedparser.cpython-37.opt-2.pyc88090644editdlrm
feedparser.cpython-37.pyc106260644editdlrm
generator.cpython-37.opt-1.pyc124970644editdlrm
generator.cpython-37.opt-2.pyc88010644editdlrm
generator.cpython-37.pyc124970644editdlrm
header.cpython-37.opt-1.pyc163830644editdlrm
header.cpython-37.opt-2.pyc107590644editdlrm
header.cpython-37.pyc163830644editdlrm
headerregistry.cpython-37.opt-1.pyc213840644editdlrm
headerregistry.cpython-37.opt-2.pyc156130644editdlrm
headerregistry.cpython-37.pyc214380644editdlrm
iterators.cpython-37.opt-1.pyc19290644editdlrm
iterators.cpython-37.opt-2.pyc13070644editdlrm
iterators.cpython-37.pyc19290644editdlrm
message.cpython-37.opt-1.pyc379910644editdlrm
message.cpython-37.opt-2.pyc213990644editdlrm
message.cpython-37.pyc379910644editdlrm
parser.cpython-37.opt-1.pyc57440644editdlrm
parser.cpython-37.opt-2.pyc27240644editdlrm
parser.cpython-37.pyc57440644editdlrm
policy.cpython-37.opt-1.pyc96520644editdlrm
policy.cpython-37.opt-2.pyc34350644editdlrm
policy.cpython-37.pyc96520644editdlrm
quoprimime.cpython-37.opt-1.pyc76610644editdlrm
quoprimime.cpython-37.opt-2.pyc41840644editdlrm
quoprimime.cpython-37.pyc76610644editdlrm
utils.cpython-37.opt-1.pyc94640644editdlrm
utils.cpython-37.opt-2.pyc61350644editdlrm
utils.cpython-37.pyc94640644editdlrm
_encoded_words.cpython-37.opt-1.pyc56050644editdlrm
_encoded_words.cpython-37.opt-2.pyc37190644editdlrm
_encoded_words.cpython-37.pyc56050644editdlrm
_header_value_parser.cpython-37.opt-1.pyc769220644editdlrm
_header_value_parser.cpython-37.opt-2.pyc603710644editdlrm
_header_value_parser.cpython-37.pyc769700644editdlrm
_parseaddr.cpython-37.opt-1.pyc124160644editdlrm
_parseaddr.cpython-37.opt-2.pyc94560644editdlrm
_parseaddr.cpython-37.pyc124160644editdlrm
_policybase.cpython-37.opt-1.pyc148470644editdlrm
_policybase.cpython-37.opt-2.pyc60000644editdlrm
_policybase.cpython-37.pyc148470644editdlrm
__init__.cpython-37.opt-1.pyc16880644editdlrm
__init__.cpython-37.opt-2.pyc10790644editdlrm
__init__.cpython-37.pyc16880644editdlrm
Edit: /opt/alt/python37/lib64/python3.7/email/__pycache__/header.cpython-37.pyc (16383B)
B  f&^ã@sêdZdddgZddlZddlZddlZddlZddlmZddlm Z e j Z dZ d Z d Zd Zd Zd ZdZe dƒZe dƒZe dejejB¡Ze d¡Ze d¡ZejjZdd„Zddd„ZGdd„dƒZGdd„dƒZ Gdd„de!ƒZ"dS)z+Header encoding and decoding functionality.ÚHeaderÚ decode_headerÚ make_headeréN)ÚHeaderParseError)ÚcharsetÚ ú ó z ÚéNz zus-asciizutf-8ai =\? # literal =? (?P[^?]*?) # non-greedy up to the next ? is the charset \? # literal ? (?P[qQbB]) # either a "q" or a "b", case insensitive \? # literal ? (?P.*?) # non-greedy up to the next ?= is the encoded string \?= # literal ?= z[\041-\176]+:$z \n[^ \t]+:c Cs°t|dƒrdd„|jDƒSt |¡s.|dfgSg}x| ¡D]„}t |¡}d}xp|r¾| d¡}|rn| ¡}d}|r‚| |ddf¡|rP| d¡  ¡}| d¡  ¡}| d¡}| |||f¡qPWqMsz!decode_header..NTrFééÚqÚbéz===zBase64 decoding errorzUnexpected encoding: zraw-unicode-escape)Úhasattrr ÚecreÚsearchÚ splitlinesÚsplitÚpopÚlstripÚappendÚlowerÚ enumerateÚisspaceÚreversedÚemailÚ quoprimimeZ header_decodeÚlenZ base64mimeÚdecodeÚbinasciiÚErrorrÚAssertionErrorÚ isinstancerÚbytesÚBSPACE)ÚheaderZwordsÚlineÚpartsÚfirstZ unencodedrÚencodingZencodedZdroplistÚnÚwÚdZ decoded_wordsZencoded_stringZwordZpaderrZ collapsedZ last_wordÚ last_charsetr r rr=sz       4           cCsJt|||d}x6|D].\}}|dk r6t|tƒs6t|ƒ}| ||¡qW|S)a¼Create a Header from a sequence of pairs as returned by decode_header() decode_header() takes a header value string and returns a sequence of pairs of the format (decoded_string, charset) where charset is the string name of the character set. This function takes one of those sequence of pairs and returns a Header instance. Optional maxlinelen, header_name, and continuation_ws are as in the Header constructor. )Ú maxlinelenÚ header_nameÚcontinuation_wsN)rr,ÚCharsetr )Z decoded_seqr8r9r:ÚhÚsrr r rrœs c@sJeZdZddd„Zdd„Zdd „Zdd d „Zd d „Zddd„Zdd„Z dS)rNrÚstrictcCs||dkrt}nt|tƒs t|ƒ}||_||_g|_|dk rH| |||¡|dkrTt}||_|dkrjd|_ nt |ƒd|_ dS)aDCreate a MIME-compliant header that can contain many character sets. Optional s is the initial header value. If None, the initial header value is not set. You can later append to the header with .append() method calls. s may be a byte string or a Unicode string, but see the .append() documentation for semantics. Optional charset serves two purposes: it has the same meaning as the charset argument to the .append() method. It also sets the default character set for all subsequent .append() calls that omit the charset argument. If charset is not provided in the constructor, the us-ascii charset is used both as s's initial charset and as the default for subsequent .append() calls. The maximum line length can be specified explicitly via maxlinelen. For splitting the first line to a shorter value (to account for the field header which isn't included in s, e.g. `Subject') pass in the name of the field in header_name. The default maxlinelen is 78 as recommended by RFC 2822. continuation_ws must be RFC 2822 compliant folding whitespace (usually either a space or a hard tab) which will be prepended to continuation lines. errors is passed through to the .append() call. Nrr) ÚUSASCIIr,r;rÚ_continuation_wsr r Ú MAXLINELENÚ _maxlinelenÚ _headerlenr')Úselfr=rr8r9r:Úerrorsr r rÚ__init__´s zHeader.__init__c CsÈ| ¡g}d}d}x¨|jD]ž\}}|}|tjkrJ| dd¡}| dd¡}|rš|o^| |d¡}|dkr„|dkrš|sš| t¡d}n|dkrš|sš| t¡|oª| |d¡}|}| |¡qWt   |¡S)z&Return the string value of the header.NÚasciiÚsurrogateescapeÚreplacer)Nzus-asciiéÿÿÿÿ) Ú _normalizer rÚ UNKNOWN8BITÚencoder(Ú _nonctextr ÚSPACEÚ EMPTYSTRINGÚjoin) rDZuchunksÚlastcsÚ lastspacerrZnextcsZoriginal_bytesÚhasspacer r rÚ__str__ãs*       zHeader.__str__cCs |t|ƒkS)N)r)rDÚotherr r rÚ__eq__sz Header.__eq__cCs¶|dkr|j}nt|tƒs"t|ƒ}t|tƒsZ|jp4d}|tjkrN| dd¡}n | ||¡}|jpbd}|tjkr¢y| ||¡Wn"t k r |dkr˜‚t }YnX|j   ||f¡dS)a.Append a string to the MIME header. Optional charset, if given, should be a Charset instance or the name of a character set (which will be converted to a Charset instance). A value of None (the default) means that the charset given in the constructor is used. s may be a byte string or a Unicode string. If it is a byte string (i.e. isinstance(s, str) is false), then charset is the encoding of that byte string, and a UnicodeError will be raised if the string cannot be decoded with that charset. If s is a Unicode string, then charset is a hint specifying the character set of the characters in the string. In either case, when producing an RFC 2822 compliant header using RFC 2047 rules, the string will be encoded using the output codec of the charset. If the string cannot be encoded to the output codec, a UnicodeError will be raised. Optional `errors' is passed as the errors argument to the decode call if s is a byte string. Nzus-asciirH) rr,r;rZ input_codecrLr(Z output_codecrMÚUnicodeEncodeErrorÚUTF8r r )rDr=rrEZ input_charsetZoutput_charsetr r rr s$        z Header.appendcCs| ¡p|dkS)z=True if string s is not a ctext character of RFC822. )ú(ú)ú\)r#)rDr=r r rrN4szHeader._nonctextú;, rcCsª| ¡|dkr|j}|dkr"d}t|j||j|ƒ}d}d}}x.|jD]"\}} |dk r |ol| |d¡}|dkrŒ|r‚| dkr | ¡n| dkr |s | ¡|o°| |d¡}| }d}| ¡} | rÚ|  d| d| ¡n|  dd| ¡xp| dd…D]`} |  ¡| j dk r(|  |jd |   ¡| ¡qö|   ¡} | dt | ƒt | ƒ…} |  | | | ¡qöWt | ƒdkrJ|  ¡qJW|jr‚| ¡| |¡}t |¡r¦td  |¡ƒ‚|S) aÔEncode a message header into an RFC-compliant format. There are many issues involved in converting a given string for use in an email header. Only certain character sets are readable in most email clients, and as header strings can only contain a subset of 7-bit ASCII, care must be taken to properly convert and encode (with Base64 or quoted-printable) header strings. In addition, there is a 75-character length limit on any given encoded header field, so line-wrapping must be performed, even with double-byte character sets. Optional maxlinelen specifies the maximum length of each generated line, exclusive of the linesep string. Individual lines may be longer than maxlinelen if a folding point cannot be found. The first line will be shorter by the length of the header name plus ": " if a header name was specified at Header construction time. The default value for maxlinelen is determined at header construction time. Optional splitchars is a string containing characters which should be given extra weight by the splitting algorithm during normal header wrapping. This is in very rough support of RFC 2822's `higher level syntactic breaks': split points preceded by a splitchar are preferred during line splitting, with the characters preferred in the order in which they appear in the string. Space and tab may be included in the string to indicate whether preference should be given to one over the other as a split point when other split chars do not appear in the line being split. Splitchars does not affect RFC 2047 encoded lines. Optional linesep is a string to be used to separate the lines of the value. The default value is the most useful for typical Python applications, but it can be set to \r\n to produce RFC-compliant line separators when needed. Nri@B)Nzus-asciirJFr rrz8header value appears to contain an embedded header: {!r})rKrBÚ_ValueFormatterrCr@r rNÚadd_transitionrÚfeedÚnewlineÚheader_encodingrr'Ú_strÚ_embedded_headerrrÚformat)rDÚ splitcharsr8ÚlinesepZ formatterrRrTrSrrÚlinesr0ZslineÚfwsÚvaluer r rrM9sR!         z Header.encodecCs|g}d}g}xL|jD]B\}}||kr0| |¡q|dk rL| t |¡|f¡|g}|}qW|rr| t |¡|f¡||_dS)N)r r rOrQ)rDZchunksr7Z last_chunkrrr r rrK‰s zHeader._normalize)NNNNrr>)Nr>)r]Nr) Ú__name__Ú __module__Ú __qualname__rFrUrWr rNrMrKr r r rr³s -  + Pc@sTeZdZdd„Zdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z dS)r^cCs0||_||_t|ƒ|_||_g|_t|ƒ|_dS)N)Ú_maxlenr@r'Ú_continuation_ws_lenÚ _splitcharsÚ_linesÚ _AccumulatorÚ _current_line)rDZ headerlenÚmaxlenr:rfr r rrFžs  z_ValueFormatter.__init__cCs| ¡| |j¡S)N)rarQrq)rDrgr r rrc¦sz_ValueFormatter._strcCs | t¡S)N)rcÚNL)rDr r rrUªsz_ValueFormatter.__str__cCsv|j ¡}|dkr|jj|Žt|jƒdkrh|j ¡rV|jrV|jdt|jƒ7<n|j t|jƒ¡|j ¡dS)N)rr rrJ) rsrÚpushr'Ú is_onlywsrqrr Úreset)rDZ end_of_liner r rra­s  z_ValueFormatter.newlinecCs|j dd¡dS)Nrr )rsrv)rDr r rr_¸sz_ValueFormatter.add_transitioncCsÄ|jdkr| |||j¡dS| || ¡¡}y| d¡}Wntk rPdSX|dk rf| ||¡y | ¡}Wntk r†dSX| ¡|j   |j |¡x|D]}|j   |j |¡q¦WdS)Nr)rbÚ _ascii_splitrpZheader_encode_linesÚ _maxlengthsrÚ IndexErrorÚ _append_chunkrarsrvr@rqr )rDrirrZ encoded_linesZ first_lineÚ last_liner0r r rr`»s$    z_ValueFormatter.feedccs*|jt|jƒVx|j|jVqWdS)N)rnr'rsro)rDr r rrzàsz_ValueFormatter._maxlengthscCsjt dtd||¡}|dr0dg|dd…<n | d¡x*tt|ƒgdŽD]\}}| ||¡qNWdS)Nz([z]+)rr r)ÚrerÚFWSrÚzipÚiterr|)rDrirrfr1Úpartr r rryæs  z_ValueFormatter._ascii_splitcCs |j ||¡t|jƒ|jkrxº|jD]t}xlt|j ¡dddƒD]P}| ¡rp|j|d}|rp|d|krpP|j|dd}|rD|d|krDPqDWq(Pq(W|j ¡\}}|jj dkrÊ|  ¡|sÊd}|j ||¡dS|j  |¡}|j   t|jƒ¡|j |¡dS)NrrrJr)rsrvr'rnrpÚrangeÚ part_countr#rÚ _initial_sizeraÚpop_fromrqr rrx)rDrirZchÚiZprevpartr‚Z remainderr r rr|üs.   z_ValueFormatter._append_chunkN) rkrlrmrFrcrUrar_r`rzryr|r r r rr^s %r^csjeZdZd‡fdd„ Zdd„Zddd„Z‡fdd „Zd d „Zd d „Zddd„Z dd„Z ‡fdd„Z ‡Z S)rrrcs||_tƒ ¡dS)N)r…ÚsuperrF)rDZ initial_size)Ú __class__r rrFsz_Accumulator.__init__cCs| ||f¡dS)N)r )rDrirr r rrv#sz_Accumulator.pushcCs||d…}g||d…<|S)Nr )rDr‡Zpoppedr r rr†&s  z_Accumulator.pop_fromcs| ¡dkrdStƒ ¡S)Nr)r r )r„rˆr)rD)r‰r rr+s z_Accumulator.popcCstdd„|Dƒ|jƒS)Ncss"|]\}}t|ƒt|ƒVqdS)N)r')rrir‚r r rú 1sz'_Accumulator.__len__..)Úsumr…)rDr r rÚ__len__0sz_Accumulator.__len__cCst dd„|Dƒ¡S)Ncss |]\}}t ||f¡VqdS)N)rPrQ)rrir‚r r rrŠ5sz'_Accumulator.__str__..)rPrQ)rDr r rrU4s z_Accumulator.__str__NcCs"|dkr g}||dd…<d|_dS)Nr)r…)rDZstartvalr r rrx8s z_Accumulator.resetcCs|jdko| pt|ƒ ¡S)Nr)r…rr#)rDr r rrw>sz_Accumulator.is_onlywscs tƒ ¡S)N)rˆrŒ)rD)r‰r rr„Asz_Accumulator.part_count)r)r)N) rkrlrmrFrvr†rrŒrUrxrwr„Ú __classcell__r r )r‰rrrs   rr)NNr)#Ú__doc__Ú__all__r~r)Zemail.quoprimimer%Zemail.base64mimeZ email.errorsrrrr;rurOr.ZSPACE8rPrArr?rYÚcompileÚVERBOSEÚ MULTILINErZfcrerdr&Z _max_appendrrrr^Úlistrrr r r rÚs@    _ k