
    t                        S SK Jr  S SKrS SKJr  S SKJr  S SKrS SKJ	r	  S SK
Jr  S SKJrJrJrJrJrJrJrJrJrJr   " S S	5      r " S
 S5      r " S S5      rg)    )annotationsN)MessageDefect)
DUMMY_POOL)HTTPConnection)HTTPConnectionPool)
ClosedPoolErrorConnectTimeoutErrorEmptyPoolErrorHeaderParsingErrorHostChangedError	HTTPErrorLocationParseErrorMaxRetryErrorNewConnectionErrorReadTimeoutErrorc                  b   \ rS rSr\R
                  R                  S\" S5      \" \	SS5      \
" S5      \" S5      \" S5      \" S\" S5      5      \" \" S5      SS5      \
" S5      \" \" S5      S5      \" \" S5      S5      \" \" S5      SS	5      \" \" S5      SS5      /5      SS
 j5       rSrg)
TestPickle   	exceptionN foo	localhost/zfake locationr   c                    [         R                  " [         R                  " U5      5      n[        U[	        U5      5      (       d   eg )N)pickleloadsdumps
isinstancetype)selfr   results      ;platform/gsutil/third_party/urllib3/test/test_exceptions.pytest_exceptionsTestPickle.test_exceptions   s2    $ fll956&$y/2222     )r   	ExceptionreturnNone)__name__
__module____qualname____firstlineno__pytestmarkparametrizer   r   r   r   r	   IOErrorr   r   r
   r   r   r#   __static_attributes__r&   r%   r"   r   r      s    [[dO*b$/r"%eeWU^,,[93E/.{;R@-k:B?/<c1E/<c2F	
"3#"3r%   r   c                      \ rS rSrSS jrSrg)
TestFormat0   c                t    [        [        S5      /S5      nS[        U5      ;   d   eS[        U5      ;   d   eg )Ndefectsunparsed_data)r   r   str)r    hpes     r"   test_header_parsing_errors%TestFormat.test_header_parsing_errors1   s:     -	":!;_MCH$$$#c(***r%   r&   Nr(   r)   )r*   r+   r,   r-   r;   r2   r&   r%   r"   r4   r4   0   s    +r%   r4   c                      \ rS rSrSS jrSrg)TestNewConnectionError8   c                ^   [        [        S5      S5      n[        R                  " [        5       nUR
                  nS S S 5        WUR                  L d   eSnWS   n[        UR                  [        5      (       d   eUR                  R                  S   U:X  d   eg ! , (       d  f       Ng= f)Nr   testz\The 'pool' property is deprecated and will be removed in urllib3 v2.1.0. Use 'conn' instead.r   )r   r   r.   warnsDeprecationWarningpoolconnr   messageWarningargs)r    errrecordserr_poolmsgrecords         r"   &test_pool_property_deprecation_warning=TestNewConnectionError.test_pool_property_deprecation_warning9   s     !<fE\\,-xxH . 388###5 	 &..'2222~~""1%,,, .-s   B
B,r&   Nr=   )r*   r+   r,   r-   rO   r2   r&   r%   r"   r?   r?   8   s    -r%   r?   )
__future__r   r   email.errorsr   rB   r   r.   urllib3.connectionr   urllib3.connectionpoolr   urllib3.exceptionsr   r	   r
   r   r   r   r   r   r   r   r   r4   r?   r&   r%   r"   <module>rV      sG    "  &   - 5  3 3.+ +- -r%   