
    Ng                        d Z ddlmZ  G d de      Z G d de      Z G d de      Z G d	 d
e      Z G d de      Z	 G d de      Z
 G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zy)z
Scrapy core exceptions

These exceptions are documented in docs/topics/exceptions.rst. Please don't add
new exceptions here without documenting them there.
    )Anyc                       e Zd ZdZy)NotConfiguredz+Indicates a missing configuration situationN__name__
__module____qualname____doc__     1lib/python3.12/site-packages/scrapy/exceptions.pyr   r      s    5r   r   c                       e Zd ZdZy)_InvalidOutputz
    Indicates an invalid value has been returned by a middleware's processing method.
    Internal and undocumented, it should not be raised or caught by user code.
    Nr   r   r   r   r   r      s    
 	r   r   c                       e Zd ZdZy)IgnoreRequestz6Indicates a decision was made not to process a requestNr   r   r   r   r   r      s    @r   r   c                       e Zd ZdZy)DontCloseSpiderz'Request the spider not to be closed yetNr   r   r   r   r   r   #   s    1r   r   c                   *     e Zd ZdZddef fdZ xZS )CloseSpiderz<Raise this from callbacks to request the spider to be closedreasonc                 0    t         |           || _        y N)super__init__r   )selfr   	__class__s     r   r   zCloseSpider.__init__,   s    r   )	cancelled)r   r   r	   r
   strr   __classcell__r   s   @r   r   r   )   s    Fs  r   r   c                   .     e Zd ZdZdddef fdZ xZS )StopDownloadz
    Stop the download of the body for a given response.
    The 'fail' boolean parameter indicates whether or not the resulting partial response
    should be handled by the request errback. Note that 'fail' is a keyword-only argument.
    T)failr#   c                0    t         |           || _        y r   )r   r   r#   )r   r#   r   s     r   r   zStopDownload.__init__8   s    	r   )r   r   r	   r
   boolr   r   r    s   @r   r"   r"   1   s     (,   r   r"   c                       e Zd ZdZy)DropItemz Drop item from the item pipelineNr   r   r   r   r'   r'   @   s    *r   r'   c                       e Zd ZdZy)NotSupportedz.Indicates a feature or method is not supportedNr   r   r   r   r)   r)   F   s    8r   r)   c                   ,     e Zd ZdZdedef fdZ xZS )
UsageErrorz&To indicate a command-line usage errorakwc                 R    |j                  dd      | _        t        |   |i | y )N
print_helpT)popr/   r   r   )r   r,   r-   r   s      r   r   zUsageError.__init__R   s'    &&t4!"r"r   )r   r   r	   r
   r   r   r   r    s   @r   r+   r+   O   s    0#3 #c # #r   r+   c                       e Zd ZdZy)ScrapyDeprecationWarningzrWarning category for deprecated features, since the default
    DeprecationWarning is silenced on Python 2.7+
    Nr   r   r   r   r2   r2   W   s     	r   r2   c                       e Zd ZdZy)ContractFailz*Error raised in case of a failing contractNr   r   r   r   r4   r4   _   s    4r   r4   N)r
   typingr   	Exceptionr   	TypeErrorr   r   r   r   r"   r'   r)   r+   Warningr2   AssertionErrorr4   r   r   r   <module>r:      s    
	I 		Y 	AI A	i 	) 	9 		y 		9 	# #	w 		> 	r   