
    h!                        S r SSKJr   " S S\5      r " S S\5      r " S S\5      r " S	 S
\5      r " S S\5      r " S S\5      r	 " S S\5      r
 " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r " S/ S0\5      r " S1 S2\5      r " S3 S4\5      r " S5 S6\5      r " S7 S8\5      r " S9 S:\5      r " S; S<\5      r  " S= S>\5      r! " S? S@\!5      r" " SA SB\"5      r# " SC SD\"5      r$ " SE SF\5      r% " SG SH\5      r& " SI SJ\5      r' " SK SL\5      r( " SM SN\(5      r) " SO SP\(5      r* " SQ SR\(5      r+ " SS ST\(5      r, " SU SV\(5      r-gW)Xz 
Exceptions in L{twisted.mail}.
    )Optionalc                       \ rS rSrSrg)IMAP4Exception    N__name__
__module____qualname____firstlineno____static_attributes__r       [/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/mail/_except.pyr   r          r   r   c                       \ rS rSrSrg)IllegalClientResponse   r   Nr   r   r   r   r   r      r   r   r   c                       \ rS rSrSrg)IllegalOperation   r   Nr   r   r   r   r   r      r   r   r   c                       \ rS rSrSrg)IllegalMailboxEncoding   r   Nr   r   r   r   r   r      r   r   r   c                       \ rS rSrSrg)MailboxException   r   Nr   r   r   r   r   r      r   r   r   c                   "    \ rS rSrS\4S jrSrg)MailboxCollision   returnc                      SU R                   -  $ )NzMailbox named %s already existsargsselfs    r   __str__MailboxCollision.__str__    s    0499<<r   r   Nr	   r
   r   r   strr&   r   r   r   r   r   r      s    = =r   r   c                   "    \ rS rSrS\4S jrSrg)NoSuchMailbox$   r    c                      SU R                   -  $ )NzNo mailbox named %s existsr"   r$   s    r   r&   NoSuchMailbox.__str__%   s    +dii77r   r   Nr(   r   r   r   r+   r+   $   s    8 8r   r+   c                   "    \ rS rSrS\4S jrSrg)ReadOnlyMailbox)   r    c                     g)NzMailbox open in read-only stater   r$   s    r   r&   ReadOnlyMailbox.__str__*   s    0r   r   Nr(   r   r   r   r0   r0   )   s    1 1r   r0   c                       \ rS rSrSrg)UnhandledResponse.   r   Nr   r   r   r   r5   r5   .   r   r   r5   c                       \ rS rSrSrg)NegativeResponse2   r   Nr   r   r   r   r8   r8   2   r   r   r8   c                   (    \ rS rSrS rS\4S jrSrg)NoSupportedAuthentication6   c                 H    [         R                  U S5        Xl        X l        g )Nz-No supported authentication schemes available)r   __init__serverSupportsclientSupports)r%   r?   r@   s      r   r>   "NoSupportedAuthentication.__init__7   s    &UV,,r   r    c                 z    [         R                  U 5      SR                  U R                  U R                  5      -   $ )Nz,: Server supports {!r}, client supports {!r})r   r&   formatr?   r@   r$   s    r   r&   !NoSupportedAuthentication.__str__<   s=    %%
:AA

 	
r   )r@   r?   Nr	   r
   r   r   r>   r)   r&   r   r   r   r   r;   r;   6   s    -

 
r   r;   c                       \ rS rSrSrg)IllegalServerResponseE   r   Nr   r   r   r   rG   rG   E   r   r   rG   c                       \ rS rSrSrg)IllegalIdentifierErrorI   r   Nr   r   r   r   rJ   rJ   I   r   r   rJ   c                       \ rS rSrSrg)IllegalQueryErrorM   r   Nr   r   r   r   rM   rM   M   r   r   rM   c                       \ rS rSrSrg)MismatchedNestingQ   r   Nr   r   r   r   rP   rP   Q   r   r   rP   c                       \ rS rSrSrg)MismatchedQuotingU   r   Nr   r   r   r   rS   rS   U   r   r   rS   c                       \ rS rSrSrg)	SMTPErrorY   r   Nr   r   r   r   rV   rV   Y   r   r   rV   c                   n    \ rS rSrSr    SS\S\S\\   S\\   S\	S	\	4S
 jjr
S\4S jrS\4S jrSrg)SMTPClientError]   z$
Base class for SMTP client errors.
Ncoderesplog	addressesisFatalretryc                     [        U[        5      (       a  UR                  S5      n[        U[        5      (       a  UR                  S5      nXl        X l        X0l        X@l        XPl        X`l        g)a'  
@param code: The SMTP response code associated with this error.
@param resp: The string response associated with this error.
@param log: A string log of the exchange leading up to and including
    the error.
@param isFatal: A boolean indicating whether this connection can
    proceed or not. If True, the connection will be dropped.
@param retry: A boolean indicating whether the delivery should be
    retried. If True and the factory indicates further retries are
    desirable, they will be attempted, otherwise the delivery will be
    failed.
utf-8N)	
isinstancer)   encoder[   r\   r]   r^   r_   r`   r%   r[   r\   r]   r^   r_   r`   s          r   r>   SMTPClientError.__init__b   sX    * dC  ;;w'Dc3**W%C		"
r   r    c                 @    U R                  5       R                  S5      $ )Nrb   )	__bytes__decoder$   s    r   r&   SMTPClientError.__str__   s    ~~&&w//r   c                 2   U R                   S:  a-  U R                   S S3R                  5       U R                  -   /nOU R                  /nU R                  (       a,  UR	                  U R                  5        UR	                  S5        SR                  U5      $ )Nr   03d r      
)r[   rd   r\   r]   appendjoin)r%   ress     r   rh   SMTPClientError.__bytes__   so    99q=ii_A&--/$));<C99+C88JJtxx JJsOzz#r   )r^   r[   r_   r]   r\   r`   )NNFF)r	   r
   r   r   __doc__intbytesr   objectboolr>   r)   r&   rh   r   r   r   r   rY   rY   ]   sv      $&*     e_	 
 F#     D0 05 r   rY   c                       \ rS rSrSrSrg)ESMTPClientError   z%
Base class for ESMTP client errors.
r   Nr	   r
   r   r   rs   r   r   r   r   ry   ry          r   ry   c                       \ rS rSrSrSrg)EHLORequiredError   zo
The server does not support EHLO.

This is considered a non-fatal error (the connection will not be dropped).
r   Nr{   r   r   r   r~   r~          r   r~   c                       \ rS rSrSrSrg)AUTHRequiredError   z
Authentication was required but the server does not support it.

This is considered a non-fatal error (the connection will not be dropped).
r   Nr{   r   r   r   r   r      r   r   r   c                       \ rS rSrSrSrg)TLSRequiredError   z
Transport security was required but the server does not support it.

This is considered a non-fatal error (the connection will not be dropped).
r   Nr{   r   r   r   r   r      r   r   r   c                       \ rS rSrSrSrg)AUTHDeclinedError   z
The server rejected our credentials.

Either the username, password, or challenge response
given to the server was rejected.

This is considered a non-fatal error (the connection will not be
dropped).
r   Nr{   r   r   r   r   r          r   r   c                       \ rS rSrSrSrg)AuthenticationError   z
An error occurred while authenticating.

Either the server rejected our request for authentication or the
challenge received was malformed.

This is considered a non-fatal error (the connection will not be
dropped).
r   Nr{   r   r   r   r   r      r   r   r   c                       \ rS rSrSrSrg)SMTPTLSError   z
An error occurred while negiotiating for transport security.

This is considered a non-fatal error (the connection will not be dropped).
r   Nr{   r   r   r   r   r      r   r   r   c                   "    \ rS rSrSrSS jrSrg)SMTPConnectError   zh
Failed to connect to the mail exchange host.

This is considered a fatal error.  A retry will be made.
Nc           	      4    [         R                  XX#XEU5        g NrY   r>   re   s          r   r>   SMTPConnectError.__init__         T	ERr   r   NNTTr	   r
   r   r   rs   r>   r   r   r   r   r   r          Sr   r   c                   "    \ rS rSrSrSS jrSrg)SMTPTimeoutError   z
Failed to receive a response from the server in the expected time period.

This is considered a fatal error.  A retry will be made.
Nc           	      4    [         R                  XX#XEU5        g r   r   re   s          r   r>   SMTPTimeoutError.__init__   r   r   r   r   r   r   r   r   r   r      r   r   r   c                   "    \ rS rSrSrSS jrSrg)SMTPProtocolError   zc
The server sent a mangled response.

This is considered a fatal error.  A retry will not be made.
Nc           	      4    [         R                  XX#XEU5        g r   r   re   s          r   r>   SMTPProtocolError.__init__   r   r   r   )NNTFr   r   r   r   r   r      r   r   r   c                       \ rS rSrSrSrg)SMTPDeliveryError   z5
Indicates that a delivery attempt has had an error.
r   Nr{   r   r   r   r   r      r|   r   r   c                   (    \ rS rSrS rS\4S jrSrg)SMTPServerError   c                     Xl         X l        g r   r[   r\   )r%   r[   r\   s      r   r>   SMTPServerError.__init__   s    		r   r    c                 8    SU R                   U R                  4-  $ )Nz%.3d %sr   r$   s    r   r&   SMTPServerError.__str__   s    DIItyy111r   r   NrE   r   r   r   r   r      s    2 2r   r   c                   (    \ rS rSrS rS\4S jrSrg)SMTPAddressError   c                 V    SSK Jn  [        R                  XU5        U" U5      U l        g )Nr   )Address)twisted.mail.smtpr   r   r>   addr)r%   r   r[   r\   r   s        r   r>   SMTPAddressError.__init__  s     -  T2DM	r   r    c                 N    SU R                   U R                  U R                  4-  $ )Nz%.3d <%s>... %s)r[   r   r\   r$   s    r   r&   SMTPAddressError.__str__  s      DIItyy$))#DDDr   )r   NrE   r   r   r   r   r      s    "E Er   r   c                       \ rS rSrSS jrSrg)SMTPBadRcpti  c                 0    [         R                  XX#5        g r   r   r>   r%   r   r[   r\   s       r   r>   SMTPBadRcpt.__init__      !!$d9r   r   N)&  z$Cannot receive for specified addressr	   r
   r   r   r>   r   r   r   r   r   r         :r   r   c                       \ rS rSrSS jrSrg)SMTPBadSenderi  c                 0    [         R                  XX#5        g r   r   r   s       r   r>   SMTPBadSender.__init__  r   r   r   N)r   zSender not acceptabler   r   r   r   r   r     r   r   r   c                       \ rS rSrSrSrg)AddressErrori  z
Parse error in address
r   Nr{   r   r   r   r   r     r|   r   r   c                       \ rS rSrSrSrg)	POP3Errori  z!
The base class for POP3 errors.
r   Nr{   r   r   r   r   r     s     	r   r   c                       \ rS rSrSrSrg)_POP3MessageDeletedi#  zV
An internal control-flow error which indicates that a deleted message was
requested.
r   Nr{   r   r   r   r   r   #      r   r   c                       \ rS rSrSrSrg)POP3ClientErrori*  z9
The base class for all exceptions raised by POP3Client.
r   Nr{   r   r   r   r   r   *  r|   r   r   c                       \ rS rSrSrSrg) InsecureAuthenticationDisallowedi0  zY
An error indicating secure authentication was required but no mechanism
could be found.
r   Nr{   r   r   r   r   r   0  r   r   r   c                       \ rS rSrSrSrg)TLSErrori7  z
An error indicating secure authentication was required but either the
transport does not support TLS or no TLS context factory was supplied.
r   Nr{   r   r   r   r   r   7  r   r   r   c                       \ rS rSrSrSrg)TLSNotSupportedErrori>  z]
An error indicating secure authentication was required but the server does
not support TLS.
r   Nr{   r   r   r   r   r   >  r   r   r   c                   "    \ rS rSrSrSS jrSrg)ServerErrorResponseiE  zo
An error indicating that the server returned an error response to a
request.

@ivar consumer: See L{__init__}
Nc                 :    [         R                  X5        X l        g)z
@type reason: L{bytes}
@param reason: The server response minus the status indicator.

@type consumer: callable that takes L{object}
@param consumer: The function meant to handle the values for a
    multi-line response.
N)r   r>   consumer)r%   reasonr   s      r   r>   ServerErrorResponse.__init__M  s     	  . r   )r   r   r   r   r   r   r   r   E  s    
!r   r   c                       \ rS rSrSrSrg)LineTooLongiZ  zz
An error indicating that the server sent a line which exceeded the
maximum line length (L{LineOnlyReceiver.MAX_LENGTH}).
r   Nr{   r   r   r   r   r   Z  r   r   r   N).rs   typingr   	Exceptionr   r   r   r   r   r   r+   r0   r5   r8   r;   rG   rJ   rM   rP   rS   rV   rY   ry   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s   	Y 		N 		~ 		^ 		~ 	=' =
8$ 8
1& 1
	 		~ 	
 
	N 		^ 		 		 		 			 	2i 2j ( ( ' 	( 		* 	# S SS SS S 2i 2E E:" :
:$ :
9 		 	) i   ? !/ !*/ r   