L i+nUdZddlmZddlmZddlmZmZmZddl m Z ddl m Z ddl mZddlmZmZmZmZdd lmZdd lmZdd lZdd lZdd lZdd lZdd lmZmZmZdd lm Z!ddl"m#Z#dd l$Z%dd l&Z%ddl'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.erddl/m0Z0e-jbZ2iZ3de4d<e-jjZ6dZ7dZ8d_dZ9e!jte%jve9Zide)jde*jde)jd1e)jd2e)jd8e)jd9e*jd e*jd#e)jd:e)jd;e)jd%e)jd?e)jde*jd&e)jd'e)jd3e)je)je)je)je)je)je)je)je)je)je)je)je)je)je)je)jd@e+je(jdAe%jNjje*j/Z|eAe!jdBidCe*jde)jde*jde)jd1e)jd2e)jd8e)jd9e)jdDe)jdEe)jd#e)jd:e)jd;e)jd%e)jd?e)jde*jd&e)jid'e)jd3e)jd(e)jd)e)jd*e)jd4e)jd+e)jdFe)jdGe)jdHe)jd,e)jdIe)jdJe)jdKe)jdLe)jdMe)jdNe*je*je)jdOe+je(jdPQZeAe!jdRidSe)j de)jde)jd1e)jd2e)jd8e)jd9e)jdDe)jdEe)jd#e)jd:e)jd;e)jd%e)jd?e)jde)jd&e)jd'e)jid3e)jd(e)jd)e)jd*e)jd4e)jd+e)jdFe)jdGe)jdHe)jd,e)jdIe)jdTe)jdJe)jdKe)jdLe)jdMe)jdNe)je)je)jdOe+jze(j|dUQZeZde4dV<GdWdXZdYZdZZd[Zd\Zdbd]Ze2f dcd^Zy )dzQ Creation and extension of validators, with implementations for existing drafts. ) annotations)deque)IterableMappingSequence) lru_cache) methodcaller) TYPE_CHECKING)unquote urldefragurljoinurlsplit)urlopen)warnN)definefieldfields)REGISTRY) HashTrieMap)_format _keywords_legacy_keywords_types_typing_utils exceptions) Validatorzdict[str, Validator] _VALIDATORSc|dk(r$tjdtdddlm}|S|dk(r"tjdtdt S|d k(r"tjd tdt S|d k(r0tjtjtdtStd td |)N ErrorTreezkImporting ErrorTree from jsonschema.validators is deprecated. Instead import it from jsonschema.exceptions. stacklevelr)r validatorszvAccessing jsonschema.validators.validators is deprecated. Use jsonschema.validators.validator_for with a given schema. meta_schemaszxAccessing jsonschema.validators.meta_schemas is deprecated. Use jsonschema.validators.validator_for with a given schema. RefResolverzmodule z has no attribute ) warningsrDeprecationWarningjsonschema.exceptionsr r _META_SCHEMAS _RefResolver_DEPRECATION_MESSAGEAttributeError__name__)namer s [/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/jsonschema/validators.py __getattr__r1,s {  <   4    K       K       - -   78*,>tfE FFcfd}|S)a Register the decorated validator for a ``version`` of the specification. Registered validators and their meta schemas will be considered when parsing :kw:`$schema` keywords' URIs. Arguments: version (str): An identifier to use as the version's name Returns: collections.abc.Callable: a class decorator to decorate the validator with the version cb|t<|j|j}|t|<|SN)rID_OF META_SCHEMAr*)clsmeta_schema_idversions r0 _validateszvalidates.._validateses." G3??3(+ n% r2)r:r;s` r0 validatesr=Ps* r2c:ddlm}m}ddi}|||}||5}tjdt dt jjtj|t jj cdddS#1swYyxYw) Nr)Requestrz User-Agentz.python-jsonschema (deprecated $ref resolution))headersaAutomatically retrieving remote references can be a security vulnerability and is discouraged by the JSON Schema specifications. Relying on this behavior is deprecated and will shortly become an error. If you are sure you want to remotely retrieve your reference and that it is safe to do so, you can find instructions for doing so via referencing.Registry in the referencing documentation (https://referencing.readthedocs.org). r")default_specification) urllib.requestr?rr'rr( referencingResource from_contentsjsonload jsonschema DRAFT202012)urir?rr@requestresponses r0_warn_for_remote_retrieverNms/MNGc7+G   X  5  ##11 IIh "-"8"8"D"D2    s A(BB)retriever<itemstype[Validator]c  | tjjxsdtjj t G  fdd}t |Dcgc]&}|jr|j|jf(c} |R|jjddjdd} | dx|_ |_ t||}|Scc}w)a" Create a new validator class. Arguments: meta_schema: the meta schema for the new validator class validators: a mapping from names to callables, where each callable will validate the schema property with the given name. Each callable should take 4 arguments: 1. a validator instance, 2. the value of the property being validated within the instance 3. the instance 4. the schema version: an identifier for the version that this validator class will validate. If provided, the returned validator class will have its ``__name__`` set to include the version, and also will have `jsonschema.validators.validates` automatically called for the given version. type_checker: a type checker, used when applying the :kw:`type` keyword. If unprovided, a `jsonschema.TypeChecker` will be created with a set of default types typical of JSON Schema drafts. format_checker: a format checker, used when applying the :kw:`format` keyword. If unprovided, a `jsonschema.FormatChecker` will be created with a set of default formats typical of JSON Schema drafts. id_of: A function that given a schema, returns its ID. applicable_validators: A function that, given a schema, returns the list of applicable schema keywords and associated values which will be used to validate the instance. This is mostly used to support pre-draft 7 versions of JSON Schema which specified behavior around ignoring keywords if they were siblings of a ``$ref`` keyword. If you're not attempting to implement similar behavior, you can typically ignore this argument and leave it at its default. Returns: a new `jsonschema.protocols.Validator` class zurn:unknown-dialect) dialect_iddefaultceZdZUeWZeWZWZWZeWZ WZ e dddZ e e jZded<e dddZe d Zd ed <e ed d Zded<e ddd dZdZfdZeefdZefdZfdZdfd Z dfd ZdZ dZ!dZ"ddZ#y)create..ValidatorF)initrepreq)rXzreferencing.jsonschema.SchemaschemaNresolver)rTrXaliasrTz_format.FormatChecker | Noneformat_checkerT)rTkw_onlyrXz%referencing.jsonschema.SchemaRegistry _registry _resolver)r\rTr_rXcPtjdtdd}||_y)NaKSubclassing validator classes is not intended to be part of their public API. A future version will make doing so an error, as the behavior of subclasses isn't guaranteed to stay the same between releases of jsonschema. Instead, prefer composition of validators, wrapping them in an object owned entirely by the downstream library.r!r"c|j}|jd|j}t||}t |D];}|j s|j }|j}||vs-t||||<=|di|SNrZr]r<) __class__ setdefaultrZ validator_forrrWr/r\getattr)selfchangesr8rZ NewValidatorr attr_name init_names r0evolvez;create..Validator.__init_subclass__..evolve snn ++HdkkB,VSA #C[FE :: % I % I /-4T9-E * F$.g..r2)r'rr(rn)r8rns r0__init_subclass__z+create..Validator.__init_subclass__s* MM@#  / CJr2c$|jZ|j}|turtj|} j |j }|j||_|j dus|j durg|_nH|j Dcgc]%\}}||jvr|j|||f'c}}|_t|jdd}||j }| ||yyycc}}w)NTF push_scope) rar`_REMOTE_WARNING_REGISTRYSPECIFICATIONScombinecreate_resourcerZresolver_with_root _validators VALIDATORSrh _ref_resolver) riregistryresourcekvrqidapplicable_validatorsid_of specifications r0__attrs_post_init__z-create..Validator.__attrs_post_init__s~~%>>#;;-55h?H(88E!)!rN"&$s!*D ct|j|}|tur |j}||j|}|j |D] }t j j|y)Nr])rZr^)rgr7_UNSETFORMAT_CHECKER iter_errorsr SchemaError create_from)r8rZr^r validatorerrors r0 check_schemaz&create..Validator.check_schema3sn%coosCI'!*!9!9!-I#..v6 @ ,,88?? @r2ctjd|jjdtd|j &t j|j|_|j S)Nz Accessing z.resolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization.r!r")r) r'rrer.r(ryr+ from_schemarZ)rirs r0r[z"create..Validator.resolver?sq MM !8!8 9:%%# !!)%1%=%=KK&>&"%% %r2c|jd|j}t||j}D]\}}||vs t ||||<|di|Srd)rfrZrgrerh)rirjrZrkrlrm evolve_fieldss r0rnz create..Validator.evolveTsh''$++>F(HL*7 B&IG+)0y)AGI& B *'* *r2c 3K|Utjdtd |Dcgc]%\}}||jvr|j|||f'}}}n|j|j }}|dury|dur t jd|dd||y|D]_\}}}|||||xsd}|D]E}|j|||||j |d vr|jj||Gaycc}}ww) NzPassing a schema to Validator.iter_errors is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).iter_errors(...) instead.r!r"TFFalse schema does not allow rvalidator_valueinstancerZr<rrrrZ type_checker>if$ref) r'rr(rxrZrwrValidationError_set TYPE_CHECKER schema_path appendleft) rir_schemar|r}r$rerrorsrrs r0rz%create..Validator.iter_errors^sF" 4 '  !6g >1DOO+__Q'A.  '+kk43C3C$E! 0028,?"$(%" #-  1a"4Hg>D"#  EJJ"#()!)&%)%6%6 .))44Q7K   )s*D*DB0Dc 3K|dury|dur tjd|dd||y|j|j|}n?|*|jj j |}|j||} |D]\}}|jj|} | $| ||||xsd} | D]} | j|||||j|d vr| jj||| jj||| jj|| yw) NTFrrrZ)rZrar<r>rr)rrryrnrain_subresourcerurxgetrrrrpath)rirrZrrr[evolvedr|r}rrrrrs r0descendz!create..Validator.descendsv~5 0028,?"$(%! !!-++V+4##~~<<%55f= H++Vx+H-f5 1#..2215 $"7Ax@FB# EJJ"#()!)%%,%9%9 .))44Q7' --d3".))44[AK  sE E c4|j|i|D]}|yr5)r)riargskwargsrs r0validatez"create..Validator.validates()))4:6:   r2c |jj||S#tj$r%tj|||j }|dwxYwr5)ris_typerUndefinedTypeCheck UnknownTyperZ)rirtypeexcs r0rz!create..Validator.is_typesU $((004@@00 $ ,,T8T[[It# $s 8Ac|jD |jj|}|j||j|jSt|jdd}|7|jj|5}|j||cdddS||\}}|jj| t|j|||jjS#tjj $r}t j ||d}~wwxYw#1swYyxYw#|jjwxYw)N)r[resolve)ryralookuprDr Unresolvable_WrappedReferencingErrorrcontentsr[rh resolvingrqlist pop_scope)rirefrresolvederrrscopes r0_validate_referencez-create..Validator._validate_referencesH!!)L#~~44S9H||%%%..$ "$"4"4iF?++55c:@h#||Hh?@@'.clOE8&&11%87#DLL8$DE**446)#--::L$==cBKL@@**446s/C=D8E=D5D00D58EE c|.tjdtd|j|}t |j |d}|duS)NzPassing a schema to Validator.is_valid is deprecated and will be removed in a future release. Call validator.evolve(schema=new_schema).is_valid(...) instead.r!r"r)r'rr(rnnextr)rirrrs r0is_validz"create..Validator.is_validsT" # '  {{'{2))(3T:ED= r2r5)NNN)$r. __module__ __qualname__dictrxr7rr staticmethodr6_APPLICABLE_VALIDATORSrrwreprlibrXrZ__annotations__ryr^rrr`raror classmethodrrpropertyr[rnrrrrrr)rrformat_checker_argr meta_schemarrr$sr0rrVs*% ;' # +U#!6Uu= 057<<0H-HdjI 7)>))00>M  U!U!U! U!rI&  :: U[[!M }}&&sB/77R@9=i6HH Y3&Ig&y1 s7+C;c t|j}|j|| |j}| |j}t |j |||||j|jS)a Create a new validator class by extending an existing one. Arguments: validator (jsonschema.protocols.Validator): an existing validator class validators (collections.abc.Mapping): a mapping of new validator callables to extend with, whose structure is as in `create`. .. note:: Any validator callables with the same name as an existing one will (silently) replace the old validator callable entirely, effectively overriding any validation done in the "parent" validator class. If you wish to instead extend the behavior of a parent's validator callable, delegate and call it directly in the new validator function by retrieving it using ``OldValidator.VALIDATORS["validation_keyword_name"]``. version (str): a version for the new validator class type_checker (jsonschema.TypeChecker): a type checker, used when applying the :kw:`type` keyword. If unprovided, the type checker of the extended `jsonschema.protocols.Validator` will be carried along. format_checker (jsonschema.FormatChecker): a format checker, used when applying the :kw:`format` keyword. If unprovided, the format checker of the extended `jsonschema.protocols.Validator` will be carried along. Returns: a new `jsonschema.protocols.Validator` class extending the one provided .. note:: Meta Schemas The new validator class will have its parent's meta schema. If you wish to change or extend the meta schema in the new validator class, modify ``META_SCHEMA`` directly on the returned class. Note that no implicit copying is done, so a copy should likely be made before modifying it, in order to not affect the old validator. )rr$r:rr^rr) rrxupdaterrrr7r6r)rr$r:rr^all_validatorss r0extendrswF)../N*% -- "11 ))!!%oo'>> r2z'http://json-schema.org/draft-03/schema#radditionalItemsadditionalProperties dependenciesdisallow divisibleByenumextendsformatmaxItems maxLengthmaximumminItems minLengthminimumpattern)patternProperties propertiesr uniqueItemsdraft3)rr$rr^r:rrz'http://json-schema.org/draft-04/schema#allOfanyOf maxProperties minProperties) multipleOfnotoneOfrrrrequiredrrdraft4z'http://json-schema.org/draft-06/schema#constcontainsexclusiveMaximumexclusiveMinimum)rrrrrrrrrr propertyNamesrrrdraft6z'http://json-schema.org/draft-07/schema#r)rrrrrrrrrrrrrrrdraft7z,https://json-schema.org/draft/2019-09/schemaz $recursiveRefdependentRequireddependentSchemasrrrrrrrrunevaluatedItems)unevaluatedPropertiesrz draft2019-09)rr$rr^r:z,https://json-schema.org/draft/2020-12/schemaz $dynamicRef prefixItemsz draft2020-12_LATEST_VERSIONc2eZdZdZdZeddddfdZeejjjfdZ dZ d Zed Zed Zej&d Zej&d ZdZedZedZdZdZdZdZy)r+a Resolve JSON References. Arguments: base_uri (str): The URI of the referring document referrer: The actual referring document store (dict): A mapping from URIs to documents to cache cache_remote (bool): Whether remote refs should be cached after first resolution handlers (dict): A mapping from URI schemes to functions that should be used to retrieve them urljoin_cache (:func:`functools.lru_cache`): A cache that will be used for caching the results of joining the resolution scope to subscopes. remote_cache (:func:`functools.lru_cache`): A cache that will be used for caching the results of resolved remote URLs. Attributes: cache_remote (bool): Whether remote refs should be cached after first resolution .. deprecated:: v4.18.0 ``RefResolver`` has been deprecated in favor of `referencing`. a|jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need.Tr<NcV|tdt}|td|j}||_||_t ||_|g|_tjdtjD|_ |jjdtjD|jj||jjd|jD||j|<||_||_y)Nic3>K|]\}}||jfywr5)r).0rKeachs r0 z(_RefResolver.__init__..s"$ %.S$S$-- $ c3>K|]\}}||jfywr5)r7)rr~rs r0r z(_RefResolver.__init__..s$ '/r4R!! " r c3RK|]}t|tr d|vr |d|f!yw)$idN) isinstancer)rrZs r0r z(_RefResolver.__init__..s1 &'*uE]F # s%')rr resolve_from_urlreferrer cache_remoterhandlers _scopes_stackrURIDictrsrPstorerr*values_urljoin_cache _remote_cache)ribase_urirrrr urljoin_cache remote_caches r0__init__z_RefResolver.__init__s  +IdOG4M  *9T?4+@+@AL  (X &Z^^$ 2@2F2F2H$     3@3F3F3H   %   ,,.  ( 8+)r2c,||||xsd|d|S)z Construct a resolver from a JSON schema object. Arguments: schema: the referring schema Returns: `_RefResolver` r)rrr<)r8rZrrrs r0rz_RefResolver.from_schemas!,4E&M/R&R6RRr2cn|jj|j|j|y)z Enter a given sub-scope. Treats further dereferences as being performed underneath the given scope. N)rappendrresolution_scoperirs r0rqz_RefResolver.push_scopes. !!    5 5u = r2c |jjy#t$rtjddwxYw)z Exit the most recent entered scope. Treats further dereferences as being performed underneath the original scope. Don't call this method more times than `push_scope` has been called. znFailed to pop the scope from an empty stack. `pop_scope()` should only be called once for every `push_scope()`N)rpop IndexErrorr_RefResolutionErrorris r0rz_RefResolver.pop_scopesE     " " $ 00!   s =c |jdS)z8 Retrieve the current resolution scope. )rr&s r0r z_RefResolver.resolution_scopes !!"%%r2c6t|j\}}|S)zL Retrieve the current base URI, not including any fragment. )r r )rirK_s r0rz_RefResolver.base_uris 4001Q r2c#Ktjdtd|j| d|j y#|j wxYww)zt Temporarily enter the given scope for the duration of the context. .. deprecated:: v4.0.0 zVjsonschema.RefResolver.in_scope is deprecated and will be removed in a future release.r"N)r'rr(rqrr!s r0in_scopez_RefResolver.in_scopesI   +      NN DNN s.AAAAAc#K|j|\}}|j| ||jy#|jwxYww)z Resolve the given ``ref`` and enter its resolution scope. Exits the scope on exit of this context manager. Arguments: ref (str): The reference to resolve N)rrqr)rirurlrs r0rz_RefResolver.resolvingsD S) X  N NN DNN s&A>AAAc(|j|Sr5)_get_subschemas_cache)rikeys r0_find_in_referrerz_RefResolver._find_in_referrer,s))+C00r2ctDcic]}|g}}t|jtD]\}}||j ||Scc}wr5)_SUBSCHEMAS_KEYWORDS_search_schemar_match_subschema_keywordsr)rir2cachekeyword subschemas r0r1z"_RefResolver._get_subschemas_cache/s\$89Sb99"0 MM4#  - GY 'N ! !) , - :s A cV|jd}|syt|\}}|D]}|d}t|ts|j |j |}|j d|j dk(sY|r|j||}||j|<||fcSy)Nr /) r1r rstrrr rstripresolve_fragmentr)rir/ subschemasrKfragmentr:r~ target_uris r0_find_in_subschemasz _RefResolver._find_in_subschemas8s//1%8 !# X# &I5!Bb#&,,T-B-BBGJ  %C8 $ 5 5i JI"+ 3I~% &r2c|j|j|jd}|j|}||S||j |fS)z. Resolve the given reference. r<)rr r>rCr)rirr/matchs r0rz_RefResolver.resolveJsX!!$"7"7=DDSI((-  LD&&s+++r2ct|\}}|s |j} |j|}|j||S#t$r= |j |}n'#t $r}t j||d}~wwxYwYWwxYw)z( Resolve the given URL. N) r rrKeyErrorresolve_remote Exceptionrr%r?)rir/rAdocumentrs r0rz_RefResolver.resolve_from_urlVs"# X--C Czz#H$$Xx88  C C..s3 C 44S9sB C Cs3? B AB A?$A::A??BBcP|jd}|sS|jur |j}nfd}dD]}||D]}|||k(s |ccSdD] }||D]}d|z||k(s|ccS"|rt|j dng}|D]F}|j ddj dd}t tr t|} |HS#t$rYwxYw#ttf$r}tjd ||d }~wwxYw) z Resolve a ``fragment`` within the referenced ``document``. Arguments: document: The referent document fragment (str): a URI fragment to resolve within it r<c3LKtt|Ed{y7wr5)r6_match_keyword)r2rJs r0findz+_RefResolver.resolve_fragment..finds)(N34GHHHs $"$)$anchor$dynamicAnchor)r~r #z~1z~0~zUnresolvable JSON pointer: N)lstriprr3r splitrrrint ValueError TypeError LookupErrorrr%) rirJrArNr9r:partspartrs ` r0r?z_RefResolver.resolve_fragmenthsh??3'O t}} $))D I5 %G!'] % y11$$ % %% %G!'] % >Yw%77$$ % % 19!'',b D<<c*224=D(H-t9D #D> "{+  441(> s* C) C8) C54C58D%D  D%c ddl}t|j}||jvr|j||}nl|dvr"|r |j |j }nFt|5}t j|jjd}ddd|jr|j|<S#t$rd}YwxYw#1swY7xYw)a Resolve a remote ``uri``. If called directly, does not check the store first, but after retrieving the document at the specified URI it will be saved in the store if :attr:`cache_remote` is True. .. note:: If the requests_ library is present, ``jsonschema`` will use it to request the remote ``uri``, so that the correct encoding is detected and used. If it isn't, or if the scheme of the ``uri`` is not ``http`` or ``https``, UTF-8 is assumed. Arguments: uri (str): The URI to resolve Returns: The retrieved document .. _requests: https://pypi.org/project/requests/ rN)httphttpszutf-8) requests ImportErrorrschemerrrGrloadsreaddecoderr)rirKr^r`resultr/s r0rHz_RefResolver.resolve_remotes<  #%% T]] "*T]]6*3/F ( (X\\#&++-F @CHHJ$5$5g$>? @   $DJJsO % H  @ @sC03C CCC")r.rr__doc__r,rrrrDrIrJrrrqrrr r contextlibcontextmanagerr-rr3rr1rCrrr?rHr<r2r0r+r+_s.b Em$*L$$0066SS.  &&& $(1" ,9$5n2r2r+)r r~rOrPcfd}|S)Nc3 K|vr|yywr5r<valuer9s r0matcherz_match_keyword..matchers e K s r<)r9rls` r0rMrMs Nr2c#8KtD] }||vs||fywr5)r5rjs r0r7r7s''! e 5. !s c#Kt|g}|rT|j}t|ts#||Ed{|j |j |rSyy7(w)zBreadth-first search routine.N)rr#rr extendleftr)rZrlrrks r0r6r6sW F8_F  %& 5>!!%,,.)  "s;A(A&%A($A(c| t|}|j|||g|i|}tj|j |}||y)a7 Validate an instance under the given schema. >>> validate([2, 3, 4], {"maxItems": 2}) Traceback (most recent call last): ... ValidationError: [2, 3, 4] is too long :func:`~jsonschema.validators.validate` will first verify that the provided schema is itself valid, since not doing so can lead to less obvious error messages and fail in less obvious or consistent ways. If you know you have a valid schema already, especially if you intend to validate multiple instances with the same schema, you likely would prefer using the `jsonschema.protocols.Validator.validate` method directly on a specific validator (e.g. ``Draft202012Validator.validate``). Arguments: instance: The instance to validate schema: The schema to validate with cls (jsonschema.protocols.Validator): The class that will be used to validate the instance. If the ``cls`` argument is not provided, two things will happen in accordance with the specification. First, if the schema has a :kw:`$schema` keyword containing a known meta-schema [#]_ then the proper validator will be used. The specification recommends that all schemas contain :kw:`$schema` properties for this reason. If no :kw:`$schema` property is found, the default validator class is the latest released draft. Any other provided positional and keyword arguments will be passed on when instantiating the ``cls``. Raises: `jsonschema.exceptions.ValidationError`: if the instance is invalid `jsonschema.exceptions.SchemaError`: if the schema itself is invalid .. rubric:: Footnotes .. [#] known by a validator registered with `jsonschema.validators.validates` N)rgrr best_matchr)rrZr8rrrrs r0rrsax {F#VF,T,V,I  ! !)"7"7"A BE  r2c|turtn|}|dus|dusd|vr|S|dtvr|turtdtdtj |d|S)a Retrieve the validator class appropriate for validating the given schema. Uses the :kw:`$schema` keyword that should be present in the given schema to look up the appropriate validator class. Arguments: schema (collections.abc.Mapping or bool): the schema to look at default: the default to return if the appropriate validator class cannot be determined. If unprovided, the default is to return the latest supported draft. Examples: The :kw:`$schema` JSON Schema keyword will control which validator class is returned: >>> schema = { ... "$schema": "https://json-schema.org/draft/2020-12/schema", ... "type": "integer", ... } >>> jsonschema.validators.validator_for(schema) Here, a draft 7 schema instead will return the draft 7 validator: >>> schema = { ... "$schema": "http://json-schema.org/draft-07/schema#", ... "type": "integer", ... } >>> jsonschema.validators.validator_for(schema) Schemas with no ``$schema`` keyword will fallback to the default argument: >>> schema = {"type": "integer"} >>> jsonschema.validators.validator_for( ... schema, default=Draft7Validator, ... ) or if none is provided, to the latest version supported. Always including the keyword when authoring schemas is highly recommended. TFz$schemazThe metaschema specified by $schema was not found. Using the latest draft to validate, but this will raise an error in the future.r!r")rrr*rr(r)rZrTDefaultValidators r0rgrg7srz+2V*; ~5IV,C i -'V2C *     VI.0@ AAr2)rKr=)rz#referencing.jsonschema.ObjectSchemar$zcMapping[str, _typing.SchemaKeywordValidator] | Iterable[tuple[str, _typing.SchemaKeywordValidator]]r:z str | Nonerz_types.TypeCheckerr^z_format.FormatCheckerrz _typing.id_ofrz_typing.ApplicableValidatorsreturnrQ)r<NNNr5)rTztype[Validator] | _utils.UnsetrtrQ)re __future__r collectionsrcollections.abcrrr functoolsroperatorr typingr urllib.parser r r rrCrr'rrfrGrattrsrrrjsonschema_specificationsrrsrpdsrreferencing.exceptionsrDreferencing.jsonschemarIrrrrrrrjsonschema.protocolsrUnsetrrrrr*r1r=rNrtRegistryrrdraft202012_type_checkerdraft202012_format_checkerrJrrrrrrrdependencies_draft3disallow_draft3rrextends_draft3ritems_draft3_draft4rrmaximum_draft3_draft4rrminimum_draft3_draft4rrproperties_draft3 type_draft3rdraft3_type_checkerdraft3_format_checkerDRAFT3ignore_ref_siblingsDraft3Validatorrr!dependencies_draft4_draft6_draft7rrnot_rrrrdraft4_type_checkerdraft4_format_checkerDRAFT4Draft4Validatorrcontains_draft6_draft7rritems_draft6_draft7_draft201909rrrdraft6_type_checkerdraft6_format_checkerDRAFT6Draft6Validatorif_draft7_type_checkerdraft7_format_checkerDRAFT7Draft7Validator recursiveRefrrrunevaluatedItems_draft2019unevaluatedProperties_draft2019draft201909_type_checkerdraft201909_format_checkerDraft201909Validator dynamicRefrPrrrDraft202012Validatorrr+r5rMr7r6rrgr<r2r0rs#77! >>" ''@. $& !& !GH: .2>11K";< '-'F'F,3,N,N&11==CC:F;y4y ?y  y%y*y y8yy|   Rj'''1 +;;  > > (<<  $44  y++    #22 )"" !55 I&& Y(( #99 I&& Y(( #99!" 9$$#$'88&88 ,, ,,+.++00   ' ' - -*>>? D'''1 +;;  > >     (JJ    )"" !55 I&& Y(( 00 #99 I&& Y(( 00!" #99#$ **~~$$&88**&& ,,58++00   ' ' - -*>>I%N'''1   +;;   > >        $;;  (JJ     I66  I66  )""  !AA  I&&  Y((  00! " 9$$# $&&(("00$$**~~$$&88**"00&& ,,? B++00   ' ' - -*>>S*X'''1! !+;;!  > >!  !  !  ! $;;! (JJ!  ! I66! I66! )""! imm! !AA! I&&! Y((!!" 00#!$$$&&(("00$$**~~$$&88**"00&& ,,A!D++00   ' ' - -*>>U+Z'''6')66' ' +;;'  > > '  '  ' ' I&&' Y88' I66'  ' I66' I66' )""' imm' !AA!'" I&&#'$ Y((%'& 00''( 9$$)'* I&&+', Y((-'. 00/'0 9$$1'2 i**3'4 y~~5'6 7'8 9$$9': Y88;'< i**='> 00?'@ I&&A'B  C'D ,GGE'H  < < ,,M'P0055 ]/b'''6%y++% %  > >%  %  %  % I&&% Y88% I66%  % I66% I66% )""% imm% % I&&!%" Y((#%$ 00%%& 9$$'%( I&&)%* Y((+%, 00-%. 9$$/%0 i**1%2 y~~3%4 5%6 9$$7%8 Y889%: y,,;%< i**=%> 00?%@ I&&A%B  C%D I66E%F"+!@!@ ,,I%L0055 Y-^$87rrj B! *CP/5KB +KBKBr2