/opt/alt/python39/lib64/python3.9/email/__pycache__
NameSizeModeActions
base64mime.cpython-39.opt-1.pyc32520644editdlrm
base64mime.cpython-39.opt-2.pyc14750644editdlrm
base64mime.cpython-39.pyc32520644editdlrm
charset.cpython-39.opt-1.pyc114450644editdlrm
charset.cpython-39.opt-2.pyc51160644editdlrm
charset.cpython-39.pyc114660644editdlrm
contentmanager.cpython-39.opt-1.pyc73730644editdlrm
contentmanager.cpython-39.opt-2.pyc73730644editdlrm
contentmanager.cpython-39.pyc73730644editdlrm
encoders.cpython-39.opt-1.pyc16350644editdlrm
encoders.cpython-39.opt-2.pyc12840644editdlrm
encoders.cpython-39.pyc16350644editdlrm
errors.cpython-39.opt-1.pyc60900644editdlrm
errors.cpython-39.opt-2.pyc46240644editdlrm
errors.cpython-39.pyc60900644editdlrm
feedparser.cpython-39.opt-1.pyc105010644editdlrm
feedparser.cpython-39.opt-2.pyc88380644editdlrm
feedparser.cpython-39.pyc106220644editdlrm
generator.cpython-39.opt-1.pyc129930644editdlrm
generator.cpython-39.opt-2.pyc92940644editdlrm
generator.cpython-39.pyc129930644editdlrm
header.cpython-39.opt-1.pyc164450644editdlrm
header.cpython-39.opt-2.pyc108210644editdlrm
header.cpython-39.pyc164450644editdlrm
headerregistry.cpython-39.opt-1.pyc219430644editdlrm
headerregistry.cpython-39.opt-2.pyc161800644editdlrm
headerregistry.cpython-39.pyc219790644editdlrm
iterators.cpython-39.opt-1.pyc19440644editdlrm
iterators.cpython-39.opt-2.pyc13240644editdlrm
iterators.cpython-39.pyc19440644editdlrm
message.cpython-39.opt-1.pyc378490644editdlrm
message.cpython-39.opt-2.pyc212910644editdlrm
message.cpython-39.pyc378490644editdlrm
parser.cpython-39.opt-1.pyc57590644editdlrm
parser.cpython-39.opt-2.pyc27410644editdlrm
parser.cpython-39.pyc57590644editdlrm
policy.cpython-39.opt-1.pyc96520644editdlrm
policy.cpython-39.opt-2.pyc34370644editdlrm
policy.cpython-39.pyc96520644editdlrm
quoprimime.cpython-39.opt-1.pyc76870644editdlrm
quoprimime.cpython-39.opt-2.pyc42120644editdlrm
quoprimime.cpython-39.pyc76870644editdlrm
utils.cpython-39.opt-1.pyc117640644editdlrm
utils.cpython-39.opt-2.pyc81410644editdlrm
utils.cpython-39.pyc117640644editdlrm
_encoded_words.cpython-39.opt-1.pyc57200644editdlrm
_encoded_words.cpython-39.opt-2.pyc38340644editdlrm
_encoded_words.cpython-39.pyc57200644editdlrm
_header_value_parser.cpython-39.opt-1.pyc803260644editdlrm
_header_value_parser.cpython-39.opt-2.pyc633940644editdlrm
_header_value_parser.cpython-39.pyc803580644editdlrm
_parseaddr.cpython-39.opt-1.pyc124060644editdlrm
_parseaddr.cpython-39.opt-2.pyc94460644editdlrm
_parseaddr.cpython-39.pyc124060644editdlrm
_policybase.cpython-39.opt-1.pyc152790644editdlrm
_policybase.cpython-39.opt-2.pyc60260644editdlrm
_policybase.cpython-39.pyc152790644editdlrm
__init__.cpython-39.opt-1.pyc16800644editdlrm
__init__.cpython-39.opt-2.pyc10550644editdlrm
__init__.cpython-39.pyc16800644editdlrm
Edit: /opt/alt/python39/lib64/python3.9/email/__pycache__/feedparser.cpython-39.opt-1.pyc (10501B)
a XC?hüXã@s¶dZddgZddlZddlmZddlmZddlmZddl m Z e  d ¡Z e  d ¡Z e  d ¡Ze  d ¡Ze  d ¡Zd ZdZeƒZGdd„deƒZGdd„dƒZGdd„deƒZdS)aFeedParser - An email feed parser. The feed parser implements an interface for incrementally parsing an email message, line by line. This has advantages for certain applications, such as those reading email messages off a socket. FeedParser.feed() is the primary interface for pushing new data into the parser. It returns when there's nothing more it can do with the available data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. Ú FeedParserÚBytesFeedParseréN)Úerrors)Úcompat32)Údeque)ÚStringIOz \r\n|\r|\nz (\r\n|\r|\n)z(\r\n|\r|\n)\Zz%^(From |[\041-\071\073-\176]*:|[\t ])ÚÚ c@s`eZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dd„Z dS)ÚBufferedSubFileakA file-ish object that can have new data loaded into it. You can also push and pop line-matching predicates onto a stack. When the current predicate matches the current line, a false EOF response (i.e. empty string) is returned instead. This lets the parser adhere to a simple abstraction -- it parses until EOF closes the current message. cCs$tdd|_tƒ|_g|_d|_dS)Nr)ÚnewlineF)rÚ_partialrÚ_linesÚ _eofstackÚ_closed©Úself©rú5/opt/alt/python39/lib64/python3.9/email/feedparser.pyÚ__init__5s zBufferedSubFile.__init__cCs|j |¡dS©N)rÚappend)rZpredrrrÚpush_eof_matcher@sz BufferedSubFile.push_eof_matchercCs |j ¡Sr)rÚpoprrrrÚpop_eof_matcherCszBufferedSubFile.pop_eof_matchercCs<|j d¡| |j ¡¡|j d¡|j ¡d|_dS)NrT)r ÚseekÚ pushlinesÚ readlinesÚtruncaterrrrrÚcloseFs    zBufferedSubFile.closecCsL|js|jrdStS|j ¡}t|jƒD]}||ƒr(|j |¡dSq(|S©Nr)r rÚ NeedMoreDataÚpopleftÚreversedrÚ appendleft)rÚlineZateofrrrÚreadlineNs  zBufferedSubFile.readlinecCs|j |¡dSr)r r#©rr$rrrÚ unreadline`szBufferedSubFile.unreadlinecCsx|j |¡d|vr d|vr dS|j d¡|j ¡}|j d¡|j ¡|d d¡sj|j | ¡¡| |¡dS)z$Push some new data into this object.r ú Nréÿÿÿÿ)r ÚwriterrrÚendswithrr)rÚdataÚpartsrrrÚpushes     zBufferedSubFile.pushcCs|j |¡dSr)r Úextend)rÚlinesrrrrzszBufferedSubFile.pushlinescCs|SrrrrrrÚ__iter__}szBufferedSubFile.__iter__cCs| ¡}|dkrt‚|Sr)r%Ú StopIterationr&rrrÚ__next__€szBufferedSubFile.__next__N)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrr%r'r.rr1r3rrrrr -s r c@s`eZdZdZdedœdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dd„Z dd„Z dd„Z dS)rzA feed-style parser of email.N©ÚpolicycCsœ||_d|_|dur<|jdur2ddlm}||_ql|j|_n0||_z||jdWntyjd|_Yn0tƒ|_g|_ |  ¡j |_ d|_ d|_d|_dS)a_factory is called with no arguments to create a new message obj The policy keyword specifies a policy object that controls a number of aspects of the parser's operation. The default policy maintains backward compatibility. FNr)ÚMessager8T)r9Ú_old_style_factoryZmessage_factoryZ email.messager:Ú_factoryÚ TypeErrorr Ú_inputÚ _msgstackÚ _parsegenr3Ú_parseÚ_curÚ_lastÚ _headersonly)rr<r9r:rrrr‹s$      zFeedParser.__init__cCs d|_dS)NT)rDrrrrÚ_set_headersonlyªszFeedParser._set_headersonlycCs|j |¡| ¡dS)zPush more data into the parser.N)r>r.Ú _call_parse©rr,rrrÚfeed­s zFeedParser.feedcCs$z | ¡WntyYn0dSr)rAr2rrrrrF²s  zFeedParser._call_parsecCsH|j ¡| ¡| ¡}| ¡dkrD| ¡sDt ¡}|j  ||¡|S)zrrFÚ _pop_messageÚget_content_maintypeZ is_multipartrZ!MultipartInvariantViolationDefectr9Ú handle_defect)rÚrootÚdefectrrrr¸s  ÿzFeedParser.closecCsn|jr| ¡}n|j|jd}|jr<|j ¡dkr<| d¡|jrR|jd |¡|j |¡||_||_ dS)Nr8zmultipart/digestzmessage/rfc822r)) r;r<r9rBÚget_content_typeZset_default_typer?ZattachrrC)rÚmsgrrrÚ _new_messageÅs   zFeedParser._new_messagecCs(|j ¡}|jr|jd|_nd|_|S)Nr))r?rrB)rÚretvalrrrrJÒs  zFeedParser._pop_messageccs| ¡g}|jD]Z}|tur&tVqt |¡sbt |¡s^t ¡}|j  |j |¡|j  |¡qn|  |¡q|  |¡|jrÈg}|j ¡}|turœtVq‚|dkr¦q²|  |¡q‚|j  t |¡¡dS|j  ¡dkrŠ|j tj¡| ¡D]}|turtVqîq qî| ¡}|j ¡|j ¡}|turDtVqqDq|j ¡}|turjtVqDqjqD|dkrxq†|j  |¡qØdS|j  ¡dkrÐ| ¡D] }|turºtVq¢qÄq¢| ¡dS|j  ¡dkrÔ|j  ¡}|durRt ¡}|j  |j |¡g}|jD]$}|tur.tVq|  |¡q|j  t |¡¡dSt|j  dd¡ƒ ¡dvr†t ¡}|j  |j |¡d|}t  d t !|¡d ¡} d } g} d } d } |j ¡}|turÔtVq¶|dkrâqÂ|  |¡}|r´| "d ¡rd } | "d¡} qÂ| rr| r^| d}t# $|¡}|rP|dt%| "d¡ƒ …| d<t | ¡|j _&d } |j  |¡q¶|j ¡}|turtVqr|  |¡}|sr|j  |¡q´qr|j | j¡| ¡D] }|turâtVqÊqìqÊ|j' ¡dkrT|j'j(}|dkrd|j'_(n:|dur˜t# $|¡}|r˜t%| "d¡ƒ}|d| …|j'_(nD|j'j)}t*|tƒr˜t# $|¡}|r˜|dt%| "d¡ƒ …}||j'_)|j ¡| ¡|j |_'n |   |¡q¶| r*t +¡}|j  |j |¡|j  t | ¡¡g}|jD]}|turütVqüqüt |¡|j _(dS| sLt ,¡}|j  |j |¡dS| rZdg}ng}|jD]$}|tur|tVqd|  |¡qd|rÂ|d}t- |¡}|rÂ|t%| "d¡ƒd…|d<t |¡|j _(dSg}|jD]$}|turötVqÞ|  |¡qÞ|j  t |¡¡dS)Nrzmessage/delivery-statusÚmessagerIzcontent-transfer-encodingÚ8bit)Z7bitrTZbinaryz--z(?Pz4)(?P--)?(?P[ \t]*)(?P\r\n|\r|\n)?$TFÚendÚlinesepr)r).rQr>r ÚheaderREÚmatchÚNLCRErZ MissingHeaderBodySeparatorDefectr9rLrBr'rÚ_parse_headersrDr%Z set_payloadÚ EMPTYSTRINGÚjoinrOrr@rJrrKZ get_boundaryZNoBoundaryInMultipartDefectÚstrÚgetÚlowerZ-InvalidMultipartContentTransferEncodingDefectÚreÚcompileÚescapeÚgroupÚ NLCRE_eolÚsearchÚlenÚpreamblerCÚepilogueZ_payloadÚ isinstanceZStartBoundaryNotFoundDefectZCloseBoundaryNotFoundDefectÚ NLCRE_bol)rZheadersr$rNr0rRrPÚboundaryZ separatorZ boundaryreZcapturing_preamblergrVZclose_boundary_seenÚmoZlastlineZeolmorhrUZpayloadÚ firstlineZbolmorrrr@Ús`                       ÿ ÿÿ                              zFeedParser._parsegenc CsXd}g}t|ƒD]&\}}|ddvrR|sFt |¡}|j |j|¡q| |¡q|rt|jj|j |¡Ždg}}|  d¡rø|dkr¼t   |¡}|r¬|dt |  d¡ƒ …}|j |¡qn<|t |ƒdkrÞ|j |¡dSt |¡}|jj |¡q| d¡}|dkr&t d¡}|jj |¡q|d|…}|g}q|rT|jj|j |¡ŽdS)Nrrz zFrom éú:zMissing header name.)Ú enumeraterZ#FirstHeaderLineIsContinuationDefectr9rLrBrZset_rawZheader_source_parseÚ startswithrdrerfrcZ set_unixfromr>r'ZMisplacedEnvelopeHeaderDefectZdefectsÚfindZInvalidHeaderDefect) rr0Z lastheaderZ lastvalueÚlinenor$rNrlÚirrrrZ×sF             zFeedParser._parse_headers)N)r4r5r6r7rrrErHrFrrQrJr@rZrrrrrˆs  ~cs eZdZdZ‡fdd„Z‡ZS)rz(Like FeedParser, but feed accepts bytes.cstƒ | dd¡¡dS)NÚasciiÚsurrogateescape)ÚsuperrHÚdecoderG©Ú __class__rrrHszBytesFeedParser.feed)r4r5r6r7rHÚ __classcell__rrryrrs)r7Ú__all__r`ZemailrZemail._policybaserÚ collectionsrÚiorrarYrjrdZ NLCRE_crackrWr[ÚNLÚobjectr r rrrrrrÚs(         [