U nf @s&ddlmZddlZddlZddlmZmZmZmZm Z m Z ddl m Z ddl mZmZddlmZddlmZesxeZd Ze eeeegeffZe d Ze d dd d!d ddd dddZe ddd ddeeddddddddddZe ddd ddeeddddddddddd ZdS)") annotationsN) TYPE_CHECKINGAnyCallableTypeTypeVarUnion) deprecated)DEFAULT_REF_TEMPLATEGenerateJsonSchema) TypeAdapter)PydanticDeprecatedSince20) parse_obj_as schema_ofschema_json_ofTQ`parse_obj_as` is deprecated. Use `pydantic.TypeAdapter.validate_python` instead.)categoryztype[T]rzNameFactory | None)type_obj type_namereturncCs6tjdtdd|dk r(tjdtddt||S)Nrr r stacklevelzVThe type_name parameter is deprecated. parse_obj_as no longer creates temporary modelsr)warningswarnrDeprecationWarningr Zvalidate_python)rrrrG/opt/hc_python/lib/python3.8/site-packages/pydantic/deprecated/tools.pyrsrJ`schema_of` is deprecated. Use `pydantic.TypeAdapter.json_schema` instead.Ttitleby_alias ref_templateschema_generatorboolstrztype[GenerateJsonSchema]zdict[str, Any])rr#r$r%r&rcCs`tjdtddt|j|||d}|dk r\t|tr@||d<ntjdtdd|||d<|S) zSGenerate a JSON schema (as dict) for the passed model or dynamically generated one.r!r r)r$r&r%Nr#zRPassing a callable for the `title` parameter is deprecated and no longer supportedr)rrrr json_schema isinstancer(r)rr#r$r%r&resrrr r-s(    rO`schema_json_of` is deprecated. Use `pydantic.TypeAdapter.json_schema` instead.)rr#r$r%r& dumps_kwargsrcKs,tjdtddtjt|||||df|S)zSGenerate a JSON schema (as JSON) for the passed model or dynamically generated one.r,r rr")rrrjsondumpsr)rr#r$r%r&r-rrr rQsr)N) __future__rr.rtypingrrrrrrtyping_extensionsr r)r r Z type_adapterr rr__all__r(Z NameFactoryrrrrrrrr sF