R
    ¢¤Òjj  ã                   ó”   €   Q s , QNs] QHGsGs ] QHGsGs ] QH G	s	   Q Q2      s
  Q	 Q\
2      s  Q
 Q2      s  Q Q\2      sP! )z-A parser of RFC 5322 and MIME email messages.ÚParserÚHeaderParserÚBytesParserÚBytesHeaderParser)ÚStringIOÚTextIOWrapper)Ú
FeedParserÚBytesFeedParser)Úcompat32c                   óH   ` €   \ sQ s]s n QQ\-Q kksQQ ksQQ ksQsU s	P! )r   Úpolicyc               ó    €   Vm         V m        P! )a  Parser of RFC 5322 and MIME email messages.

Creates an in-memory object tree representing the email message, which
can then be manipulated and turned over to a Generator to return the
textual representation of the message.

The string must be formatted as a block of RFC 5322 headers and header
continuation lines, optionally preceded by a 'Unix-from' header.  The
header block is terminated either by the end of the string or by a
blank line.

_class is the class to instantiate for new message objects when they
must be created.  This class must have a constructor that can take
zero arguments.  Default is Message.Message.

The policy keyword specifies a policy object that controls a number of
aspects of the parser's operation.  The default policy maintains
backward compatibility.

©Ú_classr   )Úselfr   r   s   &&$Ú)/usr/local/lib/python3.15/email/parser.pyÚ__init__ÚParser.__init__   s   � ð* ŒØŽó    c                óî   €   [        U O                  U O                  Q5      oU%       c   UO                  2        UO	                  Q2      9o%       c   UO                  U2       J,  UO                  2       ! )a4  Create a message structure from the data in a file.

Reads all the data from the file and returns the root of the message
structure.  Optional headersonly is a flag specifying whether to stop
parsing after reading the headers or not.  The default is False,
meaning it parses the entire contents of the file.
)r   i    )r   r   r   Ú_set_headersonlyÚreadÚfeedÚclose)r   ÚfpÚheadersonlyÚ
feedparserÚdatas   &&&  r   ÚparseÚParser.parse)   sU   � ô   §¡°D·K±KÔ@ˆ
ßØ×'Ñ'Ô)Ø—g‘g˜d“mÐ#ˆdÖ#Ø�O‰O˜DÖ!Ø×ÑÓ!Ð!r   c                ó<   €   U O                  [        U2      UQ5      ! )a  Create a message structure from a string.

Returns the root of the message structure.  Optional headersonly is a
flag specifying whether to stop parsing after reading the headers or
not.  The default is False, meaning it parses the entire contents of
the file.
©r   )r   r   ©r   Útextr   s   &&&r   ÚparsestrÚParser.parsestr8   s   � ð �z‰zœ( 4›.°kˆzÓBÐBr   r   )N©F)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r
   r   r   r$   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s"   ø‡ � ñ¨hõ ô0"÷Cò Cr   c                   ó6   ` €   \ sQ s]Cs n QQ ksQQ ksQsU sP! )r   c                ó0   €   [         O                  VP	2      ! ©T)r   r   ©r   r   r   s   &&&r   r   ÚHeaderParser.parseD   s   � Ü�|‰|˜D dÓ+Ð+r   c                ó0   €   [         O                  VP	2      ! r1   )r   r$   r"   s   &&&r   r$   ÚHeaderParser.parsestrG   s   � Ü�‰˜t¨4Ó0Ð0r   © r1   )r'   r(   r)   r*   r   r$   r+   r,   r-   s   @r   r   r   C   s   ø‡ � ô,÷1ò 1r   c                   ó<   ` €   \ sQ s]Ks n Q sQQ ksQQ ksQsU sP! )r   c                ó*   €   [        U- U@   U m        P! )ax  Parser of binary RFC 5322 and MIME email messages.

Creates an in-memory object tree representing the email message, which
can then be manipulated and turned over to a Generator to return the
textual representation of the message.

The input must be formatted as a block of RFC 5322 headers and header
continuation lines, optionally preceded by a 'Unix-from' header.  The
header block is terminated either by the end of the input or by a
blank line.

_class is the class to instantiate for new message objects when they
must be created.  This class must have a constructor that can take
zero arguments.  Default is Message.Message.
)r   Úparser)r   ÚargsÚkws   &*,r   r   ÚBytesParser.__init__M   s   � ô  ˜dÐ) bÒ)ˆŽr   c                ó¢   €   [        UQQQ5      o U O                  O                  V2      UO                  2        !  SO                  2        h 9 h)a;  Create a message structure from the data in a binary file.

Reads all the data from the file and returns the root of the message
structure.  Optional headersonly is a flag specifying whether to stop
parsing after reading the headers or not.  The default is False,
meaning it parses the entire contents of the file.
ÚasciiÚsurrogateescape)ÚencodingÚerrors)r   r9   r   Údetachr2   s   &&&r   r   ÚBytesParser.parse_   s=   � ô ˜2¨Ð8IÔJˆð	Ø—;‘;×$Ñ$ RÓ5à�I‰I�KøˆB�I‰I�Kús	   ‘< ¼Ac                ó`   €   UO                  QQQ5      oU O                  O                  V2      ! )a
  Create a message structure from a byte string.

Returns the root of the message structure.  Optional headersonly is a
flag specifying whether to stop parsing after reading the headers or
not.  The default is False, meaning it parses the entire contents of
the file.
ÚASCIIr?   )rA   )Údecoder9   r$   r"   s   &&&r   Ú
parsebytesÚBytesParser.parsebytesn   s,   � ð �{‰{˜7Ð+<ˆ{Ó=ˆØ�{‰{×#Ñ# DÓ6Ð6r   )r9   r&   )	r'   r(   r)   r*   r   r   rG   r+   r,   r-   s   @r   r   r   K   s   ø‡ � ò*ô$÷	7ò 	7r   c                   ó6   ` €   \ sQ s]zs n QQ ksQQ ksQsU sP! )r   c                ó2   €   [         O                  VP	Q5      ! ©Tr!   )r   r   r2   s   &&&r   r   ÚBytesHeaderParser.parse{   s   � Ü× Ñ  °tÐ Ó<Ð<r   c                ó2   €   [         O                  VP	Q5      ! rK   )r   rG   r"   s   &&&r   rG   ÚBytesHeaderParser.parsebytes~   s   � Ü×%Ñ% d¸dÐ%ÓCÐCr   r6   r1   )r'   r(   r)   r*   r   rG   r+   r,   r-   s   @r   r   r   z   s   ø‡ � ô=÷Dò Dr   )r   r   r   r   r   r	   )Ú__doc__Ú__all__Úior   r   Úemail.feedparserr   r	   Úemail._policybaser
   r   r   r   r   r6   r   r   Ú<module>rT      sN   ññ
 4ò,€÷ 'ç 8Ý &÷0Cñ 0Côf1�6ô 1÷,7ñ ,7ô^D˜ö Dr   