ÿØÿà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&|tk st|jj|dS(N(RtAssertionErrorR 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(R1((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.pyR2R3(R t_factoryR1t _factory_kwdst TypeErrorR t_inputt _msgstackRt _parsegenR,t_parsetnexttNonet_curt_lastRt _headersonly(RR4t _3to2kwargsR1((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(R7R)t _call_parse(RR%((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pytfeedscC`s&y|jWntk r!nXdS(N(R:R+(R((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRBs cC`sx|jj|j|j}|j s3t|jdkrt|j rttj }|j j ||n|S(u<Parse all remaining data and return the root message object.u multipart( R7RRBt _pop_messageR8Rtget_content_maintypet is_multipartRt!MultipartInvariantViolationDefectR1t 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( R4R5R=tget_content_typetset_default_typeR8tattachRR>(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(R8RR=R<(Rtretval((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRDs   cc`s@|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#} xtr||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(2ROR7RtheaderREtmatchtNLCRERt MissingHeaderBodySeparatorDefectR1RHR=RRt_parse_headersR?RRt set_payloadt EMPTYSTRINGtjoinRKRR9RDRREt get_boundaryR<tNoBoundaryInMultipartDefecttgettlowert-InvalidMultipartContentTransferEncodingDefecttretcompiletescapeRtgroupt NLCRE_eoltsearchR#tpreambleR>tepiloguet_payloadt isinstancetstrRtStartBoundaryNotFoundDefecttCloseBoundaryNotFoundDefectt NLCRE_bol(RtheadersRRJR'RPRNtboundaryt separatort boundaryretcapturing_preambleRdtlineseptclose_boundary_seentmotlastlineteolmoRetendtpayloadt firstlinetbolmo((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR9sh                              !                 # c C`sd}g}xt|D]\}}|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}|dkstd|| }|g}qW|r|jj|jj|ndS(Nuiu uFrom iu:u3_parse_headers fed line with no : and no leading WS(t enumerateRt#FirstHeaderLineIsContinuationDefectR1RHR=Rtset_rawtheader_source_parset startswithRbRcR#Rat set_unixfromR7RtMisplacedEnvelopeHeaderDefecttdefectstfindR( RR't lastheadert lastvaluetlinenoRRJRsR(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRUs@    (R-R.R/R tMessageRRARCRBRRORDR9RU(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyR0s     tBytesFeedParsercB`seZdZdZRS(u(Like FeedParser, but feed accepts bytes.cC`s tj|jdddS(Nuasciiusurrogateescape(RRCtdecode(RR%((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyRC s(R-R.R/RC(((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_RSRkRbR RQRWtNLRR R0R(((sR/opt/alt/python27/lib/python2.7/site-packages/future/backports/email/feedparser.pyts,   Z