ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ A[c@`sVdZddlmZddlmZddlmZddlmZmZmZddl m Z m Z ddgZ dd l Z dd lmZdd lmZdd lmZe jd Ze jdZe jdZe jdZe jdZdZdZeZdefdYZdefdYZdefdYZd S(uFeedParser - 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. i(tunicode_literals(tdivision(tabsolute_import(tobjecttrangetsuper(timplements_iteratortPY3u FeedParseruBytesFeedParserN(terrors(tmessage(tcompat32u | | u( | | )u ( | | )\Zu(^(From |[\041-\071\073-\176]{1,}:|[\t ])uu tBufferedSubFilecB`sheZdZdZdZdZdZdZdZdZ dZ d Z d Z RS( ukA 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. cC`s(d|_g|_g|_t|_dS(Nu(t_partialt_linest _eofstacktFalset_closed(tself((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyt__init__9s   cC`s|jj|dS(N(Rtappend(Rtpred((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytpush_eof_matcherCscC`s |jjS(N(Rtpop(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytpop_eof_matcherFscC`s)|jj|jd|_t|_dS(Nu(R RR tTrueR(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytcloseIs cC`sn|js|jrdStS|jj}x>|jdddD]&}||r@|jj|dSq@W|S(Nui(R Rt NeedMoreDataRRR(Rtlinetateof((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytreadlineOs   cC`s|jj|dS(N(R R(RR((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyt unreadlineascC`s|j|d}|_tj|}|j|_|j rw|rw|djdrw|jd|j|_ng}xCtt|dD]+}|j||d||ddqW|j|dS(u$Push some new data into this object.uiu iiiN( R t NLCRE_cracktsplitRtendswithRtlenRt pushlines(Rtdatatpartstlinesti((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytpushfs#)cC`s|ddd|jd*dS(Nii(R (RR&((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR#}scC`s|S(N((R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyt__iter__scC`s%|j}|dkr!tn|S(Nu(Rt StopIteration(RR((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyt__next__s   ( t__name__t __module__t__doc__RRRRRRR(R#R)R+(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR 1s        t FeedParsercB`seeZdZejdZdZdZdZdZ dZ dZ dZ d Z RS( uA feed-style parser of email.c `sd|kr |d}|d=nt}|_|_y&|djfd_Wntk r}d_nXt_g_trj j _ nj j _ d_d_t_dS(Nupolicytpolicyc`sijd6S(Nupolicy(R0((R(sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyttcS`siS(N((((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR1R2(R t_factoryR0t _factory_kwdst TypeErrorR t_inputt _msgstackRt _parsegenR+t_parsetnexttNonet_curt_lastRt _headersonly(RR3t _3to2kwargsR0((RsR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRs&        cC`s t|_dS(N(RR>(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyt_set_headersonlyscC`s|jj||jdS(uPush more data into the parser.N(R6R(t _call_parse(RR$((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytfeedscC`s&y|jWntk r!nXdS(N(R9R*(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRAs cC`sh|jj|j|j}|jdkrd|j rdtj}|jj ||n|S(u<Parse all remaining data and return the root message object.u multipart( R6RRAt _pop_messagetget_content_maintypet is_multipartRt!MultipartInvariantViolationDefectR0t handle_defect(Rtroottdefect((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRs     cC`s|j|j}|jrC|jjdkrC|jdn|jrc|jdj|n|jj|||_||_dS(Numultipart/digestumessage/rfc822i( R3R4R<tget_content_typetset_default_typeR7tattachRR=(Rtmsg((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyt _new_messages  cC`s8|jj}|jr+|jd|_n d|_|S(Ni(R7RR<R;(Rtretval((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRCs   cc`s4|jg}x|jD]}|tkr7tVqntj|stj|stj}|jj |j ||jj |nPn|j |qW|j ||jr(g}xMtr |jj}|tkrtVqn|dkrPn|j |qW|j jtj|dS|j jdkr1xtr,|jjtjx,|jD]}|tkrtVqfnPqfW|j}|jjx1tr|jj}|tkrtVqnPqWx1tr|jj}|tkrtVqnPqW|dkrPn|jj |q@WdS|j jdkrx,|jD]}|tkrptVqSnPqSW|jdS|j jdkr|j j}|dkr0tj}|jj |j |g}x5|jD]*}|tkrtVqn|j |qW|j jtj|dS|j jddjdkrvtj}|jj |j |nd |}t j!d t j"|d } t} g} t#} t#} xtrp|jj}|tkrtVqn|dkrPn| j|}|r`|j$d r4t} |j$d } Pn| r| r| d}t%j&|}|r|t'|j$d | du4)(?P--)?(?P[ \t]*)(?P\r\n|\r|\n)?$uendulinesepii(u7bitu8bitubinary(1RNR6RtheaderREtmatchtNLCRERt MissingHeaderBodySeparatorDefectR0RGR<RRt_parse_headersR>RRt set_payloadt EMPTYSTRINGtjoinRJRR8RCRRDt get_boundaryR;tNoBoundaryInMultipartDefecttgettlowert-InvalidMultipartContentTransferEncodingDefecttretcompiletescapeRtgroupt NLCRE_eoltsearchR"tpreambleR=tepiloguet_payloadt isinstancetstrtStartBoundaryNotFoundDefecttCloseBoundaryNotFoundDefectt NLCRE_bol(RtheadersRRIR&RORMtboundaryt separatort boundaryretcapturing_preambleRctlineseptclose_boundary_seentmotlastlineteolmoRdtendtpayloadt firstlinetbolmo((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR8sf                              !                # c C`sd}g}xwt|D]i\}}|ddkry|sftj|}|jj|j|qn|j|qn|r|jj|jj|dg}}n|j dr`|dkrt j |}|r|t |j d }n|jj|qq`|t |dkr8|jj|dStj|}|jjj|qn|jd}|| }|g}qW|r|jj|jj|ndS(Nuiu uFrom iu:(t enumerateRt#FirstHeaderLineIsContinuationDefectR0RGR<Rtset_rawtheader_source_parset startswithRaRbR"R`t set_unixfromR6RtMisplacedEnvelopeHeaderDefecttdefectstfind( RR&t lastheadert lastvaluetlinenoRRIRrR'((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRTs>    (R,R-R.R tMessageRR@RBRARRNRCR8RT(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR/s     tBytesFeedParsercB`seZdZdZRS(u(Like FeedParser, but feed accepts bytes.cC`s tj|jdddS(Nuasciiusurrogateescape(RRBtdecode(RR$((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRB s(R,R-R.RB(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR s(R.t __future__RRRtfuture.builtinsRRRt future.utilsRRt__all__R]tfuture.backports.emailRR t"future.backports.email._policybaseR R^RRRjRaRRPRVtNLRR R/R(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyts,   Z