HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/jsonschema/benchmarks/__pycache__/nested_schemas.cpython-39.pyc
a

�,�hd�
@s�dZddlmZddlmZdddddddddd�ddd	d
�Zdd�Zee�e�Zed
kr�ddl	m
Z
e
�Zedd�Ze�
ddd��eddd�D](Zeed�Ze�
de��efdd��q�dS)z�
Validating highly nested schemas shouldn't cause exponential time blowups.

See https://github.com/python-jsonschema/jsonschema/issues/1097.
�)�cycle)�
validator_forz/https://example.com/draft/2020-12/schema/strictz,https://json-schema.org/draft/2020-12/schemaT)z0https://json-schema.org/draft/2020-12/vocab/corez6https://json-schema.org/draft/2020-12/vocab/applicatorz7https://json-schema.org/draft/2020-12/vocab/unevaluatedz6https://json-schema.org/draft/2020-12/vocab/validationz5https://json-schema.org/draft/2020-12/vocab/meta-dataz=https://json-schema.org/draft/2020-12/vocab/format-annotationz3https://json-schema.org/draft/2020-12/vocab/content�metaF)z$idz$schemaz$vocabularyz$dynamicAnchorz$refZunevaluatedPropertiescCsLtgd��}ddddiid�}tt|d�|�D]\}}d||id�}q0|S)zL
    Produce a schema which validates deeply nested objects and arrays.
    )Zfoo�barZbazZquuxZspam�eggs�objectZham�type�string)rZ
properties�)r�zip�range)�levels�names�schema�_�name�r�U/opt/nydus/tmp/pip-target-wkfpz8uv/lib/python/jsonschema/benchmarks/nested_schemas.py�
nested_schemas
r�__main__)�Runnerr
)r
z
not nestedcCs
t�t�S�N)�	validator�is_valid�
not_nestedrrrr�<lambda>1�r��z	nested * cCs
t�|�Sr)rr)rrrrr7rN)�__doc__�	itertoolsrZjsonschema.validatorsrZ
metaschemaishrr�__name__Zpyperfr�runnerrZ
bench_funcrr
rrrrr�<module>s:�	�


�