+
    Bi=                         ^ RI Ht ^ RIHt ^ RIHtHt ^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHtHtHtHt  ! R R]4      tR# )    )contextmanager)BytesIO)TestCasemockN)FormatChecker
exceptions	protocols
validatorsc                      a  ] tR t^t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestDeprecationsc                (   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       V P	                  X\
        P                  P                  R4      4       V P	                  XP                  \        4       R#   + '       g   i     La; i)zI
As of v4.0.0, __version__ is deprecated in favor of importlib.metadata.
z.Accessing jsonschema.__version__ is deprecated)__version__N
jsonschema)
assertWarnsRegexDeprecationWarningr   r   assertEqual	importlibmetadataversionfilename__file__)selfmessagewr   s   &   `/var/www/html/photoedit/myenv/lib/python3.14/site-packages/jsonschema/tests/test_deprecations.pytest_versionTestDeprecations.test_version   sj    
 C""#5w??1. @ 	i&8&8&@&@&NOX.	 @?s   BB	c                
   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       V P	                  X\
        P                  4       V P	                  XP                  \        4       R#   + '       g   i     LR; i)z}
As of v4.0.0, importing ErrorTree from jsonschema.validators is
deprecated in favor of doing so from jsonschema.exceptions.
z2Importing ErrorTree from jsonschema.validators is 	ErrorTreeN)r   r   jsonschema.validatorsr    r   r   r   r   r   r   r   r    s   &   r   test_validators_ErrorTree*TestDeprecations.test_validators_ErrorTree   s_     G""#5w??17 @ 	J$8$89X.	 @?   A22B	c                
   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       V P	                  X\
        P                  4       V P	                  XP                  \        4       R#   + '       g   i     LR; i)zy
As of v4.18.0, importing ErrorTree from the package root is
deprecated in favor of doing so from jsonschema.exceptions.
z9Importing ErrorTree directly from the jsonschema package r   N)r   r   r   r    r   r   r   r   r"   s   &   r   test_import_ErrorTree&TestDeprecations.test_import_ErrorTree)   s_     N""#5w??1, @ 	J$8$89X.	 @?r%   c                   \         P                  ! RR.R7      p\         P                  ! 4       p\         P                  ! V.R7      pRpV P                  \        V4      ;_uu_ 4       pW2R&   RRR4       V P                  VR,          V4       V P                  XP                  \        4       R#   + '       g   i     LK; i)z=
As of v4.20.0, setting items on an ErrorTree is deprecated.
z
some errorfoo)path)errorszErrorTree.__setitem__ is N)r   ValidationErrorr    r   r   r   r   r   )r   etreesubtreer   r   s   &     r   test_ErrorTree_setitem'TestDeprecations.test_ErrorTree_setitem6   s    
 &&|5'B##%&&qc2-""#5w??1!K @ 	eg.X.	 @?s   'B//B?	c                
   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       V P	                  X\
        P                  4       V P	                  XP                  \        4       R#   + '       g   i     LR; i)z{
As of v4.18.0, importing FormatError from the package root is
deprecated in favor of doing so from jsonschema.exceptions.
z;Importing FormatError directly from the jsonschema package )FormatErrorN)r   r   r   r4   r   r   r   r   )r   r   r   r4   s   &   r   test_import_FormatError(TestDeprecations.test_import_FormatErrorF   s_     P""#5w??1. @ 	j&<&<=X.	 @?r%   c                
   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       V P	                  X\
        P                  4       V P	                  XP                  \        4       R#   + '       g   i     LR; i)zx
As of v4.19.0, importing Validator from the package root is
deprecated in favor of doing so from jsonschema.protocols.
z9Importing Validator directly from the jsonschema package )	ValidatorN)r   r   r   r8   r   r	   r   r   )r   r   r   r8   s   &   r   test_import_Validator&TestDeprecations.test_import_ValidatorS   s_     N""#5w??1, @ 	I$7$78X.	 @?r%   c                   RpV P                  \        V4      ;_uu_ 4       p\        P                  pRRR4       V P                  X\        P                  4       V P                  XP
                  \        4       R#   + '       g   i     LR; i)zI
As of v4.0.0, accessing jsonschema.validators.validators is
deprecated.
z8Accessing jsonschema.validators.validators is deprecatedN)r   r   r
   r   _VALIDATORSr   r   r   r   r   values   &   r   test_validators_validators+TestDeprecations.test_validators_validators`   sg     M""#5w??1))E @ 	
 6 67X.	 @?   A<<B	c                   RpV P                  \        V4      ;_uu_ 4       p\        P                  pRRR4       V P	                  X\        P
                  4       V P	                  XP                  \        4       R#   + '       g   i     LR; i)zK
As of v4.0.0, accessing jsonschema.validators.meta_schemas is
deprecated.
z:Accessing jsonschema.validators.meta_schemas is deprecatedN)r   r   r
   meta_schemasr   _META_SCHEMASr   r   r=   s   &   r   test_validators_meta_schemas-TestDeprecations.test_validators_meta_schemasm   sg     O""#5w??1++E @ 	
 8 89X.	 @?rA   c           	     h   \         P                  P                  / 4      pRpV P                  \        V4      ;_uu_ 4       pVP                  R4      ;_uu_ 4         RRR4       RRR4       V P                  XP                  \        4       R#   + '       g   i     L:; i  + '       g   i     LE; i)z3
As of v4.0.0, RefResolver.in_scope is deprecated.
z.jsonschema.RefResolver.in_scope is deprecated r*   N)	r
   _RefResolverfrom_schemar   r   in_scoper   r   r   )r   resolverr   r   s   &   r   test_RefResolver_in_scope*TestDeprecations.test_RefResolver_in_scopez   s}    
 **66r:B""#5w??1""5)) * @ 	X. *) @?s$    B!B	B!BB!!B1	c                4   \         P                  ! / 4      pRpV P                  \        V4      ;_uu_ 4       pVP	                  RRR/4      pRRR4       V P                  X4       V P                  XP                  \        4       R#   + '       g   i     LC; i)zb
As of v4.0.0, calling is_valid with two arguments (to provide a
different schema) is deprecated.
z5Passing a schema to Validator.is_valid is deprecated r*   typenumberN)	r
   Draft7Validatorr   r   is_validassertFalser   r   r   )r   	validatorr   r   results   &    r   %test_Validator_is_valid_two_arguments6TestDeprecations.test_Validator_is_valid_two_arguments   sz     ..r2	I""#5w??1''/ABF @ 	 X.	 @?s   BB	c                N   \         P                  ! / 4      pRpV P                  \        V4      ;_uu_ 4       pVP	                  RRR/4      w  pRRR4       V P                  XP                  R4       V P                  XP                  \        4       R#   + '       g   i     LN; i)ze
As of v4.0.0, calling iter_errors with two arguments (to provide a
different schema) is deprecated.
z8Passing a schema to Validator.iter_errors is deprecated r*   rO   rP   N)	r
   rQ   r   r   iter_errorsr   rT   r   r   )r   rT   r   r   errors   &    r   (test_Validator_iter_errors_two_arguments9TestDeprecations.test_Validator_iter_errors_two_arguments   s     ..r2	L""#5w??1**5682DEFE @ 	&1X.	 @?s   BB$	c                >   \         P                  ! / 4      pRpV P                  \        V4      ;_uu_ 4       pV P	                  VP
                  \         P                  4       RRR4       V P                  XP                  \        4       R#   + '       g   i     L2; i)z<
As of v4.18.0, accessing Validator.resolver is deprecated.
z&Accessing Draft7Validator.resolver is N)
r
   rQ   r   r   assertIsInstancerK   rH   r   r   r   )r   rT   r   r   s   &   r   test_Validator_resolver(TestDeprecations.test_Validator_resolver   sq    
 ..r2	:""#5w??1!!)"4"4j6M6MN @ 	X. @?s   +BB	c                   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  XP
                  \        4       V P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       V P	                  VP
                  \        4       R#   + '       g   i     L; i  + '       g   i     LE; i)z1
As of v4.18.0, RefResolver is fully deprecated.
z$jsonschema.RefResolver is deprecated)RefResolverN)r   r   r   rb   r   r   r   r!   )r   r   r   rb   s   &   r   test_RefResolver!TestDeprecations.test_RefResolver   s    
 9""#5w??1. @X.""#5w??19 @X. @? @?s   B.B2B/	2C	c                
   RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  X\
        P                  4       V P	                  XP                  \        4       V P                  \        V4      ;_uu_ 4       p^ RI	Hp RRR4       V P	                  V\
        P                  4       V P	                  VP                  \        4       R#   + '       g   i     L; i  + '       g   i     Le; i)zt
As of v4.18.0, RefResolutionError is deprecated in favor of directly
catching errors from the referencing library.
z6jsonschema.exceptions.RefResolutionError is deprecatedRefResolutionErrorN)
r   r   r   rg   r   r   _RefResolutionErrorr   r   jsonschema.exceptions)r   r   r   rg   s   &   r   test_RefResolutionError(TestDeprecations.test_RefResolutionError   s     K""#5w??15 @ 	+Z-K-KLX.""#5w??1@ @ 	+Z-K-KLX. @? @?s   CC2C/	2D	c                   \         P                  ! RR/4      pV P                  \        P                  P
                  4      ;_uu_ 4       pVP                  ^4       RRR4       \        P                  P                  RR7      pV P                  XP                  \        VP                  4      3VR34       R#   + '       g   i     Le; i)z
This behavior is the intended behavior (i.e. it's not deprecated), but
given we do "tricksy" things in the iterim to wrap exceptions in a
multiple inheritance subclass, we need to be extra sure it works and
stays working.
$refurn:nothingN)refUnresolvable: urn:nothing)
r
   Draft202012ValidatorassertRaisesreferencingr   Unresolvablevalidater   	exceptionstr)r   rT   r.   expecteds   &   r   #test_catching_Unresolvable_directly4TestDeprecations.test_catching_Unresolvable_directly   s     33V]4KL	{55BBCCqr" D ))66=6I[[#akk*+23	
	 DCs   
B99C		c                v   V P                  \        4      ;_uu_ 4        ^ RIHp RRR4       \        P
                  ! RR/4      pV P                  \        P                  P                  4      ;_uu_ 4       pVP                  ^4       RRR4       V P                  X4      ;_uu_ 4       pVP                  ^4       RRR4       V P                  XP                  \        VP                  4      3XP                  R34       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lu; i)z
Until RefResolutionError is removed, it is still possible to catch
exceptions from reference resolution using it, even though they may
have been raised by referencing.
rf   Nrm   rn   rp   )assertWarnsr   r   rg   r
   rq   rr   rs   r   rt   ru   r   rv   rw   r   rg   rT   ur.   s   &    r   1test_catching_Unresolvable_via_RefResolutionErrorBTestDeprecations.test_catching_Unresolvable_via_RefResolutionError   s     0115 2 33V]4KL	{55BBCCqr" D 122ar" 3 	[[#akk*+[[56	
 21
 DC 32s#   D6D)D(D	D%	(D8	c                   V P                  \        4      ;_uu_ 4        ^ RIHp RRR4       \        P
                  ! RR/4      pV P                  \        P                  P                  4      ;_uu_ 4       pVP                  ^4       RRR4       V P                  X4      ;_uu_ 4       pVP                  ^4       RRR4       V P                  XP                  XP                  04       V P                  VP                  VP                  04       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)zC
Ensure the wrapped referencing errors are hashable when possible.
rf   Nrm   rn   )r|   r   r   rg   r
   rq   rr   rs   r   rt   ru   assertInrv   r}   s   &    r   (test_WrappedReferencingError_hashability9TestDeprecations.test_WrappedReferencingError_hashability   s     0115 2 33V]4KL	{55BBCCqr" D 122ar" 3 	akkAKK=1akkAKK=1 21
 DC 32s#   D6D&)D9D#	&D6	9E		c           
        RpV P                  \        V4      ;_uu_ 4       p ! R R\        P                  4      pRRR4       V P	                  XP
                  \        4       V P                  \        V4      ;_uu_ 4       p ! R R\        P                  ! / R7      4      pRRR4       R#   + '       g   i     Ly; i  + '       g   i     R# ; i)a+  
As of v4.12.0, subclassing a validator class produces an explicit
deprecation warning.

This was never intended to be public API (and some comments over the
years in issues said so, but obviously that's not a great way to make
sure it's followed).

A future version will explicitly raise an error.
z!Subclassing validator classes is c                       ] tR tRtRtR# )=TestDeprecations.test_Validator_subclassing.<locals>.Subclassi   N__name__
__module____qualname____firstlineno____static_attributes__r       r   Subclassr         r   r   Nc                       ] tR tRtRtR# )DTestDeprecations.test_Validator_subclassing.<locals>.AnotherSubclassi  r   Nr   r   r   r   AnotherSubclassr     r   r   r   )meta_schema)r   r   r
   rq   r   r   r   create)r   r   r   r   r   s   &    r   test_Validator_subclassing+TestDeprecations.test_Validator_subclassing
  s     6""#5w??1:::  @ 	X.""#5w??1*"3"3"C  @? @? @??s   B,!B?,B<	?C	c                @   V P                  \        P                  P                  RR4       RpV P	                  \
        V4      ;_uu_ 4       p\        P                  ! R4       RRR4       V P                  XP                  \        4       R#   + '       g   i     L2; i)zL
As of v4.14.0, FormatChecker.cls_checks is deprecated without
replacement.
boomNzFormatChecker.cls_checks )

addCleanupr   checkerspopr   r   
cls_checksr   r   r   )r   r   r   s   &  r   test_FormatChecker_cls_checks.TestDeprecations.test_FormatChecker_cls_checks!  so     	..22FDA-""#5w??1$$V, @ 	X. @?s   BB	c                    RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  X\
        P                  P                  4       V P                  XP                  \        4       RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  X\
        P                  P                  4       V P                  VP                  \        4       RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  X\
        P                  P                  4       V P                  VP                  \        4       RpV P                  \        V4      ;_uu_ 4       p^ R	IHp RRR4       T P	                  X\
        P                   P                  4       V P                  VP                  \        4       R
pV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  X\
        P$                  P                  4       V P                  VP                  \        4       RpV P                  \        V4      ;_uu_ 4       p^ RIHp RRR4       T P	                  X\
        P(                  P                  4       V P                  VP                  \        4       V P+                  \,        4      ;_uu_ 4        ^ RIHp	 RRR4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     ELR; i  + '       g   i     L; i  + '       g   i     R# ; i)zo
As of v4.16.0, accessing jsonschema.draftn_format_checker is deprecated
in favor of Validator.FORMAT_CHECKER.
z3Accessing jsonschema.draft202012_format_checker is )draft202012_format_checkerNz3Accessing jsonschema.draft201909_format_checker is )draft201909_format_checkerz.Accessing jsonschema.draft7_format_checker is )draft7_format_checkerz.Accessing jsonschema.draft6_format_checker is )draft6_format_checkerz.Accessing jsonschema.draft4_format_checker is )draft4_format_checkerz.Accessing jsonschema.draft3_format_checker is )draft3_format_checker)draft1234_format_checker)r   r   r   r   assertIsr
   rq   FORMAT_CHECKERr   r   r   r   Draft201909Validatorr   rQ   r   Draft6Validatorr   Draft4Validatorr   Draft3Validatorrr   ImportErrorr   )
r   r   r   r   r   r   r   r   r   r   s
   &         r   test_draftN_format_checker+TestDeprecations.test_draftN_format_checker/  s    H""#5w??1= @ 	&++::	
 	X.G""#5w??1= @ 	&++::	
 	X.B""#5w??18 @ 	!&&55	
 	X.B""#5w??18 @ 	!&&55	
 	X.B""#5w??18 @ 	!&&55	
 	X.B""#5w??18 @ 	!&&55	
 	X.{++; ,+w @?? @?? @?? @?? @?? @? ,++sS   LLL-MM>M)4M<L	L*	-L>	M	M&	)M9	<N	c                   RpV P                  \        V4      ;_uu_ 4       p^ RIp\        P                  ! VP
                  4       RRR4       V P                  XP                  \        P                  4       R#   + '       g   i     L<; i)z8
As of v4.17.0, importing jsonschema.cli is deprecated.
z5The jsonschema CLI is deprecated and will be removed N)	r   r   jsonschema.clir   reloadclir   r   r   )r   r   r   r   s   &   r   test_import_cli TestDeprecations.test_import_clit  sa    
 J""#5w??1!Z^^, @ 	Y%7%78	 @?s   %A::B
	c                    \         P                  ! \        P                  RR.RRR7      pV P	                  RVP
                  4       R# )z2
As of v4.17.0, the jsonschema CLI is deprecated.
z-mr   T)capture_outputchecks!   The jsonschema CLI is deprecated N)
subprocessrunsys
executabler   stderr)r   processs   & r   test_cliTestDeprecations.test_cli  s;    
 ..^^T<0

 	:GNNKr   c           
       a a RpRRRR///oR\         P                  9   dA   S P                  \         P                  P                  R\         P                  R,          4       R\         P                  R&   \        VV 3R l4       p\
        P                  ! R	V/4      pR
p\        P                  P                  \        P                  RVR7      pT;_uu_ 4        S P                  \        V4      ;_uu_ 4        S P                  VP                  / 4      VP                  ^%4      3R4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)zG
Automatic retrieval of remote references is deprecated as of v4.18.0.
zhttp://bar#/$defs/bazz$defsbazrO   integerrequestsNc              3     <"   SP                  V \        P                  P                  4       SP	                  V P
                  R 4       V P                  4       w  w  rSP	                  VP                  4       R4       SP	                  VR4       \        \        P                  ! S4      P                  R4      4      x  R# 5i)z
http://barz
user-agentz.python-jsonschema (deprecated $ref resolution)utf8N)r^   urllibrequestRequestr   full_urlheader_itemslowerr   jsondumpsencode)r   headerr>   schemar   s   &  r   fake_urlopenFTestDeprecations.test_automatic_remote_retrieval.<locals>.fake_urlopen  s     !!'6>>+A+ABW--|<  '335OVV\\^\:G $**V,33F;<<s   B?Crm   z+Automatically retrieving remote references urlopen)new)FT)r   modulesr   __setitem__r   r
   rq   r   patchobjectr   r   r   r   r   rR   )r   ro   r   rT   r   r   r   s   f     @r   test_automatic_remote_retrieval0TestDeprecations.test_automatic_remote_retrieval  s    &EFI#678$OO''S[[5L #'J		= 
	= 33VSMB	?

!!&..)!NUD))*<gFF##B'););B)?@ GUUFFUUUs$   E83D=	+E=EEE!	r   N)r   r   r   r   r   r#   r'   r1   r5   r9   r?   rE   rL   rV   r[   r_   rc   rj   ry   r   r   r   r   r   r   r   r   r   __classdictcell__)__classdict__s   @r   r   r      s     
//// ///////
///&
$
,2$./C<J
9
L$ $r   r   )
contextlibr   ior   unittestr   r   importlib.metadatar   r   r   r   urllib.requestr   referencing.exceptionsrs   r   r   r   r	   r
   r   r   r   r   <module>r      s4    %  #    
   G Gax ar   