403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.12/site-packages/jsonschema/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.12/site-packages/jsonschema/tests/__pycache__/test_deprecations.cpython-312.pyc
�

�% gJ;���ddlmZddlmZddlmZmZddlZddl	Z	ddl
Z
ddlZddlZ
ddlZddlmZmZmZmZGd�de�Zy)�)�contextmanager)�BytesIO)�TestCase�mockN)�
FormatChecker�
exceptions�	protocols�
validatorsc��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�TestDeprecationsc��d}|jt|�5}ddlm}ddd�|j	t
jjd��|j	jt�y#1swY�YxYw)zY
        As of v4.0.0, __version__ is deprecated in favor of importlib.metadata.
        z.Accessing jsonschema.__version__ is deprecatedr)�__version__N�
jsonschema)
�assertWarnsRegex�DeprecationWarningrr�assertEqual�	importlib�metadata�version�filename�__file__)�self�message�wrs    �G/usr/lib/python3.12/site-packages/jsonschema/tests/test_deprecations.py�test_versionzTestDeprecations.test_versionsg��
C��
�
"�
"�#5�w�
?�1�.�@�	
����i�&8�&8�&@�&@��&N�O�������X�.�	@�
?�s�A8�8Bc���d}|jt|�5}ddlm}ddd�|j	t
j�|j	jt�y#1swY�JxYw)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 r��	ErrorTreeN)rr�jsonschema.validatorsrrrrr�rrrrs    r�test_validators_ErrorTreez*TestDeprecations.test_validators_ErrorTrees\��G��
�
"�
"�#5�w�
?�1�7�@�	
����J�$8�$8�9�������X�.�	@�
?���A)�)A2c���d}|jt|�5}ddlm}ddd�|j	t
j�|j	jt�y#1swY�JxYw)z�
        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 rrN)rrrrrrrrr!s    r�test_import_ErrorTreez&TestDeprecations.test_import_ErrorTree)s\��N��
�
"�
"�#5�w�
?�1�,�@�	
����J�$8�$8�9�������X�.�	@�
?�r#c���d}|jt|�5}ddlm}ddd�|j	t
j�|j	jt�y#1swY�JxYw)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 r)�FormatErrorN)rrrr'rrrr)rrrr's    r�test_import_FormatErrorz(TestDeprecations.test_import_FormatError6s\��P��
�
"�
"�#5�w�
?�1�.�@�	
����j�&<�&<�=�������X�.�	@�
?�r#c���d}|jt|�5}ddlm}ddd�|j	t
j�|j	jt�y#1swY�JxYw)z�
        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 r)�	ValidatorN)rrrr*rr	rr)rrrr*s    r�test_import_Validatorz&TestDeprecations.test_import_ValidatorCs\��N��
�
"�
"�#5�w�
?�1�,�@�	
����I�$7�$7�8�������X�.�	@�
?�r#c��d}|jt|�5}tj}ddd�|jtj�|jj
t�y#1swY�JxYw)za
        As of v4.0.0, accessing jsonschema.validators.validators is
        deprecated.
        z8Accessing jsonschema.validators.validators is deprecatedN)rrr
r�_VALIDATORSrr�rrr�values    r�test_validators_validatorsz+TestDeprecations.test_validators_validatorsPsd��M��
�
"�
"�#5�w�
?�1��)�)�E�@�	
����
� 6� 6�7�������X�.�	@�
?���A3�3A<c��d}|jt|�5}tj}ddd�|j	tj
�|j	jt�y#1swY�JxYw)zc
        As of v4.0.0, accessing jsonschema.validators.meta_schemas is
        deprecated.
        z:Accessing jsonschema.validators.meta_schemas is deprecatedN)rrr
�meta_schemasr�
_META_SCHEMASrrr.s    r�test_validators_meta_schemasz-TestDeprecations.test_validators_meta_schemas]sd��O��
�
"�
"�#5�w�
?�1��+�+�E�@�	
����
� 8� 8�9�������X�.�	@�
?�r1c�*�tjji�}d}|jt|�5}|jd�5	ddd�ddd�|j
jt�y#1swY�2xYw#1swY�6xYw)zC
        As of v4.0.0, RefResolver.in_scope is deprecated.
        z.jsonschema.RefResolver.in_scope is deprecated �fooN)	r
�_RefResolver�from_schemarr�in_scoperrr)r�resolverrrs    r�test_RefResolver_in_scopez*TestDeprecations.test_RefResolver_in_scopejsw��
�*�*�6�6�r�:��B��
�
"�
"�#5�w�
?�1��"�"�5�)��*�@�	
������X�.�*�)��@�
?�s#�B	�
A=�B	�=B	�B	�	Bc��tji�}d}|jt|�5}|j	dddi�}ddd�|j�|j
jt�y#1swY�;xYw)zz
        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 r7�type�numberN)	r
�Draft7Validatorrr�is_valid�assertFalserrr)r�	validatorrr�results     r�%test_Validator_is_valid_two_argumentsz6TestDeprecations.test_Validator_is_valid_two_argumentswsw���.�.�r�2�	�I��
�
"�
"�#5�w�
?�1��'�'����/A�B�F�@�	
���� �������X�.�	@�
?�s�A=�=Bc�,�tji�}d}|jt|�5}|j	dddi�\}ddd�|jjd�|jjt�y#1swY�FxYw)z}
        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 r7r>r?N)	r
r@rr�iter_errorsrrCrr)rrCrr�errors     r�(test_Validator_iter_errors_two_argumentsz9TestDeprecations.test_Validator_iter_errors_two_arguments�s���.�.�r�2�	�L��
�
"�
"�#5�w�
?�1��*�*�5�6�8�2D�E�F�E�@�	
������&�1�������X�.�	@�
?�s�B
�
Bc��tji�}d}|jt|�5}|j	|j
tj�ddd�|jjt�y#1swY�*xYw)zL
        As of v4.18.0, accessing Validator.resolver is deprecated.
        z&Accessing Draft7Validator.resolver is N)
r
r@rr�assertIsInstancer;r8rrr)rrCrrs    r�test_Validator_resolverz(TestDeprecations.test_Validator_resolver�sn��
�.�.�r�2�	�:��
�
"�
"�#5�w�
?�1��!�!�)�"4�"4�j�6M�6M�N�@�	
������X�.�@�
?�s�+B�Bc�L�d}|jt|�5}ddlm}ddd�|j	j
t�|jt|�5}ddlm}ddd�|j	|j
t�y#1swY�oxYw#1swY�6xYw)zA
        As of v4.18.0, RefResolver is fully deprecated.
        z$jsonschema.RefResolver is deprecatedr)�RefResolverN)rrrrNrrrr )rrrrNs    r�test_RefResolverz!TestDeprecations.test_RefResolver�s}��
9��
�
"�
"�#5�w�
?�1�.�@�������X�.�
�
"�
"�#5�w�
?�1�9�@�������X�.�
@�
?��@�
?�s�B�B�B�B#c���d}|jt|�5}ddlm}ddd�|j	t
j�|j	jt�|jt|�5}ddl	m}ddd�|j	|t
j�|j	|jt�y#1swY��xYw#1swY�VxYw)z�
        As of v4.18.0, RefResolutionError is deprecated in favor of directly
        catching errors from the referencing library.
        z6jsonschema.exceptions.RefResolutionError is deprecatedr��RefResolutionErrorN)
rrrrRrr�_RefResolutionErrorrr�jsonschema.exceptions)rrrrRs    r�test_RefResolutionErrorz(TestDeprecations.test_RefResolutionError�s���K��
�
"�
"�#5�w�
?�1�5�@�	
���+�Z�-K�-K�L�������X�.�
�
"�
"�#5�w�
?�1�@�@�	
���+�Z�-K�-K�L�������X�.�@�
?��@�
?�s�C�>C�C�C#c�v�tjddi�}|jtjj
�5}|j
d�ddd�tjjd��}|jjt|j�f|df�y#1swY�]xYw)a
        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:nothing�N)�ref�Unresolvable: urn:nothing)
r
�Draft202012Validator�assertRaises�referencingr�Unresolvable�validater�	exception�str)rrC�e�expecteds    r�#test_catching_Unresolvable_directlyz4TestDeprecations.test_catching_Unresolvable_directly�s����3�3�V�]�4K�L�	�
�
�
�{�5�5�B�B�
C�q����r�"�D��)�)�6�6�=�6�I�����
�[�[�#�a�k�k�*�+�
�2�3�	
�	D�
C�s�B/�/B8c��|jt�5ddlm}ddd�t	j
ddi�}|j
tjj�5}|jd�ddd�|j
�5}|jd�ddd�|jjt|j�fjdf�y#1swY��xYw#1swY�~xYw#1swY�_xYw)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.
        rrQNrWrXrYr[)�assertWarnsrrrRr
r\r]r^rr_r`rrarb�rrRrC�urcs     r�1test_catching_Unresolvable_via_RefResolutionErrorzBTestDeprecations.test_catching_Unresolvable_via_RefResolutionError�s����
�
�0�
1�5�2��3�3�V�]�4K�L�	�
�
�
�{�5�5�B�B�
C�q����r�"�D��
�
�1�
2�a����r�"�3�	
���
�[�[�#�a�k�k�*�+�
�[�[�5�6�	
�2�
1��
D�
C��3�
2�s#�C(�%C4�D�(C1�4C=�D	c�:�|jt�5ddlm}ddd�t	j
ddi�}|j
tjj�5}|jd�ddd�|j
�5}|jd�ddd�|jjjh�|j|j|jh�y#1swY��xYw#1swY��xYw#1swY�pxYw)zS
        Ensure the wrapped referencing errors are hashable when possible.
        rrQNrWrXrY)
rgrrrRr
r\r]r^rr_r`�assertInrarhs     r�(test_WrappedReferencingError_hashabilityz9TestDeprecations.test_WrappedReferencingError_hashability�s����
�
�0�
1�5�2��3�3�V�]�4K�L�	�
�
�
�{�5�5�B�B�
C�q����r�"�D��
�
�1�
2�a����r�"�3�	
�
�
�a�k�k�A�K�K�=�1��
�
�a�k�k�A�K�K�=�1�2�
1��
D�
C��3�
2�s#�C9�%D�D�9D�D�Dc�d�d}|jt|�5}Gd�dtj�}ddd�|j	j
t�|jt|�5}Gd�dtji���}ddd�y#1swY�hxYw#1swYyxYw)ac
        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��eZdZy)�=TestDeprecations.test_Validator_subclassing.<locals>.SubclassN��__name__�
__module__�__qualname__��r�Subclassrp���rvrwNc��eZdZy)�DTestDeprecations.test_Validator_subclassing.<locals>.AnotherSubclassNrqrurvr�AnotherSubclassrzrxrvr{)�meta_schema)rrr
r\rrr�create)rrrrwr{s     r�test_Validator_subclassingz+TestDeprecations.test_Validator_subclassing�s���6��
�
"�
"�#5�w�
?�1�
�:�:�:�
�@�	
������X�.�
�
"�
"�#5�w�
?�1�
�*�"3�"3��"C�
�@�
?�
@�
?��@�
?�s�B�1 B&�B#�&B/c��|jtjjdd�d}|j	t
|�5}tjd�ddd�|jjt�y#1swY�*xYw)zd
        As of v4.14.0, FormatChecker.cls_checks is deprecated without
        replacement.
        �boomNzFormatChecker.cls_checks )
�
addCleanupr�checkers�poprr�
cls_checksrrr)rrrs   r�test_FormatChecker_cls_checksz.TestDeprecations.test_FormatChecker_cls_checkssl��	
���
�.�.�2�2�F�D�A�-��
�
"�
"�#5�w�
?�1��$�$�V�,�@�	
������X�.�@�
?�s�B�Bc�J�d}|jt|�5}ddlm}ddd�|j	t
jj�|jjt�d}|jt|�5}ddlm}ddd�|j	t
jj�|j|jt�d}|jt|�5}ddlm
}ddd�|j	t
jj�|j|jt�d	}|jt|�5}dd
lm}ddd�|j	t
j j�|j|jt�d}|jt|�5}ddlm}ddd�|j	t
j$j�|j|jt�d
}|jt|�5}ddlm}ddd�|j	t
j(j�|j|jt�|j+t,�5ddlm}	ddd�y#1swY���xYw#1swY��JxYw#1swY���xYw#1swY���xYw#1swY��xYw#1swY��xYw#1swYyxYw)z�
        As of v4.16.0, accessing jsonschema.draftn_format_checker is deprecated
        in favor of Validator.FORMAT_CHECKER.
        z3Accessing jsonschema.draft202012_format_checker is r)�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)rrrr��assertIsr
r\�FORMAT_CHECKERrrrr��Draft201909Validatorr�r@r��Draft6Validatorr��Draft4Validatorr��Draft3Validatorr]�ImportErrorr�)
rrrr�r�r�r�r�r�r�s
          r�test_draftN_format_checkerz+TestDeprecations.test_draftN_format_checkersn��H��
�
"�
"�#5�w�
?�1�=�@�	
�
�
�&��+�+�:�:�	
�	
������X�.�G��
�
"�
"�#5�w�
?�1�=�@�	
�
�
�&��+�+�:�:�	
�	
������X�.�B��
�
"�
"�#5�w�
?�1�8�@�	
�
�
�!��&�&�5�5�	
�	
������X�.�B��
�
"�
"�#5�w�
?�1�8�@�	
�
�
�!��&�&�5�5�	
�	
������X�.�B��
�
"�
"�#5�w�
?�1�8�@�	
�
�
�!��&�&�5�5�	
�	
������X�.�B��
�
"�
"�#5�w�
?�1�8�@�	
�
�
�!��&�&�5�5�	
�	
������X�.�
�
�
�{�
+�;�,�
+�w@�
?��@�
?��@�
?��@�
?��@�
?��@�
?��,�
+�sS�K�
K�;K&�,K3�L�L
�<L�K�K#�&K0�3K=�L
�
L�L"c��d}|jt|�5}ddl}tj|j
�ddd�|j
jtj�y#1swY�4xYw)zH
        As of v4.17.0, importing jsonschema.cli is deprecated.
        z5The jsonschema CLI is deprecated and will be removed rN)	rr�jsonschema.clir�reload�clirrr)rrrrs    r�test_import_cliz TestDeprecations.test_import_clids^��
J��
�
"�
"�#5�w�
?�1�!����Z�^�^�,�@�	
������Y�%7�%7�8�	@�
?�s�$A0�0A9c��tjtjddgd��}|j	d|j
�y)zB
        As of v4.17.0, the jsonschema CLI is deprecated.
        z-mrT)�capture_outputs!The jsonschema CLI is deprecated N)�
subprocess�run�sys�
executablerl�stderr)r�processs  r�test_clizTestDeprecations.test_clips8��
�.�.�
�^�^�T�<�0��
��	
�
�
�:�G�N�N�Krvc�v���d}ddddiii�dtjvr<�jtjjdtjd�dtjd<t��fd��}tjd	|i�}d
}tjjtjd|��}|5�jt|�5�j|ji�|jd
�fd�ddd�ddd�y#1swY�xYw#1swYyxYw)zW
        Automatic retrieval of remote references is deprecated as of v4.18.0.
        zhttp://bar#/$defs/bazz$defs�bazr>�integer�requestsNc3��K��j|tjj��j	|j
d�|j
�\\}}�j	|j�d��j	|d�ttj��jd����y�w)Nz
http://barz
user-agentz.python-jsonschema (deprecated $ref resolution)�utf8)rK�urllib�request�Requestr�full_url�header_items�lowerr�json�dumps�encode)r��headerr/�schemars   ��r�fake_urlopenzFTestDeprecations.test_automatic_remote_retrieval.<locals>.fake_urlopen�s�������!�!�'�6�>�>�+A�+A�B����W�-�-�|�<� '�3�3�5��O�V�U����V�\�\�^�\�:�����G�
��$�*�*�V�,�3�3�F�;�<�<�s�B>CrWz+Automatically retrieving remote references �urlopen)�new�%)FT)r��modulesr��__setitem__rr
r\r�patch�objectr�r�rrrrA)rrZr�rCrr�r�s`     @r�test_automatic_remote_retrievalz0TestDeprecations.test_automatic_remote_retrieval{s���&���E�F�I�#6�7�8������$��O�O����'�'��S�[�[��5L�
�#'����J��	�	=�
�	=��3�3�V�S�M�B�	�?���
�
�!�!�&�.�.�)��!�N��
�D�)�)�*<�g�F�����#�#�B�'��);�);�B�)?�@��
�G�U�U�F�F��U�U�s$�D/�3D#�D/�#D,	�(D/�/D8N)rrrsrtrr"r%r(r+r0r5r<rErIrLrOrUrerjrmr~r�r�r�r�r�rurvrrrss��
/�/�/�/�/�/�/�/�/�/�
/�/�/�&
�$
�,2�$�./�C<�J
9�	L�$rvr)�
contextlibr�ior�unittestrr�importlib.metadatarr�r�r��urllib.requestr��referencing.exceptionsr^rrrr	r
rrurvr�<module>r�s4��%��#����
���G�G�P�x�Prv

Youez - 2016 - github.com/yon3zu
LinuXploit