erYvSrSS/rSSKrSSKJr SSKJr SSKJr SSK J r \R"S 5r \R"S 5r \R"S 5r\R"S 5r\R"S 5rS rSr\R"S5r\"5r"SS\5r"SS5r"SS\5rg)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. FeedParserBytesFeedParserN)errors)compat32)deque)StringIOz \r\n|\r|\nz (\r\n|\r|\n)z(\r\n|\r|\n)\Zz%^(From |[\041-\071\073-\176]*:|[\t ]) z3(?P--)?(?P[ \t]*)(?P\r\n|\r|\n)?$cT\rSrSrSrSrSrSrSrSr Sr S r S r S r S rS rg)BufferedSubFile.aWA 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. cZ[SS9Ul[5Ul/UlSUlg)Nr )newlineF)r_partialr_lines _eofstack_closedselfs 6/opt/imh/python3.13/lib/python3.13/email/feedparser.py__init__BufferedSubFile.__init__6s'!, g  c:URRU5 gN)rappend)rpreds rpush_eof_matcher BufferedSubFile.push_eof_matcherAs d#rc6URR5$r)rpoprs rpop_eof_matcherBufferedSubFile.pop_eof_matcherDs~~!!##rcURRS5 URURR55 URRS5 URR 5 SUlg)NrT)rseek pushlines readlinestruncaterrs rcloseBufferedSubFile.closeGsV 1 t}}..01 1   rcUR(dUR(ag[$URR5n[ UR 5H-nU"U5(dMURR U5 g U$Nr )rr NeedMoreDatapopleftreversedr appendleft)rlineateofs rreadlineBufferedSubFile.readlineOsg{{|| {{""$dnn-ET{{ &&t, .  rcPU[LdeURRU5 gr)r-rr0rr1s r unreadlineBufferedSubFile.unreadlineas"<''' t$rcURRU5 SU;aSU;agURRS5 URR5nURRS5 URR 5 USR S5(d)URRUR 55 URU5 g)z$Push some new data into this object.r  Nr)rwriter%r'r(endswithr!r&)rdatapartss rpushBufferedSubFile.pushfs D! t D 0  1 '') 1  Ry!!$'' MM   , urc:URRU5 gr)rextend)rliness rr&BufferedSubFile.pushlines{s 5!rcU$rrs r__iter__BufferedSubFile.__iter__~s rc>UR5nUS:Xa[eU$r,)r3 StopIterationr6s r__next__BufferedSubFile.__next__s}} 2:  r)rrrrN)__name__ __module__ __qualname____firstlineno____doc__rrr"r)r3r7r@r&rHrL__static_attributes__rGrrr r .s9 $$$% *"rr cZ\rSrSrSrS\S.SjjrSrSrSr S r S r S r S r S rSrg)rzA feed-style parser of email.NpolicyclX lSUlUc,URc SSKJn X0lO)URUlOXlU"URS9 [5Ul/Ul UR5RUl SUl SUlSUlg![ a SUlN^f=f)z_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)MessagerVT)rW_old_style_factorymessage_factory email.messagerY_factory TypeErrorr _input _msgstack _parsegenrL_parse_cur_last _headersonly)rr]rWrYs rrFeedParser.__init__s "'  %%-1 ' & 6 6 $M / ,&' nn&//   ! /*.' /sBB32B3cSUlg)NT)rers r_set_headersonlyFeedParser._set_headersonlys  rcZURRU5 UR5 g)zPush more data into the parser.N)r_r@ _call_parse)rr>s rfeedFeedParser.feeds   rcFUR5 g![a gf=fr)rbrKrs rrkFeedParser._call_parses"  KKM   s   ctURR5 UR5 UR5nUR(aeUR 5S:XaVUR 5(dAUR(d0[R"5nURRX5 U$)z>!!  $ $ &+ 5((**43D3D==?F KK % %d 3 rcUR(aUR5nOURURS9nUR(a/URR 5S:XaUR S5 UR (aUR SRU5 UR RU5 XlXl g)NrVzmultipart/digestzmessage/rfc822r;) rZr]rWrcget_content_typeset_default_typer`attachrrd)rmsgs r _new_messageFeedParser._new_messages  " "--/C--t{{-3C 993359KK  !1 2 >> NN2  % %c * c"  rcURR5nUR(aURSUlU$SUlU$)Nr;)r`r!rc)rretvals rrrFeedParser._pop_messages@##% >>r*DI DI rc#^# UR5 /nURHnU[La [v M[R U5(dr[ R U5(dV[ R"5nURRURU5 URRU5 OURU5 M URU5 UR(ay/nURR5nU[La [v M.US:XaOURU5 MGURR!["R%U55 gURR'5S:XGaURR)[ R5 UR+5HnU[La [v M O UR-5 URR/5 URR5nU[La [v M.URR5nU[La [v M.US:XagURRU5 GMURR15S:Xa;UR+5HnU[La [v M O UR-5 gURR15S:XGaURR35nUc[ R4"5nURRURU5 /nURH'nU[La [v MURU5 M) URR!["R%U55 g[7URR9SS55R;5S;a;[ R<"5nURRURU5 S U-mU4S jnSn/n S n S n URR5nU[La [v M.US:XaGOU"U5n U (GaU R?S 5(aSn U R?S 5n GOU(aU (afU Sn [@RCU 5nU(a!U S[EUR?S55*U S'["R%U 5URl#S nURRU5 GMURR5nU[La [v M.U"U5n U (dURRU5 OMZURR)U5 UR+5HnU[La [v M O URHR15S:Xa}URHRJnUS:XaSURHl%OUbK[@RCU5n U (a/[EU R?S55nUSU*URHl%OvURHRLn[OU[65(aK[@RCU5n U (a/US[EU R?S55*nUURHl&URR/5 UR-5 URUl$OU(deU RU5 GMU(a[ RP"5nURRURU5 URR!["R%U 55 /nURHnU[LdM[v M ["R%U5URl%gU (d<[ RR"5nURRURU5 gU (aS/nO/nURH'nU[La [v MURU5 M) U(aAUSn[TR U5nU(a U[EUR?S55SUS'["R%U5URl%g/nURH'nU[La [v MURU5 M) URR!["R%U55 g7f)NTr zmessage/delivery-statusmessagerqzcontent-transfer-encoding8bit)7bitrbinaryz--cp>URT5(dg[RU[T55$r) startswith boundaryendREmatchlen)r1 separators r boundarymatch+FeedParser._parsegen..boundarymatchLs,y11$**4Y@@rFendlinesepr;r)+rr_r-headerRErNLCREr MissingHeaderBodySeparatorDefectrWrvrcr7r_parse_headersrer3 set_payload EMPTYSTRINGjoinr{rrarrr"rs get_boundaryNoBoundaryInMultipartDefectstrgetlower-InvalidMultipartContentTransferEncodingDefectgroup NLCRE_eolsearchrpreamblerdepilogue_payload isinstanceStartBoundaryNotFoundDefectCloseBoundaryNotFoundDefect NLCRE_bol)rheadersr1rxrDrboundaryrcapturing_preamblerrclose_boundary_seenmolastlineeolmorrpayload firstlinebolmors @rraFeedParser._parsegens KKD|#"">>$''{{4((#DDFFKK--dii@KK**40 NN4  G$   E{{++-<'&&2: T" II ! !+"2"25"9 :  99 % % '+D D  ,,U[[9"nn.F-**  / !!# ++- ;;//1D|+** ;;//1D|+** 2:  &&t,?B 99 ) ) +y 8..*\)&& +      99 ) ) +{ :yy--/H  ;;= ))$))V< KKD|+** LL& (  %%k&6&6u&=>DIIMM"=vFGMMO56MMO ))$))V< xI A"& HG"' {{++-<'&&2:"4( xx.2+"$((9"5)#(0|H$-$4$4X$>E$/78M#ekk!n:M9M/N 1<1A1A(1KDII.-2* ..t4 #{{335</"..$*40! KK2248!KK00?"&.."2!\1"..$ #3zz668KG#'::#6#6#r>26DJJ/%1!*!1!1(!;B!&)"((1+&66>uo 3"&**"5"5%gs33!*!1!1'!:B!*12DC 4D3D*E6= 3KK//1%%'"&DJ.--OOD)_f";;= ))$))V< %%k&6&6x&@A KKD|+** (&1%5%5h%? "';;= ))$))V<4 <'&&% $$QK ! 2"+C A,?,@"AHQK!,!1!1(!;DII  KKD|#"" LL   k..u56s _&e:-F e:c|Sn/n[U5GHupEUSS;aXU(d>[R"U5nURR UR U5 MTUR U5 MgU(a5UR R"URRU56 S/p2URS5(aUS:XaX[RU5nU(aUS[URS55*nUR RU5 GMU[U5S- :XaURR!U5 g[R""U5nUR R$R U5 GMUR'S5nUS:Xa>[R("S5nUR R$R U5 GMUS:dS5eUSUnU/nGM U(a3UR R"URRU56 gg) Nr rz zFrom :zMissing header name.z3_parse_headers fed line with no : and no leading WS) enumerater#FirstHeaderLineIsContinuationDefectrWrvrcrset_rawheader_source_parserrrrr set_unixfromr_r7MisplacedEnvelopeHeaderDefectdefectsfindInvalidHeaderDefect) rrD lastheader lastvaluelinenor1rxris rrFeedParser._parse_headerss  %e,LFAw%!$GGMFKK--dii@  & !!4;;#B#B9#MN(*BIw''Q;"))$/B#$6c"((1+&6%67II**40s5zA~-KK**40$AA$GFII%%,,V4 #A Av334JK !!((0Q3 MM M3bqJIg-j  II  t{{>>yI J r) rcr]rer_rdr`rZrbrWr)rNrOrPrQrRrrrhrlrkr)rrrrarrSrGrrrrs<'"">!   |7|:Krc,^\rSrSrSrU4SjrSrU=r$)riz(Like FeedParser, but feed accepts bytes.cD>[TU]URSS55 g)Nasciisurrogateescape)superrldecode)rr> __class__s rrlBytesFeedParser.feeds  T[[*;<=rrG)rNrOrPrQrRrlrS __classcell__)rs@rrrs2>>r)rR__all__reemailremail._policybaser collectionsriorcompilerrr NLCRE_crackrrNLrobjectr-r rrrGrrrs " * + & =! JJ ' JJ( ) jj)  ::> ?   :< x WfWtJKJKZ >j>r