
    h4                        S r SSKrSSKJ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Kr\R:                  \\R<                  \\R>                  \0r \!" \S-5      (       a  \\ \RD                  '   \\ \RF                  '   S. 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      r0\Rb                  " \" SASBSS5      SC\2S@5         " SD SE\)5      r3 " SF SG\'5      r4 " SH SI\5      r5 " SJ SK\65      r7 " SL SM\65      r8 " SN SO\65      r9 " SP SQ\65      r: " SR SS\65      r; " ST SU\<5      r= " SV SW\5      r> " SX SY\5      r? " SZ S[\5      r@ " S\ S]\5      rA " S^ S_\5      rB " S` Sa\,5      rC/ SbQrDg! \$ a    0 r  GN9f = f)cz<
Exceptions and errors for use in twisted.internet modules.
    N)Version)	deprecatec                   *    \ rS rSrS=rrS\4S jrSrg)	BindError   z)An error occurred binding to an interfacereturnc                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ Nz{}: {} %s.MESSAGEargsformatjoinselfss     ]/root/1688_scrapy/alibaba-scraper/venv/lib/python3.13/site-packages/twisted/internet/error.py__str__BindError.__str__   =    LL99388DII#67AAI     N	__name__
__module____qualname____firstlineno____doc__r   strr   __static_attributes__r   r   r   r   r      s    CCGg r   r   c                   ,    \ rS rSrSrS rS\4S jrSrg)CannotListenError   a  
This gets raised by a call to startListening, when the object cannotstart
listening.

@ivar interface: the interface I tried to listen on
@ivar port: the port I tried to listen on
@ivar socketError: the exception I got when I tried to listen
@type socketError: L{socket.error}
c                 T    [         R                  XX#5        Xl        X l        X0l        g N)r   __init__	interfaceportsocketError)r   r)   r*   r+   s       r   r(   CannotListenError.__init__&   s"    4D>"	&r   r   c                 x    U R                   =(       d    SnSR                  XR                  U R                  5      $ )NanyzCouldn't listen on {}:{}: {}.)r)   r   r*   r+   )r   ifaces     r   r   CannotListenError.__str__,   s2    '%.5599d..
 	
r   )r)   r*   r+   N)	r   r   r   r   r    r(   r!   r   r"   r   r   r   r$   r$      s    '
 
r   r$   c                       \ rS rSrSrSrg)MulticastJoinError3   z.
An attempt to join a multicast group failed.
r   Nr   r   r   r   r    r"   r   r   r   r2   r2   3       r   r2   c                   *    \ rS rSrS=rrS\4S jrSrg)MessageLengthError9   zMessage is too long to sendr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   MessageLengthError.__str__<   r   r   r   Nr   r   r   r   r7   r7   9   s    55Gg r   r7   c                   *    \ rS rSrS=rrS\4S jrSrg)DNSLookupErrorD   zDNS lookup failedr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   DNSLookupError.__str__G   r   r   r   Nr   r   r   r   r<   r<   D   s    ++Gg r   r<   c                       \ rS rSrSrSrg)ConnectInProgressErrorO   z3A connect operation was started and isn't done yet.r   Nr4   r   r   r   rA   rA   O   s    =r   rA   c                   4    \ rS rSrS=rrSS jrS\4S jrSr	g)	ConnectErrorV   z"An error occurred while connectingNc                 :    Xl         [        R                  X5        g r'   )osError	Exceptionr(   )r   rG   strings      r   r(   ConnectError.__init__Y   s    4(r   r   c                     U R                   nU R                  (       a  U SU R                   3nU R                  S   (       a  U SU R                  S    3nSU-  nU$ )N: r   r   )r   rG   r   r   s     r   r   ConnectError.__str__]   sW    LL<<#R~&A99Q<#R		!~&AAIr   )rG   )N )
r   r   r   r   r    r   r(   r!   r   r"   r   r   r   rD   rD   V   s    <<Gg) r   rD   c                       \ rS rSrS=rrSrg)ConnectBindErrorg   zCouldn't bindr   Nr   r   r   r   r    r   r"   r   r   r   rP   rP   g   s    ''Ggr   rP   c                       \ rS rSrS=rrSrg)UnknownHostErrork   zHostname couldn't be looked upr   NrR   r   r   r   rT   rT   k   s    88Ggr   rT   c                       \ rS rSrS=rrSrg)NoRouteErroro   zNo route to hostr   NrR   r   r   r   rW   rW   o   s    **Ggr   rW   c                       \ rS rSrS=rrSrg)ConnectionRefusedErrors   z$Connection was refused by other sider   NrR   r   r   r   rZ   rZ   s       >>Ggr   rZ   c                       \ rS rSrS=rrSrg)TCPTimedOutErrorw   zTCP connection timed outr   NrR   r   r   r   r^   r^   w   s    22Ggr   r^   c                       \ rS rSrS=rrSrg)BadFileError{   z$File used for UNIX socket is no goodr   NrR   r   r   r   ra   ra   {   r\   r   ra   c                       \ rS rSrS=rrSrg)ServiceNameUnknownError   z%Service name given as port is unknownr   NrR   r   r   r   rd   rd      s    ??Ggr   rd   c                       \ rS rSrS=rrSrg)	UserError   zUser aborted connectionr   NrR   r   r   r   rg   rg      s    11Ggr   rg   c                       \ rS rSrS=rrSrg)TimeoutError   z&User timeout caused connection failurer   NrR   r   r   r   rj   rj      s    @@Ggr   rj   c                       \ rS rSrS=rrSrg)SSLError   zAn SSL error occurredr   NrR   r   r   r   rm   rm      s    //Ggr   rm   c                       \ rS rSrS=rrSrg)VerifyError   z:Could not verify something that was supposed to be signed.r   NrR   r   r   r   rp   rp      s    TTGgr   rp   c                       \ rS rSrS=rrSrg)PeerVerifyError   z#The peer rejected our verify error.r   NrR   r   r   r   rs   rs      s    ==Ggr   rs   c                       \ rS rSrS=rrSrg)CertificateError   z<We did not find a certificate where we expected to find one.r   NrR   r   r   r   rv   rv      s    VVGgr   rv   WSAECONNREFUSEDc                 @   [        U [        5      (       a  U R                  nOU n Uu  p#[        [        S5      (       a&  [        U [        R                  5      (       a  [        nO[        R                  U[        5      nU" X#5      $ ! [         a    [	        U S9s $ f = f)z2Given a socket exception, return connection error.)rI   gaierror)
isinstancerH   r   
ValueErrorrD   hasattrsocketrz   rT   errnoMappingget)er   numberrI   klasss        r   getConnectErrorr      s    !Yvv& vz""z!V__'E'E !  6    &1%%&s   B BBc                       \ rS rSrSrSrg)ConnectionClosed   z8
Connection was closed, whether cleanly or non-cleanly.
r   Nr4   r   r   r   r   r      r5   r   r   c                   *    \ rS rSrS=rrS\4S jrSrg)ConnectionLost   zF
    Connection to the other side was lost in a non-clean fashion
    r   c                 4   U R                   R                  5       R                  5       S S nU R                  (       a;  UR	                  S5        UR	                  SR                  U R                  5      5        UR	                  S5        SR                  U5      $ )N   rL   r   .rN   )r   strip
splitlinesr   appendr   r   s     r   r   ConnectionLost.__str__   sh    LL ++-bq199HHTNHHSXXdii()	wwqzr   r   Nr   r   r   r   r   r      s     Gg r   r   c                       \ rS rSrSrSrSrg)ConnectionAborted   zs
Connection was aborted locally, using
L{twisted.internet.interfaces.ITCPTransport.abortConnection}.

@since: 11.1
zBConnection was aborted locally using ITCPTransport.abortConnectionr   NrR   r   r   r   r   r      s     VGr   r   c                   *    \ rS rSrS=rrS\4S jrSrg)ConnectionDone   zConnection was closed cleanlyr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   ConnectionDone.__str__   r   r   r   Nr   r   r   r   r   r      s    77Gg r   r   c                       \ rS rSrSrSrSrg)FileDescriptorOverrun   a[  
A mis-use of L{IUNIXTransport.sendFileDescriptor} caused the connection to
be closed.

Each file descriptor sent using C{sendFileDescriptor} must be associated
with at least one byte sent using L{ITransport.write}.  If at any point
fewer bytes have been written than file descriptors have been sent, the
connection is closed with this exception.
zRA mis-use of IUNIXTransport.sendFileDescriptor caused the connection to be closed.r   NrR   r   r   r   r   r      s    	' r   r   c                       \ rS rSrS=rrSrg)ConnectionFdescWentAway   Uhr   NrR   r   r   r   r   r      s    Ggr   r   c                   *    \ rS rSrS=rrS\4S jrSrg)AlreadyCalled   z'Tried to cancel an already-called eventr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   AlreadyCalled.__str__   r   r   r   Nr   r   r   r   r   r      s    AAGg r   r   c                   *    \ rS rSrS=rrS\4S jrSrg)AlreadyCancelledi  z*Tried to cancel an already-cancelled eventr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   AlreadyCancelled.__str__  r   r   r   Nr   r   r   r   r   r     s    DDGg r   r   c                       \ rS rSrSrSrSrg)PotentialZombieWarningi  z
Emitted when L{IReactorProcess.spawnProcess} is called in a way which may
result in termination of the created child process not being reported.

Deprecated in Twisted 10.0.
zspawnProcess called, but the SIGCHLD handler is not installed. This probably means you have not yet called reactor.run, or called reactor.run(installSignalHandler=0). You will probably never see this process finish, and it may become a zombie process.r   NrR   r   r   r   r   r     s    	 r   r   Twisted
   z4There is no longer any potential for zombie process.c                   "    \ rS rSrS=rrS rSrg)ProcessDonei-  z+A process has ended without apparent errorsc                 X    [         R                  U S5        SU l        S U l        Xl        g )Nz!process finished with exit code 0r   )rH   r(   exitCodesignalstatus)r   r   s     r   r(   ProcessDone.__init__0  s&    4!DEr   r   r   r   Nr   r   r   r   r    r   r(   r"   r   r   r   r   r   -  s    EEGgr   r   c                   &    \ rS rSrS=rrSS jrSrg)ProcessTerminatedi7  z
    A process has ended with a probable error condition

    @ivar exitCode: See L{__init__}
    @ivar signal: See L{__init__}
    @ivar status: See L{__init__}
    Nc                     Xl         X l        X0l        SnUb  USU-  -   nUb  USU-  -   n[        R	                  X5        g)a+  
@param exitCode: The exit status of the process.  This is roughly like
    the value you might pass to L{os._exit}.  This is L{None} if the
    process exited due to a signal.
@type exitCode: L{int} or L{None}

@param signal: The exit signal of the process.  This is L{None} if the
    process did not exit due to a signal.
@type signal: L{int} or L{None}

@param status: The exit code of the process.  This is a platform
    specific combination of the exit code and the exit signal.  See
    L{os.WIFEXITED} and related functions.
@type status: L{int}
zprocess endedNz with exit code %sz by signal %s)r   r   r   rH   r(   )r   r   r   r   r   s        r   r(   ProcessTerminated.__init__@  sQ      !(833AOf,,A4#r   r   )NNNr   r   r   r   r   r   7  s     Gg$r   r   c                       \ rS rSrSrSrg)ProcessExitedAlreadyi[  zX
The process has already exited and the operation requested can no longer
be performed.
r   Nr4   r   r   r   r   r   [      r   r   c                   *    \ rS rSrS=rrS\4S jrSrg)NotConnectingErrorib  zEThe Connector was not connecting when it was asked to stop connectingr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   NotConnectingError.__str__g  r   r   r   Nr   r   r   r   r   r   b  s     	PPG r   r   c                   *    \ rS rSrS=rrS\4S jrSrg)NotListeningErrorio  z>The Port was not listening when it was asked to stop listeningr   c                     U R                   nU R                  (       a+  SR                  USR                  U R                  5      5      nSU-  nU$ r
   r   r   s     r   r   NotListeningError.__str__r  r   r   r   Nr   r   r   r   r   r   o  s    XXGg r   r   c                       \ rS rSrSrSrg)ReactorNotRunningiz  zB
Error raised when trying to stop a reactor which is not running.
r   Nr4   r   r   r   r   r   z  r5   r   r   c                       \ rS rSrSrSrg)ReactorNotRestartablei  z>
Error raised when trying to run a reactor which was stopped.
r   Nr4   r   r   r   r   r     r5   r   r   c                       \ rS rSrSrSrg)ReactorAlreadyRunningi  z?
Error raised when trying to start the reactor multiple times.
r   Nr4   r   r   r   r   r     r5   r   r   c                       \ rS rSrSrSrg)ReactorAlreadyInstalledErrori  z=
Could not install reactor because one is already installed.
r   Nr4   r   r   r   r   r     r5   r   r   c                       \ rS rSrSrS rSrg)ConnectingCancelledErrori  z
An C{Exception} that will be raised when an L{IStreamClientEndpoint} is
cancelled before it connects.

@ivar address: The L{IAddress} that is the destination of the
    cancelled L{IStreamClientEndpoint}.
c                 :    [         R                  X5        Xl        g)zq
@param address: The L{IAddress} that is the destination of the
    L{IStreamClientEndpoint} that was cancelled.
N)rH   r(   address)r   r   s     r   r(   !ConnectingCancelledError.__init__  s    
 	4)r   )r   Nr   r   r   r   r    r(   r"   r   r   r   r   r     s    r   r   c                       \ rS rSrSrSrg)
NoProtocoli  z
An C{Exception} that will be raised when the factory given to a
L{IStreamClientEndpoint} returns L{None} from C{buildProtocol}.
r   Nr4   r   r   r   r   r     r   r   r   c                       \ rS rSrSrSrg)UnsupportedAddressFamilyi  z
An attempt was made to use a socket with an address family (eg I{AF_INET},
I{AF_INET6}, etc) which is not supported by the reactor.
r   Nr4   r   r   r   r   r     r   r   r   c                       \ rS rSrSrSrg)UnsupportedSocketTypei  z~
An attempt was made to use a socket of a type (eg I{SOCK_STREAM},
I{SOCK_DGRAM}, etc) which is not supported by the reactor.
r   Nr4   r   r   r   r   r     r   r   r   c                       \ rS rSrSrSrg)AlreadyListenedi  zX
An attempt was made to listen on a file descriptor which can only be
listened on once.
r   Nr4   r   r   r   r   r     r   r   r   c                       \ rS rSrSrS rSrg)InvalidAddressErrori  z
An invalid address was specified (i.e. neither IPv4 or IPv6, or expected
one and got the other).

@ivar address: See L{__init__}
@ivar message: See L{__init__}
c                     Xl         X l        g)z
@param address: The address that was provided.
@type address: L{bytes}
@param message: A native string of additional information provided by
    the calling context.
@type address: L{str}
Nr   message)r   r   r   s      r   r(   InvalidAddressError.__init__  s     r   r   Nr   r   r   r   r   r     s    	r   r   )(r   r$   r2   r7   r<   rA   rD   rP   rT   rW   rZ   r^   ra   rd   rg   rj   rm   rp   rs   rv   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )Er    r~   incrementalr   twisted.pythonr   rH   r   r$   r2   r7   IOErrorr<   rA   rD   rP   rT   rW   rZ   r^   ra   rd   rg   rj   rm   rp   rs   rv   errnoENETUNREACHECONNREFUSED	ETIMEDOUTr   r}   rx   WSAENETUNREACHImportErrorr   r   r   r   r   r   r   r|   r   r   Warningr   deprecatedModuleAttributer   r   r   r   RuntimeErrorr   r   r   r   r   AssertionErrorr   r   r   r   r   r   r   __all__r   r   r   <module>r      s  
   $	 
	 
0  W >Y >9 "(| (9| 9+< +?\ ?3| 3?< ?@l @2 2A9 A0| 0U) U>k >Wy W 	<2)L
 u'((.DU**+-9U))*
!(y % V V% N "n J z W $ 
 # #Ir1a :	. !$ !$H9 
 
  L L > y $ y I i * *)_	  Ls   0AI4 4J ?J 