@steerable/runtime-darwin-arm64 0.0.0-stage → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2192) hide show
  1. package/bin/steerable-egress-proxy +0 -0
  2. package/package.json +25 -4
  3. package/python-runtime/manifest.json +8 -0
  4. package/python-runtime/python/bin/2to3 +7 -0
  5. package/python-runtime/python/bin/2to3-3.12 +7 -0
  6. package/python-runtime/python/bin/cffi-gen-src +6 -0
  7. package/python-runtime/python/bin/dotenv +6 -0
  8. package/python-runtime/python/bin/httpx +6 -0
  9. package/python-runtime/python/bin/idle3 +7 -0
  10. package/python-runtime/python/bin/idle3.12 +7 -0
  11. package/python-runtime/python/bin/idna +6 -0
  12. package/python-runtime/python/bin/jsonschema +6 -0
  13. package/python-runtime/python/bin/mcp +6 -0
  14. package/python-runtime/python/bin/pydoc3 +7 -0
  15. package/python-runtime/python/bin/pydoc3.12 +7 -0
  16. package/python-runtime/python/bin/python +0 -0
  17. package/python-runtime/python/bin/python3 +0 -0
  18. package/python-runtime/python/bin/python3-config +76 -0
  19. package/python-runtime/python/bin/python3.12 +0 -0
  20. package/python-runtime/python/bin/python3.12-config +76 -0
  21. package/python-runtime/python/bin/steerable-sidecar +6 -0
  22. package/python-runtime/python/bin/steerable-sidecar-acp +6 -0
  23. package/python-runtime/python/bin/steerable-sidecar-headless +6 -0
  24. package/python-runtime/python/bin/uvicorn +6 -0
  25. package/python-runtime/python/include/python3.12/Python.h +109 -0
  26. package/python-runtime/python/include/python3.12/abstract.h +899 -0
  27. package/python-runtime/python/include/python3.12/bltinmodule.h +14 -0
  28. package/python-runtime/python/include/python3.12/boolobject.h +42 -0
  29. package/python-runtime/python/include/python3.12/bytearrayobject.h +44 -0
  30. package/python-runtime/python/include/python3.12/bytesobject.h +69 -0
  31. package/python-runtime/python/include/python3.12/ceval.h +168 -0
  32. package/python-runtime/python/include/python3.12/codecs.h +248 -0
  33. package/python-runtime/python/include/python3.12/compile.h +22 -0
  34. package/python-runtime/python/include/python3.12/complexobject.h +30 -0
  35. package/python-runtime/python/include/python3.12/cpython/abstract.h +206 -0
  36. package/python-runtime/python/include/python3.12/cpython/bytearrayobject.h +34 -0
  37. package/python-runtime/python/include/python3.12/cpython/bytesobject.h +133 -0
  38. package/python-runtime/python/include/python3.12/cpython/cellobject.h +44 -0
  39. package/python-runtime/python/include/python3.12/cpython/ceval.h +35 -0
  40. package/python-runtime/python/include/python3.12/cpython/classobject.h +71 -0
  41. package/python-runtime/python/include/python3.12/cpython/code.h +389 -0
  42. package/python-runtime/python/include/python3.12/cpython/compile.h +69 -0
  43. package/python-runtime/python/include/python3.12/cpython/complexobject.h +44 -0
  44. package/python-runtime/python/include/python3.12/cpython/context.h +78 -0
  45. package/python-runtime/python/include/python3.12/cpython/descrobject.h +64 -0
  46. package/python-runtime/python/include/python3.12/cpython/dictobject.h +118 -0
  47. package/python-runtime/python/include/python3.12/cpython/fileobject.h +19 -0
  48. package/python-runtime/python/include/python3.12/cpython/fileutils.h +8 -0
  49. package/python-runtime/python/include/python3.12/cpython/floatobject.h +27 -0
  50. package/python-runtime/python/include/python3.12/cpython/frameobject.h +29 -0
  51. package/python-runtime/python/include/python3.12/cpython/funcobject.h +190 -0
  52. package/python-runtime/python/include/python3.12/cpython/genobject.h +89 -0
  53. package/python-runtime/python/include/python3.12/cpython/import.h +46 -0
  54. package/python-runtime/python/include/python3.12/cpython/initconfig.h +256 -0
  55. package/python-runtime/python/include/python3.12/cpython/interpreteridobject.h +11 -0
  56. package/python-runtime/python/include/python3.12/cpython/listobject.h +47 -0
  57. package/python-runtime/python/include/python3.12/cpython/longintrepr.h +133 -0
  58. package/python-runtime/python/include/python3.12/cpython/longobject.h +100 -0
  59. package/python-runtime/python/include/python3.12/cpython/memoryobject.h +52 -0
  60. package/python-runtime/python/include/python3.12/cpython/methodobject.h +66 -0
  61. package/python-runtime/python/include/python3.12/cpython/modsupport.h +109 -0
  62. package/python-runtime/python/include/python3.12/cpython/object.h +575 -0
  63. package/python-runtime/python/include/python3.12/cpython/objimpl.h +95 -0
  64. package/python-runtime/python/include/python3.12/cpython/odictobject.h +43 -0
  65. package/python-runtime/python/include/python3.12/cpython/picklebufobject.h +31 -0
  66. package/python-runtime/python/include/python3.12/cpython/pthread_stubs.h +88 -0
  67. package/python-runtime/python/include/python3.12/cpython/pyctype.h +39 -0
  68. package/python-runtime/python/include/python3.12/cpython/pydebug.h +38 -0
  69. package/python-runtime/python/include/python3.12/cpython/pyerrors.h +178 -0
  70. package/python-runtime/python/include/python3.12/cpython/pyfpe.h +15 -0
  71. package/python-runtime/python/include/python3.12/cpython/pyframe.h +35 -0
  72. package/python-runtime/python/include/python3.12/cpython/pylifecycle.h +111 -0
  73. package/python-runtime/python/include/python3.12/cpython/pymem.h +98 -0
  74. package/python-runtime/python/include/python3.12/cpython/pystate.h +456 -0
  75. package/python-runtime/python/include/python3.12/cpython/pythonrun.h +121 -0
  76. package/python-runtime/python/include/python3.12/cpython/pythread.h +42 -0
  77. package/python-runtime/python/include/python3.12/cpython/pytime.h +331 -0
  78. package/python-runtime/python/include/python3.12/cpython/setobject.h +72 -0
  79. package/python-runtime/python/include/python3.12/cpython/sysmodule.h +16 -0
  80. package/python-runtime/python/include/python3.12/cpython/traceback.h +16 -0
  81. package/python-runtime/python/include/python3.12/cpython/tupleobject.h +39 -0
  82. package/python-runtime/python/include/python3.12/cpython/unicodeobject.h +976 -0
  83. package/python-runtime/python/include/python3.12/cpython/warnings.h +20 -0
  84. package/python-runtime/python/include/python3.12/cpython/weakrefobject.h +56 -0
  85. package/python-runtime/python/include/python3.12/datetime.h +267 -0
  86. package/python-runtime/python/include/python3.12/descrobject.h +100 -0
  87. package/python-runtime/python/include/python3.12/dictobject.h +97 -0
  88. package/python-runtime/python/include/python3.12/dynamic_annotations.h +499 -0
  89. package/python-runtime/python/include/python3.12/enumobject.h +17 -0
  90. package/python-runtime/python/include/python3.12/errcode.h +38 -0
  91. package/python-runtime/python/include/python3.12/exports.h +36 -0
  92. package/python-runtime/python/include/python3.12/fileobject.h +49 -0
  93. package/python-runtime/python/include/python3.12/fileutils.h +26 -0
  94. package/python-runtime/python/include/python3.12/floatobject.h +54 -0
  95. package/python-runtime/python/include/python3.12/frameobject.h +20 -0
  96. package/python-runtime/python/include/python3.12/genericaliasobject.h +14 -0
  97. package/python-runtime/python/include/python3.12/import.h +98 -0
  98. package/python-runtime/python/include/python3.12/internal/pycore_abstract.h +25 -0
  99. package/python-runtime/python/include/python3.12/internal/pycore_asdl.h +112 -0
  100. package/python-runtime/python/include/python3.12/internal/pycore_ast.h +922 -0
  101. package/python-runtime/python/include/python3.12/internal/pycore_ast_state.h +265 -0
  102. package/python-runtime/python/include/python3.12/internal/pycore_atexit.h +57 -0
  103. package/python-runtime/python/include/python3.12/internal/pycore_atomic.h +557 -0
  104. package/python-runtime/python/include/python3.12/internal/pycore_atomic_funcs.h +94 -0
  105. package/python-runtime/python/include/python3.12/internal/pycore_bitutils.h +186 -0
  106. package/python-runtime/python/include/python3.12/internal/pycore_blocks_output_buffer.h +317 -0
  107. package/python-runtime/python/include/python3.12/internal/pycore_bytes_methods.h +73 -0
  108. package/python-runtime/python/include/python3.12/internal/pycore_bytesobject.h +47 -0
  109. package/python-runtime/python/include/python3.12/internal/pycore_call.h +133 -0
  110. package/python-runtime/python/include/python3.12/internal/pycore_ceval.h +164 -0
  111. package/python-runtime/python/include/python3.12/internal/pycore_ceval_state.h +103 -0
  112. package/python-runtime/python/include/python3.12/internal/pycore_code.h +496 -0
  113. package/python-runtime/python/include/python3.12/internal/pycore_compile.h +118 -0
  114. package/python-runtime/python/include/python3.12/internal/pycore_condvar.h +99 -0
  115. package/python-runtime/python/include/python3.12/internal/pycore_context.h +71 -0
  116. package/python-runtime/python/include/python3.12/internal/pycore_descrobject.h +26 -0
  117. package/python-runtime/python/include/python3.12/internal/pycore_dict.h +199 -0
  118. package/python-runtime/python/include/python3.12/internal/pycore_dict_state.h +50 -0
  119. package/python-runtime/python/include/python3.12/internal/pycore_dtoa.h +69 -0
  120. package/python-runtime/python/include/python3.12/internal/pycore_emscripten_signal.h +25 -0
  121. package/python-runtime/python/include/python3.12/internal/pycore_exceptions.h +37 -0
  122. package/python-runtime/python/include/python3.12/internal/pycore_faulthandler.h +99 -0
  123. package/python-runtime/python/include/python3.12/internal/pycore_fileutils.h +292 -0
  124. package/python-runtime/python/include/python3.12/internal/pycore_fileutils_windows.h +98 -0
  125. package/python-runtime/python/include/python3.12/internal/pycore_floatobject.h +71 -0
  126. package/python-runtime/python/include/python3.12/internal/pycore_flowgraph.h +120 -0
  127. package/python-runtime/python/include/python3.12/internal/pycore_format.h +27 -0
  128. package/python-runtime/python/include/python3.12/internal/pycore_frame.h +283 -0
  129. package/python-runtime/python/include/python3.12/internal/pycore_function.h +26 -0
  130. package/python-runtime/python/include/python3.12/internal/pycore_gc.h +211 -0
  131. package/python-runtime/python/include/python3.12/internal/pycore_genobject.h +49 -0
  132. package/python-runtime/python/include/python3.12/internal/pycore_getopt.h +22 -0
  133. package/python-runtime/python/include/python3.12/internal/pycore_gil.h +50 -0
  134. package/python-runtime/python/include/python3.12/internal/pycore_global_objects.h +105 -0
  135. package/python-runtime/python/include/python3.12/internal/pycore_global_objects_fini_generated.h +1517 -0
  136. package/python-runtime/python/include/python3.12/internal/pycore_global_strings.h +777 -0
  137. package/python-runtime/python/include/python3.12/internal/pycore_hamt.h +134 -0
  138. package/python-runtime/python/include/python3.12/internal/pycore_hashtable.h +149 -0
  139. package/python-runtime/python/include/python3.12/internal/pycore_import.h +183 -0
  140. package/python-runtime/python/include/python3.12/internal/pycore_initconfig.h +179 -0
  141. package/python-runtime/python/include/python3.12/internal/pycore_instruments.h +106 -0
  142. package/python-runtime/python/include/python3.12/internal/pycore_interp.h +275 -0
  143. package/python-runtime/python/include/python3.12/internal/pycore_intrinsics.h +32 -0
  144. package/python-runtime/python/include/python3.12/internal/pycore_list.h +83 -0
  145. package/python-runtime/python/include/python3.12/internal/pycore_long.h +258 -0
  146. package/python-runtime/python/include/python3.12/internal/pycore_memoryobject.h +18 -0
  147. package/python-runtime/python/include/python3.12/internal/pycore_moduleobject.h +45 -0
  148. package/python-runtime/python/include/python3.12/internal/pycore_namespace.h +20 -0
  149. package/python-runtime/python/include/python3.12/internal/pycore_object.h +455 -0
  150. package/python-runtime/python/include/python3.12/internal/pycore_object_state.h +42 -0
  151. package/python-runtime/python/include/python3.12/internal/pycore_obmalloc.h +700 -0
  152. package/python-runtime/python/include/python3.12/internal/pycore_obmalloc_init.h +73 -0
  153. package/python-runtime/python/include/python3.12/internal/pycore_opcode.h +587 -0
  154. package/python-runtime/python/include/python3.12/internal/pycore_opcode_utils.h +92 -0
  155. package/python-runtime/python/include/python3.12/internal/pycore_parser.h +66 -0
  156. package/python-runtime/python/include/python3.12/internal/pycore_pathconfig.h +24 -0
  157. package/python-runtime/python/include/python3.12/internal/pycore_pyarena.h +64 -0
  158. package/python-runtime/python/include/python3.12/internal/pycore_pyerrors.h +129 -0
  159. package/python-runtime/python/include/python3.12/internal/pycore_pyhash.h +40 -0
  160. package/python-runtime/python/include/python3.12/internal/pycore_pylifecycle.h +99 -0
  161. package/python-runtime/python/include/python3.12/internal/pycore_pymath.h +205 -0
  162. package/python-runtime/python/include/python3.12/internal/pycore_pymem.h +98 -0
  163. package/python-runtime/python/include/python3.12/internal/pycore_pymem_init.h +85 -0
  164. package/python-runtime/python/include/python3.12/internal/pycore_pystate.h +180 -0
  165. package/python-runtime/python/include/python3.12/internal/pycore_pythread.h +81 -0
  166. package/python-runtime/python/include/python3.12/internal/pycore_range.h +21 -0
  167. package/python-runtime/python/include/python3.12/internal/pycore_runtime.h +235 -0
  168. package/python-runtime/python/include/python3.12/internal/pycore_runtime_init.h +188 -0
  169. package/python-runtime/python/include/python3.12/internal/pycore_runtime_init_generated.h +1511 -0
  170. package/python-runtime/python/include/python3.12/internal/pycore_signal.h +98 -0
  171. package/python-runtime/python/include/python3.12/internal/pycore_sliceobject.h +22 -0
  172. package/python-runtime/python/include/python3.12/internal/pycore_strhex.h +36 -0
  173. package/python-runtime/python/include/python3.12/internal/pycore_structseq.h +39 -0
  174. package/python-runtime/python/include/python3.12/internal/pycore_symtable.h +160 -0
  175. package/python-runtime/python/include/python3.12/internal/pycore_sysmodule.h +34 -0
  176. package/python-runtime/python/include/python3.12/internal/pycore_time.h +25 -0
  177. package/python-runtime/python/include/python3.12/internal/pycore_token.h +108 -0
  178. package/python-runtime/python/include/python3.12/internal/pycore_traceback.h +101 -0
  179. package/python-runtime/python/include/python3.12/internal/pycore_tracemalloc.h +123 -0
  180. package/python-runtime/python/include/python3.12/internal/pycore_tuple.h +79 -0
  181. package/python-runtime/python/include/python3.12/internal/pycore_typeobject.h +151 -0
  182. package/python-runtime/python/include/python3.12/internal/pycore_typevarobject.h +24 -0
  183. package/python-runtime/python/include/python3.12/internal/pycore_ucnhash.h +34 -0
  184. package/python-runtime/python/include/python3.12/internal/pycore_unicodeobject.h +86 -0
  185. package/python-runtime/python/include/python3.12/internal/pycore_unicodeobject_generated.h +2832 -0
  186. package/python-runtime/python/include/python3.12/internal/pycore_unionobject.h +23 -0
  187. package/python-runtime/python/include/python3.12/internal/pycore_warnings.h +29 -0
  188. package/python-runtime/python/include/python3.12/interpreteridobject.h +17 -0
  189. package/python-runtime/python/include/python3.12/intrcheck.h +30 -0
  190. package/python-runtime/python/include/python3.12/iterobject.h +27 -0
  191. package/python-runtime/python/include/python3.12/listobject.h +52 -0
  192. package/python-runtime/python/include/python3.12/longobject.h +108 -0
  193. package/python-runtime/python/include/python3.12/marshal.h +31 -0
  194. package/python-runtime/python/include/python3.12/memoryobject.h +34 -0
  195. package/python-runtime/python/include/python3.12/methodobject.h +132 -0
  196. package/python-runtime/python/include/python3.12/modsupport.h +168 -0
  197. package/python-runtime/python/include/python3.12/moduleobject.h +119 -0
  198. package/python-runtime/python/include/python3.12/object.h +993 -0
  199. package/python-runtime/python/include/python3.12/objimpl.h +234 -0
  200. package/python-runtime/python/include/python3.12/opcode.h +271 -0
  201. package/python-runtime/python/include/python3.12/osdefs.h +51 -0
  202. package/python-runtime/python/include/python3.12/osmodule.h +17 -0
  203. package/python-runtime/python/include/python3.12/patchlevel.h +35 -0
  204. package/python-runtime/python/include/python3.12/py_curses.h +99 -0
  205. package/python-runtime/python/include/python3.12/pybuffer.h +145 -0
  206. package/python-runtime/python/include/python3.12/pycapsule.h +59 -0
  207. package/python-runtime/python/include/python3.12/pyconfig.h +1943 -0
  208. package/python-runtime/python/include/python3.12/pydtrace.h +59 -0
  209. package/python-runtime/python/include/python3.12/pyerrors.h +337 -0
  210. package/python-runtime/python/include/python3.12/pyexpat.h +62 -0
  211. package/python-runtime/python/include/python3.12/pyframe.h +26 -0
  212. package/python-runtime/python/include/python3.12/pyhash.h +144 -0
  213. package/python-runtime/python/include/python3.12/pylifecycle.h +78 -0
  214. package/python-runtime/python/include/python3.12/pymacconfig.h +99 -0
  215. package/python-runtime/python/include/python3.12/pymacro.h +172 -0
  216. package/python-runtime/python/include/python3.12/pymath.h +62 -0
  217. package/python-runtime/python/include/python3.12/pymem.h +104 -0
  218. package/python-runtime/python/include/python3.12/pyport.h +782 -0
  219. package/python-runtime/python/include/python3.12/pystate.h +132 -0
  220. package/python-runtime/python/include/python3.12/pystats.h +110 -0
  221. package/python-runtime/python/include/python3.12/pystrcmp.h +23 -0
  222. package/python-runtime/python/include/python3.12/pystrtod.h +46 -0
  223. package/python-runtime/python/include/python3.12/pythonrun.h +49 -0
  224. package/python-runtime/python/include/python3.12/pythread.h +135 -0
  225. package/python-runtime/python/include/python3.12/pytypedefs.h +30 -0
  226. package/python-runtime/python/include/python3.12/rangeobject.h +27 -0
  227. package/python-runtime/python/include/python3.12/setobject.h +49 -0
  228. package/python-runtime/python/include/python3.12/sliceobject.h +65 -0
  229. package/python-runtime/python/include/python3.12/structmember.h +56 -0
  230. package/python-runtime/python/include/python3.12/structseq.h +49 -0
  231. package/python-runtime/python/include/python3.12/sysmodule.h +54 -0
  232. package/python-runtime/python/include/python3.12/traceback.h +26 -0
  233. package/python-runtime/python/include/python3.12/tracemalloc.h +77 -0
  234. package/python-runtime/python/include/python3.12/tupleobject.h +46 -0
  235. package/python-runtime/python/include/python3.12/typeslots.h +88 -0
  236. package/python-runtime/python/include/python3.12/unicodeobject.h +1020 -0
  237. package/python-runtime/python/include/python3.12/warnings.h +45 -0
  238. package/python-runtime/python/include/python3.12/weakrefobject.h +42 -0
  239. package/python-runtime/python/lib/itcl4.3.5/itcl.tcl +151 -0
  240. package/python-runtime/python/lib/itcl4.3.5/itclConfig.sh +67 -0
  241. package/python-runtime/python/lib/itcl4.3.5/itclHullCmds.tcl +562 -0
  242. package/python-runtime/python/lib/itcl4.3.5/itclWidget.tcl +447 -0
  243. package/python-runtime/python/lib/itcl4.3.5/libitcl4.3.5.dylib +0 -0
  244. package/python-runtime/python/lib/itcl4.3.5/libitclstub.a +0 -0
  245. package/python-runtime/python/lib/itcl4.3.5/libitclstub4.3.5.a +0 -0
  246. package/python-runtime/python/lib/itcl4.3.5/libtcl9itcl4.3.5.dylib +0 -0
  247. package/python-runtime/python/lib/itcl4.3.5/pkgIndex.tcl +14 -0
  248. package/python-runtime/python/lib/libpython3.12.dylib +0 -0
  249. package/python-runtime/python/lib/libtcl9.0.dylib +0 -0
  250. package/python-runtime/python/lib/libtcl9tk9.0.dylib +0 -0
  251. package/python-runtime/python/lib/pkgconfig/python-3.12-embed.pc +13 -0
  252. package/python-runtime/python/lib/pkgconfig/python-3.12.pc +13 -0
  253. package/python-runtime/python/lib/pkgconfig/python3-embed.pc +13 -0
  254. package/python-runtime/python/lib/pkgconfig/python3.pc +13 -0
  255. package/python-runtime/python/lib/python3.12/LICENSE.txt +279 -0
  256. package/python-runtime/python/lib/python3.12/__future__.py +147 -0
  257. package/python-runtime/python/lib/python3.12/__hello__.py +16 -0
  258. package/python-runtime/python/lib/python3.12/__phello__/__init__.py +7 -0
  259. package/python-runtime/python/lib/python3.12/__phello__/spam.py +7 -0
  260. package/python-runtime/python/lib/python3.12/_aix_support.py +108 -0
  261. package/python-runtime/python/lib/python3.12/_collections_abc.py +1173 -0
  262. package/python-runtime/python/lib/python3.12/_compat_pickle.py +252 -0
  263. package/python-runtime/python/lib/python3.12/_compression.py +162 -0
  264. package/python-runtime/python/lib/python3.12/_markupbase.py +396 -0
  265. package/python-runtime/python/lib/python3.12/_osx_support.py +579 -0
  266. package/python-runtime/python/lib/python3.12/_py_abc.py +147 -0
  267. package/python-runtime/python/lib/python3.12/_pydatetime.py +2643 -0
  268. package/python-runtime/python/lib/python3.12/_pydecimal.py +6339 -0
  269. package/python-runtime/python/lib/python3.12/_pyio.py +2698 -0
  270. package/python-runtime/python/lib/python3.12/_pylong.py +329 -0
  271. package/python-runtime/python/lib/python3.12/_sitebuiltins.py +103 -0
  272. package/python-runtime/python/lib/python3.12/_strptime.py +664 -0
  273. package/python-runtime/python/lib/python3.12/_sysconfigdata__darwin_darwin.py +984 -0
  274. package/python-runtime/python/lib/python3.12/_threading_local.py +242 -0
  275. package/python-runtime/python/lib/python3.12/_weakrefset.py +205 -0
  276. package/python-runtime/python/lib/python3.12/abc.py +188 -0
  277. package/python-runtime/python/lib/python3.12/aifc.py +984 -0
  278. package/python-runtime/python/lib/python3.12/antigravity.py +17 -0
  279. package/python-runtime/python/lib/python3.12/argparse.py +2650 -0
  280. package/python-runtime/python/lib/python3.12/ast.py +1840 -0
  281. package/python-runtime/python/lib/python3.12/asyncio/__init__.py +47 -0
  282. package/python-runtime/python/lib/python3.12/asyncio/__main__.py +128 -0
  283. package/python-runtime/python/lib/python3.12/asyncio/base_events.py +2024 -0
  284. package/python-runtime/python/lib/python3.12/asyncio/base_futures.py +67 -0
  285. package/python-runtime/python/lib/python3.12/asyncio/base_subprocess.py +285 -0
  286. package/python-runtime/python/lib/python3.12/asyncio/base_tasks.py +94 -0
  287. package/python-runtime/python/lib/python3.12/asyncio/constants.py +41 -0
  288. package/python-runtime/python/lib/python3.12/asyncio/coroutines.py +109 -0
  289. package/python-runtime/python/lib/python3.12/asyncio/events.py +868 -0
  290. package/python-runtime/python/lib/python3.12/asyncio/exceptions.py +62 -0
  291. package/python-runtime/python/lib/python3.12/asyncio/format_helpers.py +76 -0
  292. package/python-runtime/python/lib/python3.12/asyncio/futures.py +430 -0
  293. package/python-runtime/python/lib/python3.12/asyncio/locks.py +586 -0
  294. package/python-runtime/python/lib/python3.12/asyncio/log.py +7 -0
  295. package/python-runtime/python/lib/python3.12/asyncio/mixins.py +21 -0
  296. package/python-runtime/python/lib/python3.12/asyncio/proactor_events.py +897 -0
  297. package/python-runtime/python/lib/python3.12/asyncio/protocols.py +216 -0
  298. package/python-runtime/python/lib/python3.12/asyncio/queues.py +244 -0
  299. package/python-runtime/python/lib/python3.12/asyncio/runners.py +216 -0
  300. package/python-runtime/python/lib/python3.12/asyncio/selector_events.py +1324 -0
  301. package/python-runtime/python/lib/python3.12/asyncio/sslproto.py +929 -0
  302. package/python-runtime/python/lib/python3.12/asyncio/staggered.py +174 -0
  303. package/python-runtime/python/lib/python3.12/asyncio/streams.py +770 -0
  304. package/python-runtime/python/lib/python3.12/asyncio/subprocess.py +229 -0
  305. package/python-runtime/python/lib/python3.12/asyncio/taskgroups.py +268 -0
  306. package/python-runtime/python/lib/python3.12/asyncio/tasks.py +1065 -0
  307. package/python-runtime/python/lib/python3.12/asyncio/threads.py +25 -0
  308. package/python-runtime/python/lib/python3.12/asyncio/timeouts.py +168 -0
  309. package/python-runtime/python/lib/python3.12/asyncio/transports.py +335 -0
  310. package/python-runtime/python/lib/python3.12/asyncio/trsock.py +98 -0
  311. package/python-runtime/python/lib/python3.12/asyncio/unix_events.py +1500 -0
  312. package/python-runtime/python/lib/python3.12/asyncio/windows_events.py +901 -0
  313. package/python-runtime/python/lib/python3.12/asyncio/windows_utils.py +173 -0
  314. package/python-runtime/python/lib/python3.12/base64.py +586 -0
  315. package/python-runtime/python/lib/python3.12/bdb.py +920 -0
  316. package/python-runtime/python/lib/python3.12/bisect.py +118 -0
  317. package/python-runtime/python/lib/python3.12/bz2.py +344 -0
  318. package/python-runtime/python/lib/python3.12/cProfile.py +195 -0
  319. package/python-runtime/python/lib/python3.12/calendar.py +808 -0
  320. package/python-runtime/python/lib/python3.12/cgi.py +1014 -0
  321. package/python-runtime/python/lib/python3.12/cgitb.py +332 -0
  322. package/python-runtime/python/lib/python3.12/chunk.py +173 -0
  323. package/python-runtime/python/lib/python3.12/cmd.py +401 -0
  324. package/python-runtime/python/lib/python3.12/code.py +324 -0
  325. package/python-runtime/python/lib/python3.12/codecs.py +1129 -0
  326. package/python-runtime/python/lib/python3.12/codeop.py +161 -0
  327. package/python-runtime/python/lib/python3.12/collections/__init__.py +1592 -0
  328. package/python-runtime/python/lib/python3.12/collections/abc.py +3 -0
  329. package/python-runtime/python/lib/python3.12/colorsys.py +166 -0
  330. package/python-runtime/python/lib/python3.12/compileall.py +469 -0
  331. package/python-runtime/python/lib/python3.12/concurrent/__init__.py +1 -0
  332. package/python-runtime/python/lib/python3.12/concurrent/futures/__init__.py +54 -0
  333. package/python-runtime/python/lib/python3.12/concurrent/futures/_base.py +654 -0
  334. package/python-runtime/python/lib/python3.12/concurrent/futures/process.py +876 -0
  335. package/python-runtime/python/lib/python3.12/concurrent/futures/thread.py +240 -0
  336. package/python-runtime/python/lib/python3.12/configparser.py +1333 -0
  337. package/python-runtime/python/lib/python3.12/contextlib.py +800 -0
  338. package/python-runtime/python/lib/python3.12/contextvars.py +4 -0
  339. package/python-runtime/python/lib/python3.12/copy.py +292 -0
  340. package/python-runtime/python/lib/python3.12/copyreg.py +217 -0
  341. package/python-runtime/python/lib/python3.12/crypt.py +124 -0
  342. package/python-runtime/python/lib/python3.12/csv.py +451 -0
  343. package/python-runtime/python/lib/python3.12/ctypes/__init__.py +582 -0
  344. package/python-runtime/python/lib/python3.12/ctypes/_aix.py +327 -0
  345. package/python-runtime/python/lib/python3.12/ctypes/_endian.py +78 -0
  346. package/python-runtime/python/lib/python3.12/ctypes/macholib/README.ctypes +7 -0
  347. package/python-runtime/python/lib/python3.12/ctypes/macholib/__init__.py +9 -0
  348. package/python-runtime/python/lib/python3.12/ctypes/macholib/dyld.py +165 -0
  349. package/python-runtime/python/lib/python3.12/ctypes/macholib/dylib.py +42 -0
  350. package/python-runtime/python/lib/python3.12/ctypes/macholib/fetch_macholib +2 -0
  351. package/python-runtime/python/lib/python3.12/ctypes/macholib/fetch_macholib.bat +1 -0
  352. package/python-runtime/python/lib/python3.12/ctypes/macholib/framework.py +42 -0
  353. package/python-runtime/python/lib/python3.12/ctypes/util.py +379 -0
  354. package/python-runtime/python/lib/python3.12/ctypes/wintypes.py +202 -0
  355. package/python-runtime/python/lib/python3.12/curses/__init__.py +101 -0
  356. package/python-runtime/python/lib/python3.12/curses/ascii.py +99 -0
  357. package/python-runtime/python/lib/python3.12/curses/has_key.py +192 -0
  358. package/python-runtime/python/lib/python3.12/curses/panel.py +6 -0
  359. package/python-runtime/python/lib/python3.12/curses/textpad.py +204 -0
  360. package/python-runtime/python/lib/python3.12/dataclasses.py +1588 -0
  361. package/python-runtime/python/lib/python3.12/datetime.py +9 -0
  362. package/python-runtime/python/lib/python3.12/dbm/__init__.py +190 -0
  363. package/python-runtime/python/lib/python3.12/dbm/dumb.py +317 -0
  364. package/python-runtime/python/lib/python3.12/dbm/gnu.py +3 -0
  365. package/python-runtime/python/lib/python3.12/dbm/ndbm.py +3 -0
  366. package/python-runtime/python/lib/python3.12/decimal.py +108 -0
  367. package/python-runtime/python/lib/python3.12/difflib.py +2056 -0
  368. package/python-runtime/python/lib/python3.12/dis.py +805 -0
  369. package/python-runtime/python/lib/python3.12/doctest.py +2845 -0
  370. package/python-runtime/python/lib/python3.12/email/__init__.py +61 -0
  371. package/python-runtime/python/lib/python3.12/email/_encoded_words.py +233 -0
  372. package/python-runtime/python/lib/python3.12/email/_header_value_parser.py +3108 -0
  373. package/python-runtime/python/lib/python3.12/email/_parseaddr.py +557 -0
  374. package/python-runtime/python/lib/python3.12/email/_policybase.py +382 -0
  375. package/python-runtime/python/lib/python3.12/email/architecture.rst +216 -0
  376. package/python-runtime/python/lib/python3.12/email/base64mime.py +115 -0
  377. package/python-runtime/python/lib/python3.12/email/charset.py +398 -0
  378. package/python-runtime/python/lib/python3.12/email/contentmanager.py +251 -0
  379. package/python-runtime/python/lib/python3.12/email/encoders.py +65 -0
  380. package/python-runtime/python/lib/python3.12/email/errors.py +117 -0
  381. package/python-runtime/python/lib/python3.12/email/feedparser.py +534 -0
  382. package/python-runtime/python/lib/python3.12/email/generator.py +530 -0
  383. package/python-runtime/python/lib/python3.12/email/header.py +573 -0
  384. package/python-runtime/python/lib/python3.12/email/headerregistry.py +604 -0
  385. package/python-runtime/python/lib/python3.12/email/iterators.py +68 -0
  386. package/python-runtime/python/lib/python3.12/email/message.py +1215 -0
  387. package/python-runtime/python/lib/python3.12/email/mime/__init__.py +0 -0
  388. package/python-runtime/python/lib/python3.12/email/mime/application.py +37 -0
  389. package/python-runtime/python/lib/python3.12/email/mime/audio.py +100 -0
  390. package/python-runtime/python/lib/python3.12/email/mime/base.py +29 -0
  391. package/python-runtime/python/lib/python3.12/email/mime/image.py +152 -0
  392. package/python-runtime/python/lib/python3.12/email/mime/message.py +33 -0
  393. package/python-runtime/python/lib/python3.12/email/mime/multipart.py +47 -0
  394. package/python-runtime/python/lib/python3.12/email/mime/nonmultipart.py +21 -0
  395. package/python-runtime/python/lib/python3.12/email/mime/text.py +40 -0
  396. package/python-runtime/python/lib/python3.12/email/parser.py +127 -0
  397. package/python-runtime/python/lib/python3.12/email/policy.py +232 -0
  398. package/python-runtime/python/lib/python3.12/email/quoprimime.py +300 -0
  399. package/python-runtime/python/lib/python3.12/email/utils.py +486 -0
  400. package/python-runtime/python/lib/python3.12/encodings/__init__.py +174 -0
  401. package/python-runtime/python/lib/python3.12/encodings/aliases.py +551 -0
  402. package/python-runtime/python/lib/python3.12/encodings/ascii.py +50 -0
  403. package/python-runtime/python/lib/python3.12/encodings/base64_codec.py +55 -0
  404. package/python-runtime/python/lib/python3.12/encodings/big5.py +39 -0
  405. package/python-runtime/python/lib/python3.12/encodings/big5hkscs.py +39 -0
  406. package/python-runtime/python/lib/python3.12/encodings/bz2_codec.py +78 -0
  407. package/python-runtime/python/lib/python3.12/encodings/charmap.py +69 -0
  408. package/python-runtime/python/lib/python3.12/encodings/cp037.py +307 -0
  409. package/python-runtime/python/lib/python3.12/encodings/cp1006.py +307 -0
  410. package/python-runtime/python/lib/python3.12/encodings/cp1026.py +307 -0
  411. package/python-runtime/python/lib/python3.12/encodings/cp1125.py +698 -0
  412. package/python-runtime/python/lib/python3.12/encodings/cp1140.py +307 -0
  413. package/python-runtime/python/lib/python3.12/encodings/cp1250.py +307 -0
  414. package/python-runtime/python/lib/python3.12/encodings/cp1251.py +307 -0
  415. package/python-runtime/python/lib/python3.12/encodings/cp1252.py +307 -0
  416. package/python-runtime/python/lib/python3.12/encodings/cp1253.py +307 -0
  417. package/python-runtime/python/lib/python3.12/encodings/cp1254.py +307 -0
  418. package/python-runtime/python/lib/python3.12/encodings/cp1255.py +307 -0
  419. package/python-runtime/python/lib/python3.12/encodings/cp1256.py +307 -0
  420. package/python-runtime/python/lib/python3.12/encodings/cp1257.py +307 -0
  421. package/python-runtime/python/lib/python3.12/encodings/cp1258.py +307 -0
  422. package/python-runtime/python/lib/python3.12/encodings/cp273.py +307 -0
  423. package/python-runtime/python/lib/python3.12/encodings/cp424.py +307 -0
  424. package/python-runtime/python/lib/python3.12/encodings/cp437.py +698 -0
  425. package/python-runtime/python/lib/python3.12/encodings/cp500.py +307 -0
  426. package/python-runtime/python/lib/python3.12/encodings/cp720.py +309 -0
  427. package/python-runtime/python/lib/python3.12/encodings/cp737.py +698 -0
  428. package/python-runtime/python/lib/python3.12/encodings/cp775.py +697 -0
  429. package/python-runtime/python/lib/python3.12/encodings/cp850.py +698 -0
  430. package/python-runtime/python/lib/python3.12/encodings/cp852.py +698 -0
  431. package/python-runtime/python/lib/python3.12/encodings/cp855.py +698 -0
  432. package/python-runtime/python/lib/python3.12/encodings/cp856.py +307 -0
  433. package/python-runtime/python/lib/python3.12/encodings/cp857.py +694 -0
  434. package/python-runtime/python/lib/python3.12/encodings/cp858.py +698 -0
  435. package/python-runtime/python/lib/python3.12/encodings/cp860.py +698 -0
  436. package/python-runtime/python/lib/python3.12/encodings/cp861.py +698 -0
  437. package/python-runtime/python/lib/python3.12/encodings/cp862.py +698 -0
  438. package/python-runtime/python/lib/python3.12/encodings/cp863.py +698 -0
  439. package/python-runtime/python/lib/python3.12/encodings/cp864.py +690 -0
  440. package/python-runtime/python/lib/python3.12/encodings/cp865.py +698 -0
  441. package/python-runtime/python/lib/python3.12/encodings/cp866.py +698 -0
  442. package/python-runtime/python/lib/python3.12/encodings/cp869.py +689 -0
  443. package/python-runtime/python/lib/python3.12/encodings/cp874.py +307 -0
  444. package/python-runtime/python/lib/python3.12/encodings/cp875.py +307 -0
  445. package/python-runtime/python/lib/python3.12/encodings/cp932.py +39 -0
  446. package/python-runtime/python/lib/python3.12/encodings/cp949.py +39 -0
  447. package/python-runtime/python/lib/python3.12/encodings/cp950.py +39 -0
  448. package/python-runtime/python/lib/python3.12/encodings/euc_jis_2004.py +39 -0
  449. package/python-runtime/python/lib/python3.12/encodings/euc_jisx0213.py +39 -0
  450. package/python-runtime/python/lib/python3.12/encodings/euc_jp.py +39 -0
  451. package/python-runtime/python/lib/python3.12/encodings/euc_kr.py +39 -0
  452. package/python-runtime/python/lib/python3.12/encodings/gb18030.py +39 -0
  453. package/python-runtime/python/lib/python3.12/encodings/gb2312.py +39 -0
  454. package/python-runtime/python/lib/python3.12/encodings/gbk.py +39 -0
  455. package/python-runtime/python/lib/python3.12/encodings/hex_codec.py +55 -0
  456. package/python-runtime/python/lib/python3.12/encodings/hp_roman8.py +314 -0
  457. package/python-runtime/python/lib/python3.12/encodings/hz.py +39 -0
  458. package/python-runtime/python/lib/python3.12/encodings/idna.py +317 -0
  459. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp.py +39 -0
  460. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_1.py +39 -0
  461. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_2.py +39 -0
  462. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_2004.py +39 -0
  463. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_3.py +39 -0
  464. package/python-runtime/python/lib/python3.12/encodings/iso2022_jp_ext.py +39 -0
  465. package/python-runtime/python/lib/python3.12/encodings/iso2022_kr.py +39 -0
  466. package/python-runtime/python/lib/python3.12/encodings/iso8859_1.py +307 -0
  467. package/python-runtime/python/lib/python3.12/encodings/iso8859_10.py +307 -0
  468. package/python-runtime/python/lib/python3.12/encodings/iso8859_11.py +307 -0
  469. package/python-runtime/python/lib/python3.12/encodings/iso8859_13.py +307 -0
  470. package/python-runtime/python/lib/python3.12/encodings/iso8859_14.py +307 -0
  471. package/python-runtime/python/lib/python3.12/encodings/iso8859_15.py +307 -0
  472. package/python-runtime/python/lib/python3.12/encodings/iso8859_16.py +307 -0
  473. package/python-runtime/python/lib/python3.12/encodings/iso8859_2.py +307 -0
  474. package/python-runtime/python/lib/python3.12/encodings/iso8859_3.py +307 -0
  475. package/python-runtime/python/lib/python3.12/encodings/iso8859_4.py +307 -0
  476. package/python-runtime/python/lib/python3.12/encodings/iso8859_5.py +307 -0
  477. package/python-runtime/python/lib/python3.12/encodings/iso8859_6.py +307 -0
  478. package/python-runtime/python/lib/python3.12/encodings/iso8859_7.py +307 -0
  479. package/python-runtime/python/lib/python3.12/encodings/iso8859_8.py +307 -0
  480. package/python-runtime/python/lib/python3.12/encodings/iso8859_9.py +307 -0
  481. package/python-runtime/python/lib/python3.12/encodings/johab.py +39 -0
  482. package/python-runtime/python/lib/python3.12/encodings/koi8_r.py +307 -0
  483. package/python-runtime/python/lib/python3.12/encodings/koi8_t.py +308 -0
  484. package/python-runtime/python/lib/python3.12/encodings/koi8_u.py +307 -0
  485. package/python-runtime/python/lib/python3.12/encodings/kz1048.py +307 -0
  486. package/python-runtime/python/lib/python3.12/encodings/latin_1.py +50 -0
  487. package/python-runtime/python/lib/python3.12/encodings/mac_arabic.py +698 -0
  488. package/python-runtime/python/lib/python3.12/encodings/mac_croatian.py +307 -0
  489. package/python-runtime/python/lib/python3.12/encodings/mac_cyrillic.py +307 -0
  490. package/python-runtime/python/lib/python3.12/encodings/mac_farsi.py +307 -0
  491. package/python-runtime/python/lib/python3.12/encodings/mac_greek.py +307 -0
  492. package/python-runtime/python/lib/python3.12/encodings/mac_iceland.py +307 -0
  493. package/python-runtime/python/lib/python3.12/encodings/mac_latin2.py +312 -0
  494. package/python-runtime/python/lib/python3.12/encodings/mac_roman.py +307 -0
  495. package/python-runtime/python/lib/python3.12/encodings/mac_romanian.py +307 -0
  496. package/python-runtime/python/lib/python3.12/encodings/mac_turkish.py +307 -0
  497. package/python-runtime/python/lib/python3.12/encodings/mbcs.py +47 -0
  498. package/python-runtime/python/lib/python3.12/encodings/oem.py +41 -0
  499. package/python-runtime/python/lib/python3.12/encodings/palmos.py +308 -0
  500. package/python-runtime/python/lib/python3.12/encodings/ptcp154.py +312 -0
  501. package/python-runtime/python/lib/python3.12/encodings/punycode.py +237 -0
  502. package/python-runtime/python/lib/python3.12/encodings/quopri_codec.py +56 -0
  503. package/python-runtime/python/lib/python3.12/encodings/raw_unicode_escape.py +46 -0
  504. package/python-runtime/python/lib/python3.12/encodings/rot_13.py +113 -0
  505. package/python-runtime/python/lib/python3.12/encodings/shift_jis.py +39 -0
  506. package/python-runtime/python/lib/python3.12/encodings/shift_jis_2004.py +39 -0
  507. package/python-runtime/python/lib/python3.12/encodings/shift_jisx0213.py +39 -0
  508. package/python-runtime/python/lib/python3.12/encodings/tis_620.py +307 -0
  509. package/python-runtime/python/lib/python3.12/encodings/undefined.py +49 -0
  510. package/python-runtime/python/lib/python3.12/encodings/unicode_escape.py +46 -0
  511. package/python-runtime/python/lib/python3.12/encodings/utf_16.py +155 -0
  512. package/python-runtime/python/lib/python3.12/encodings/utf_16_be.py +42 -0
  513. package/python-runtime/python/lib/python3.12/encodings/utf_16_le.py +42 -0
  514. package/python-runtime/python/lib/python3.12/encodings/utf_32.py +150 -0
  515. package/python-runtime/python/lib/python3.12/encodings/utf_32_be.py +37 -0
  516. package/python-runtime/python/lib/python3.12/encodings/utf_32_le.py +37 -0
  517. package/python-runtime/python/lib/python3.12/encodings/utf_7.py +38 -0
  518. package/python-runtime/python/lib/python3.12/encodings/utf_8.py +42 -0
  519. package/python-runtime/python/lib/python3.12/encodings/utf_8_sig.py +130 -0
  520. package/python-runtime/python/lib/python3.12/encodings/uu_codec.py +103 -0
  521. package/python-runtime/python/lib/python3.12/encodings/zlib_codec.py +77 -0
  522. package/python-runtime/python/lib/python3.12/enum.py +2108 -0
  523. package/python-runtime/python/lib/python3.12/filecmp.py +315 -0
  524. package/python-runtime/python/lib/python3.12/fileinput.py +442 -0
  525. package/python-runtime/python/lib/python3.12/fnmatch.py +185 -0
  526. package/python-runtime/python/lib/python3.12/fractions.py +990 -0
  527. package/python-runtime/python/lib/python3.12/ftplib.py +966 -0
  528. package/python-runtime/python/lib/python3.12/functools.py +1009 -0
  529. package/python-runtime/python/lib/python3.12/genericpath.py +176 -0
  530. package/python-runtime/python/lib/python3.12/getopt.py +215 -0
  531. package/python-runtime/python/lib/python3.12/getpass.py +185 -0
  532. package/python-runtime/python/lib/python3.12/gettext.py +646 -0
  533. package/python-runtime/python/lib/python3.12/glob.py +252 -0
  534. package/python-runtime/python/lib/python3.12/graphlib.py +250 -0
  535. package/python-runtime/python/lib/python3.12/gzip.py +711 -0
  536. package/python-runtime/python/lib/python3.12/hashlib.py +253 -0
  537. package/python-runtime/python/lib/python3.12/heapq.py +603 -0
  538. package/python-runtime/python/lib/python3.12/hmac.py +219 -0
  539. package/python-runtime/python/lib/python3.12/html/__init__.py +132 -0
  540. package/python-runtime/python/lib/python3.12/html/entities.py +2513 -0
  541. package/python-runtime/python/lib/python3.12/html/parser.py +535 -0
  542. package/python-runtime/python/lib/python3.12/http/__init__.py +200 -0
  543. package/python-runtime/python/lib/python3.12/http/client.py +1570 -0
  544. package/python-runtime/python/lib/python3.12/http/cookiejar.py +2121 -0
  545. package/python-runtime/python/lib/python3.12/http/cookies.py +615 -0
  546. package/python-runtime/python/lib/python3.12/http/server.py +1335 -0
  547. package/python-runtime/python/lib/python3.12/imaplib.py +1641 -0
  548. package/python-runtime/python/lib/python3.12/imghdr.py +180 -0
  549. package/python-runtime/python/lib/python3.12/importlib/__init__.py +138 -0
  550. package/python-runtime/python/lib/python3.12/importlib/_abc.py +39 -0
  551. package/python-runtime/python/lib/python3.12/importlib/_bootstrap.py +1551 -0
  552. package/python-runtime/python/lib/python3.12/importlib/_bootstrap_external.py +1749 -0
  553. package/python-runtime/python/lib/python3.12/importlib/abc.py +239 -0
  554. package/python-runtime/python/lib/python3.12/importlib/machinery.py +20 -0
  555. package/python-runtime/python/lib/python3.12/importlib/metadata/__init__.py +966 -0
  556. package/python-runtime/python/lib/python3.12/importlib/metadata/_adapters.py +89 -0
  557. package/python-runtime/python/lib/python3.12/importlib/metadata/_collections.py +30 -0
  558. package/python-runtime/python/lib/python3.12/importlib/metadata/_functools.py +104 -0
  559. package/python-runtime/python/lib/python3.12/importlib/metadata/_itertools.py +73 -0
  560. package/python-runtime/python/lib/python3.12/importlib/metadata/_meta.py +63 -0
  561. package/python-runtime/python/lib/python3.12/importlib/metadata/_text.py +99 -0
  562. package/python-runtime/python/lib/python3.12/importlib/readers.py +12 -0
  563. package/python-runtime/python/lib/python3.12/importlib/resources/__init__.py +38 -0
  564. package/python-runtime/python/lib/python3.12/importlib/resources/_adapters.py +168 -0
  565. package/python-runtime/python/lib/python3.12/importlib/resources/_common.py +208 -0
  566. package/python-runtime/python/lib/python3.12/importlib/resources/_itertools.py +38 -0
  567. package/python-runtime/python/lib/python3.12/importlib/resources/_legacy.py +98 -0
  568. package/python-runtime/python/lib/python3.12/importlib/resources/abc.py +173 -0
  569. package/python-runtime/python/lib/python3.12/importlib/resources/readers.py +146 -0
  570. package/python-runtime/python/lib/python3.12/importlib/resources/simple.py +106 -0
  571. package/python-runtime/python/lib/python3.12/importlib/simple.py +14 -0
  572. package/python-runtime/python/lib/python3.12/importlib/util.py +270 -0
  573. package/python-runtime/python/lib/python3.12/inspect.py +3433 -0
  574. package/python-runtime/python/lib/python3.12/io.py +99 -0
  575. package/python-runtime/python/lib/python3.12/ipaddress.py +2430 -0
  576. package/python-runtime/python/lib/python3.12/json/__init__.py +359 -0
  577. package/python-runtime/python/lib/python3.12/json/decoder.py +357 -0
  578. package/python-runtime/python/lib/python3.12/json/encoder.py +443 -0
  579. package/python-runtime/python/lib/python3.12/json/scanner.py +73 -0
  580. package/python-runtime/python/lib/python3.12/json/tool.py +85 -0
  581. package/python-runtime/python/lib/python3.12/keyword.py +64 -0
  582. package/python-runtime/python/lib/python3.12/lib-dynload/_crypt.cpython-312-darwin.so +0 -0
  583. package/python-runtime/python/lib/python3.12/lib-dynload/_dbm.cpython-312-darwin.so +0 -0
  584. package/python-runtime/python/lib/python3.12/lib-dynload/_tkinter.cpython-312-darwin.so +0 -0
  585. package/python-runtime/python/lib/python3.12/linecache.py +185 -0
  586. package/python-runtime/python/lib/python3.12/locale.py +1779 -0
  587. package/python-runtime/python/lib/python3.12/logging/__init__.py +2345 -0
  588. package/python-runtime/python/lib/python3.12/logging/config.py +1078 -0
  589. package/python-runtime/python/lib/python3.12/logging/handlers.py +1624 -0
  590. package/python-runtime/python/lib/python3.12/lzma.py +356 -0
  591. package/python-runtime/python/lib/python3.12/mailbox.py +2153 -0
  592. package/python-runtime/python/lib/python3.12/mailcap.py +302 -0
  593. package/python-runtime/python/lib/python3.12/mimetypes.py +656 -0
  594. package/python-runtime/python/lib/python3.12/modulefinder.py +666 -0
  595. package/python-runtime/python/lib/python3.12/multiprocessing/__init__.py +37 -0
  596. package/python-runtime/python/lib/python3.12/multiprocessing/connection.py +1178 -0
  597. package/python-runtime/python/lib/python3.12/multiprocessing/context.py +377 -0
  598. package/python-runtime/python/lib/python3.12/multiprocessing/dummy/__init__.py +126 -0
  599. package/python-runtime/python/lib/python3.12/multiprocessing/dummy/connection.py +75 -0
  600. package/python-runtime/python/lib/python3.12/multiprocessing/forkserver.py +350 -0
  601. package/python-runtime/python/lib/python3.12/multiprocessing/heap.py +337 -0
  602. package/python-runtime/python/lib/python3.12/multiprocessing/managers.py +1387 -0
  603. package/python-runtime/python/lib/python3.12/multiprocessing/pool.py +957 -0
  604. package/python-runtime/python/lib/python3.12/multiprocessing/popen_fork.py +83 -0
  605. package/python-runtime/python/lib/python3.12/multiprocessing/popen_forkserver.py +74 -0
  606. package/python-runtime/python/lib/python3.12/multiprocessing/popen_spawn_posix.py +72 -0
  607. package/python-runtime/python/lib/python3.12/multiprocessing/popen_spawn_win32.py +145 -0
  608. package/python-runtime/python/lib/python3.12/multiprocessing/process.py +439 -0
  609. package/python-runtime/python/lib/python3.12/multiprocessing/queues.py +401 -0
  610. package/python-runtime/python/lib/python3.12/multiprocessing/reduction.py +281 -0
  611. package/python-runtime/python/lib/python3.12/multiprocessing/resource_sharer.py +154 -0
  612. package/python-runtime/python/lib/python3.12/multiprocessing/resource_tracker.py +294 -0
  613. package/python-runtime/python/lib/python3.12/multiprocessing/shared_memory.py +534 -0
  614. package/python-runtime/python/lib/python3.12/multiprocessing/sharedctypes.py +240 -0
  615. package/python-runtime/python/lib/python3.12/multiprocessing/spawn.py +307 -0
  616. package/python-runtime/python/lib/python3.12/multiprocessing/synchronize.py +404 -0
  617. package/python-runtime/python/lib/python3.12/multiprocessing/util.py +494 -0
  618. package/python-runtime/python/lib/python3.12/netrc.py +192 -0
  619. package/python-runtime/python/lib/python3.12/nntplib.py +1093 -0
  620. package/python-runtime/python/lib/python3.12/ntpath.py +869 -0
  621. package/python-runtime/python/lib/python3.12/nturl2path.py +69 -0
  622. package/python-runtime/python/lib/python3.12/numbers.py +418 -0
  623. package/python-runtime/python/lib/python3.12/opcode.py +493 -0
  624. package/python-runtime/python/lib/python3.12/operator.py +467 -0
  625. package/python-runtime/python/lib/python3.12/optparse.py +1681 -0
  626. package/python-runtime/python/lib/python3.12/os.py +1159 -0
  627. package/python-runtime/python/lib/python3.12/pathlib.py +1435 -0
  628. package/python-runtime/python/lib/python3.12/pdb.py +1987 -0
  629. package/python-runtime/python/lib/python3.12/pickle.py +1866 -0
  630. package/python-runtime/python/lib/python3.12/pickletools.py +2904 -0
  631. package/python-runtime/python/lib/python3.12/pipes.py +250 -0
  632. package/python-runtime/python/lib/python3.12/pkgutil.py +529 -0
  633. package/python-runtime/python/lib/python3.12/platform.py +1359 -0
  634. package/python-runtime/python/lib/python3.12/plistlib.py +920 -0
  635. package/python-runtime/python/lib/python3.12/poplib.py +478 -0
  636. package/python-runtime/python/lib/python3.12/posixpath.py +577 -0
  637. package/python-runtime/python/lib/python3.12/pprint.py +658 -0
  638. package/python-runtime/python/lib/python3.12/profile.py +615 -0
  639. package/python-runtime/python/lib/python3.12/pstats.py +778 -0
  640. package/python-runtime/python/lib/python3.12/pty.py +211 -0
  641. package/python-runtime/python/lib/python3.12/py_compile.py +212 -0
  642. package/python-runtime/python/lib/python3.12/pyclbr.py +314 -0
  643. package/python-runtime/python/lib/python3.12/pydoc.py +2950 -0
  644. package/python-runtime/python/lib/python3.12/queue.py +326 -0
  645. package/python-runtime/python/lib/python3.12/quopri.py +237 -0
  646. package/python-runtime/python/lib/python3.12/random.py +996 -0
  647. package/python-runtime/python/lib/python3.12/re/__init__.py +385 -0
  648. package/python-runtime/python/lib/python3.12/re/_casefix.py +106 -0
  649. package/python-runtime/python/lib/python3.12/re/_compiler.py +770 -0
  650. package/python-runtime/python/lib/python3.12/re/_constants.py +220 -0
  651. package/python-runtime/python/lib/python3.12/re/_parser.py +1080 -0
  652. package/python-runtime/python/lib/python3.12/reprlib.py +214 -0
  653. package/python-runtime/python/lib/python3.12/rlcompleter.py +219 -0
  654. package/python-runtime/python/lib/python3.12/runpy.py +319 -0
  655. package/python-runtime/python/lib/python3.12/sched.py +167 -0
  656. package/python-runtime/python/lib/python3.12/secrets.py +71 -0
  657. package/python-runtime/python/lib/python3.12/selectors.py +623 -0
  658. package/python-runtime/python/lib/python3.12/shelve.py +243 -0
  659. package/python-runtime/python/lib/python3.12/shlex.py +345 -0
  660. package/python-runtime/python/lib/python3.12/shutil.py +1566 -0
  661. package/python-runtime/python/lib/python3.12/signal.py +94 -0
  662. package/python-runtime/python/lib/python3.12/site-packages/PIL/AvifImagePlugin.py +299 -0
  663. package/python-runtime/python/lib/python3.12/site-packages/PIL/BdfFontFile.py +122 -0
  664. package/python-runtime/python/lib/python3.12/site-packages/PIL/BlpImagePlugin.py +503 -0
  665. package/python-runtime/python/lib/python3.12/site-packages/PIL/BmpImagePlugin.py +526 -0
  666. package/python-runtime/python/lib/python3.12/site-packages/PIL/BufrStubImagePlugin.py +70 -0
  667. package/python-runtime/python/lib/python3.12/site-packages/PIL/ContainerIO.py +177 -0
  668. package/python-runtime/python/lib/python3.12/site-packages/PIL/CurImagePlugin.py +105 -0
  669. package/python-runtime/python/lib/python3.12/site-packages/PIL/DcxImagePlugin.py +88 -0
  670. package/python-runtime/python/lib/python3.12/site-packages/PIL/DdsImagePlugin.py +637 -0
  671. package/python-runtime/python/lib/python3.12/site-packages/PIL/EpsImagePlugin.py +494 -0
  672. package/python-runtime/python/lib/python3.12/site-packages/PIL/ExifTags.py +383 -0
  673. package/python-runtime/python/lib/python3.12/site-packages/PIL/FitsImagePlugin.py +171 -0
  674. package/python-runtime/python/lib/python3.12/site-packages/PIL/FliImagePlugin.py +188 -0
  675. package/python-runtime/python/lib/python3.12/site-packages/PIL/FontFile.py +163 -0
  676. package/python-runtime/python/lib/python3.12/site-packages/PIL/FpxImagePlugin.py +264 -0
  677. package/python-runtime/python/lib/python3.12/site-packages/PIL/FtexImagePlugin.py +119 -0
  678. package/python-runtime/python/lib/python3.12/site-packages/PIL/GbrImagePlugin.py +101 -0
  679. package/python-runtime/python/lib/python3.12/site-packages/PIL/GdImageFile.py +109 -0
  680. package/python-runtime/python/lib/python3.12/site-packages/PIL/GifImagePlugin.py +1152 -0
  681. package/python-runtime/python/lib/python3.12/site-packages/PIL/GimpGradientFile.py +156 -0
  682. package/python-runtime/python/lib/python3.12/site-packages/PIL/GimpPaletteFile.py +77 -0
  683. package/python-runtime/python/lib/python3.12/site-packages/PIL/GribStubImagePlugin.py +70 -0
  684. package/python-runtime/python/lib/python3.12/site-packages/PIL/Hdf5StubImagePlugin.py +70 -0
  685. package/python-runtime/python/lib/python3.12/site-packages/PIL/IcnsImagePlugin.py +406 -0
  686. package/python-runtime/python/lib/python3.12/site-packages/PIL/IcoImagePlugin.py +418 -0
  687. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImImagePlugin.py +401 -0
  688. package/python-runtime/python/lib/python3.12/site-packages/PIL/Image.py +4390 -0
  689. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageChops.py +278 -0
  690. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageCms.py +1069 -0
  691. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageColor.py +321 -0
  692. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageDraw.py +1003 -0
  693. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageDraw2.py +250 -0
  694. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageEnhance.py +112 -0
  695. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageFile.py +944 -0
  696. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageFilter.py +596 -0
  697. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageFont.py +1335 -0
  698. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageGrab.py +229 -0
  699. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageMath.py +314 -0
  700. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageMode.py +85 -0
  701. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageMorph.py +317 -0
  702. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageOps.py +803 -0
  703. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImagePalette.py +314 -0
  704. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImagePath.py +20 -0
  705. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageQt.py +229 -0
  706. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageSequence.py +89 -0
  707. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageShow.py +372 -0
  708. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageStat.py +169 -0
  709. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageText.py +512 -0
  710. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageTk.py +269 -0
  711. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageTransform.py +138 -0
  712. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImageWin.py +247 -0
  713. package/python-runtime/python/lib/python3.12/site-packages/PIL/ImtImagePlugin.py +103 -0
  714. package/python-runtime/python/lib/python3.12/site-packages/PIL/IptcImagePlugin.py +228 -0
  715. package/python-runtime/python/lib/python3.12/site-packages/PIL/Jpeg2KImagePlugin.py +472 -0
  716. package/python-runtime/python/lib/python3.12/site-packages/PIL/JpegImagePlugin.py +913 -0
  717. package/python-runtime/python/lib/python3.12/site-packages/PIL/JpegPresets.py +240 -0
  718. package/python-runtime/python/lib/python3.12/site-packages/PIL/McIdasImagePlugin.py +80 -0
  719. package/python-runtime/python/lib/python3.12/site-packages/PIL/MicImagePlugin.py +105 -0
  720. package/python-runtime/python/lib/python3.12/site-packages/PIL/MpegImagePlugin.py +89 -0
  721. package/python-runtime/python/lib/python3.12/site-packages/PIL/MpoImagePlugin.py +211 -0
  722. package/python-runtime/python/lib/python3.12/site-packages/PIL/MspImagePlugin.py +206 -0
  723. package/python-runtime/python/lib/python3.12/site-packages/PIL/PSDraw.py +249 -0
  724. package/python-runtime/python/lib/python3.12/site-packages/PIL/PaletteFile.py +58 -0
  725. package/python-runtime/python/lib/python3.12/site-packages/PIL/PalmImagePlugin.py +220 -0
  726. package/python-runtime/python/lib/python3.12/site-packages/PIL/PcdImagePlugin.py +68 -0
  727. package/python-runtime/python/lib/python3.12/site-packages/PIL/PcfFontFile.py +258 -0
  728. package/python-runtime/python/lib/python3.12/site-packages/PIL/PcxImagePlugin.py +237 -0
  729. package/python-runtime/python/lib/python3.12/site-packages/PIL/PdfImagePlugin.py +313 -0
  730. package/python-runtime/python/lib/python3.12/site-packages/PIL/PdfParser.py +1129 -0
  731. package/python-runtime/python/lib/python3.12/site-packages/PIL/PixarImagePlugin.py +74 -0
  732. package/python-runtime/python/lib/python3.12/site-packages/PIL/PngImagePlugin.py +1616 -0
  733. package/python-runtime/python/lib/python3.12/site-packages/PIL/PpmImagePlugin.py +380 -0
  734. package/python-runtime/python/lib/python3.12/site-packages/PIL/PsdImagePlugin.py +340 -0
  735. package/python-runtime/python/lib/python3.12/site-packages/PIL/QoiImagePlugin.py +248 -0
  736. package/python-runtime/python/lib/python3.12/site-packages/PIL/SgiImagePlugin.py +236 -0
  737. package/python-runtime/python/lib/python3.12/site-packages/PIL/SpiderImagePlugin.py +329 -0
  738. package/python-runtime/python/lib/python3.12/site-packages/PIL/SunImagePlugin.py +147 -0
  739. package/python-runtime/python/lib/python3.12/site-packages/PIL/TarIO.py +68 -0
  740. package/python-runtime/python/lib/python3.12/site-packages/PIL/TgaImagePlugin.py +295 -0
  741. package/python-runtime/python/lib/python3.12/site-packages/PIL/TiffImagePlugin.py +2410 -0
  742. package/python-runtime/python/lib/python3.12/site-packages/PIL/TiffTags.py +571 -0
  743. package/python-runtime/python/lib/python3.12/site-packages/PIL/WalImageFile.py +134 -0
  744. package/python-runtime/python/lib/python3.12/site-packages/PIL/WebPImagePlugin.py +352 -0
  745. package/python-runtime/python/lib/python3.12/site-packages/PIL/WmfImagePlugin.py +189 -0
  746. package/python-runtime/python/lib/python3.12/site-packages/PIL/XVThumbImagePlugin.py +83 -0
  747. package/python-runtime/python/lib/python3.12/site-packages/PIL/XbmImagePlugin.py +128 -0
  748. package/python-runtime/python/lib/python3.12/site-packages/PIL/XpmImagePlugin.py +175 -0
  749. package/python-runtime/python/lib/python3.12/site-packages/PIL/__init__.py +87 -0
  750. package/python-runtime/python/lib/python3.12/site-packages/PIL/__main__.py +7 -0
  751. package/python-runtime/python/lib/python3.12/site-packages/PIL/_avif.cpython-312-darwin.so +0 -0
  752. package/python-runtime/python/lib/python3.12/site-packages/PIL/_avif.pyi +3 -0
  753. package/python-runtime/python/lib/python3.12/site-packages/PIL/_binary.py +115 -0
  754. package/python-runtime/python/lib/python3.12/site-packages/PIL/_deprecate.py +74 -0
  755. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imaging.cpython-312-darwin.so +0 -0
  756. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imaging.pyi +31 -0
  757. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingcms.cpython-312-darwin.so +0 -0
  758. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingcms.pyi +143 -0
  759. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingft.cpython-312-darwin.so +0 -0
  760. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingft.pyi +70 -0
  761. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmath.cpython-312-darwin.so +0 -0
  762. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmath.pyi +3 -0
  763. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmorph.cpython-312-darwin.so +0 -0
  764. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingmorph.pyi +3 -0
  765. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingtk.cpython-312-darwin.so +0 -0
  766. package/python-runtime/python/lib/python3.12/site-packages/PIL/_imagingtk.pyi +3 -0
  767. package/python-runtime/python/lib/python3.12/site-packages/PIL/_tkinter_finder.py +20 -0
  768. package/python-runtime/python/lib/python3.12/site-packages/PIL/_typing.py +46 -0
  769. package/python-runtime/python/lib/python3.12/site-packages/PIL/_util.py +29 -0
  770. package/python-runtime/python/lib/python3.12/site-packages/PIL/_version.py +4 -0
  771. package/python-runtime/python/lib/python3.12/site-packages/PIL/_webp.cpython-312-darwin.so +0 -0
  772. package/python-runtime/python/lib/python3.12/site-packages/PIL/_webp.pyi +3 -0
  773. package/python-runtime/python/lib/python3.12/site-packages/PIL/features.py +347 -0
  774. package/python-runtime/python/lib/python3.12/site-packages/PIL/py.typed +0 -0
  775. package/python-runtime/python/lib/python3.12/site-packages/PIL/report.py +5 -0
  776. package/python-runtime/python/lib/python3.12/site-packages/README.txt +2 -0
  777. package/python-runtime/python/lib/python3.12/site-packages/_cffi_backend.cpython-312-darwin.so +0 -0
  778. package/python-runtime/python/lib/python3.12/site-packages/acp/__init__.py +247 -0
  779. package/python-runtime/python/lib/python3.12/site-packages/acp/_cookies.py +53 -0
  780. package/python-runtime/python/lib/python3.12/site-packages/acp/_deserialize.py +62 -0
  781. package/python-runtime/python/lib/python3.12/site-packages/acp/_jsonrpc.py +28 -0
  782. package/python-runtime/python/lib/python3.12/site-packages/acp/_protocol_adapters.py +72 -0
  783. package/python-runtime/python/lib/python3.12/site-packages/acp/_schema_base.py +79 -0
  784. package/python-runtime/python/lib/python3.12/site-packages/acp/_sse.py +98 -0
  785. package/python-runtime/python/lib/python3.12/site-packages/acp/_transport.py +145 -0
  786. package/python-runtime/python/lib/python3.12/site-packages/acp/agent/__init__.py +3 -0
  787. package/python-runtime/python/lib/python3.12/site-packages/acp/agent/connection.py +367 -0
  788. package/python-runtime/python/lib/python3.12/site-packages/acp/agent/router.py +10 -0
  789. package/python-runtime/python/lib/python3.12/site-packages/acp/client/__init__.py +3 -0
  790. package/python-runtime/python/lib/python3.12/site-packages/acp/client/connection.py +626 -0
  791. package/python-runtime/python/lib/python3.12/site-packages/acp/client/router.py +10 -0
  792. package/python-runtime/python/lib/python3.12/site-packages/acp/connection.py +344 -0
  793. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/__init__.py +27 -0
  794. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/permissions.py +105 -0
  795. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/session_state.py +274 -0
  796. package/python-runtime/python/lib/python3.12/site-packages/acp/contrib/tool_calls.py +290 -0
  797. package/python-runtime/python/lib/python3.12/site-packages/acp/core.py +111 -0
  798. package/python-runtime/python/lib/python3.12/site-packages/acp/exceptions.py +50 -0
  799. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/__init__.py +13 -0
  800. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/negotiation.py +214 -0
  801. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/__init__.py +18 -0
  802. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_connection.py +24 -0
  803. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_initialization.py +67 -0
  804. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_methods.py +58 -0
  805. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_params.py +65 -0
  806. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_router.py +74 -0
  807. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/_schema_base.py +60 -0
  808. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/agent.py +287 -0
  809. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/client.py +463 -0
  810. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/interfaces.py +314 -0
  811. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/meta.py +41 -0
  812. package/python-runtime/python/lib/python3.12/site-packages/acp/experimental/v2/schema.py +6018 -0
  813. package/python-runtime/python/lib/python3.12/site-packages/acp/http/__init__.py +30 -0
  814. package/python-runtime/python/lib/python3.12/site-packages/acp/http/asgi.py +97 -0
  815. package/python-runtime/python/lib/python3.12/site-packages/acp/http/client.py +266 -0
  816. package/python-runtime/python/lib/python3.12/site-packages/acp/http/protocol.py +115 -0
  817. package/python-runtime/python/lib/python3.12/site-packages/acp/http/server.py +374 -0
  818. package/python-runtime/python/lib/python3.12/site-packages/acp/interfaces.py +468 -0
  819. package/python-runtime/python/lib/python3.12/site-packages/acp/meta.py +50 -0
  820. package/python-runtime/python/lib/python3.12/site-packages/acp/py.typed +1 -0
  821. package/python-runtime/python/lib/python3.12/site-packages/acp/router.py +239 -0
  822. package/python-runtime/python/lib/python3.12/site-packages/acp/schema.py +5846 -0
  823. package/python-runtime/python/lib/python3.12/site-packages/acp/stdio.py +208 -0
  824. package/python-runtime/python/lib/python3.12/site-packages/acp/task/__init__.py +4 -0
  825. package/python-runtime/python/lib/python3.12/site-packages/acp/task/sender.py +63 -0
  826. package/python-runtime/python/lib/python3.12/site-packages/acp/task/supervisor.py +80 -0
  827. package/python-runtime/python/lib/python3.12/site-packages/acp/telemetry.py +41 -0
  828. package/python-runtime/python/lib/python3.12/site-packages/acp/transports.py +112 -0
  829. package/python-runtime/python/lib/python3.12/site-packages/acp/utils.py +265 -0
  830. package/python-runtime/python/lib/python3.12/site-packages/acp/ws/__init__.py +23 -0
  831. package/python-runtime/python/lib/python3.12/site-packages/acp/ws/client.py +124 -0
  832. package/python-runtime/python/lib/python3.12/site-packages/acp/ws/server.py +75 -0
  833. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/__init__.py +0 -0
  834. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/_generated/__init__.py +9 -0
  835. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/_generated/models.py +2825 -0
  836. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/_generated/version.py +12 -0
  837. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/__init__.py +242 -0
  838. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/capabilities.py +64 -0
  839. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/deprecated.py +46 -0
  840. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/events.py +131 -0
  841. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/token_usage.py +210 -0
  842. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/types.py +162 -0
  843. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/core/version.py +38 -0
  844. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/encoder/__init__.py +7 -0
  845. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/encoder/encoder.py +36 -0
  846. package/python-runtime/python/lib/python3.12/site-packages/ag_ui/py.typed +0 -0
  847. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/INSTALLER +1 -0
  848. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/METADATA +114 -0
  849. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/RECORD +32 -0
  850. package/python-runtime/python/lib/python3.12/site-packages/ag_ui_protocol-1.0.0.dist-info/WHEEL +4 -0
  851. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/INSTALLER +1 -0
  852. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/METADATA +106 -0
  853. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/RECORD +115 -0
  854. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/WHEEL +4 -0
  855. package/python-runtime/python/lib/python3.12/site-packages/agent_client_protocol-1.0.0.dist-info/entry_points.txt +4 -0
  856. package/python-runtime/python/lib/python3.12/site-packages/annotated_types/__init__.py +416 -0
  857. package/python-runtime/python/lib/python3.12/site-packages/annotated_types/py.typed +0 -0
  858. package/python-runtime/python/lib/python3.12/site-packages/annotated_types/test_cases.py +146 -0
  859. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/INSTALLER +1 -0
  860. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/METADATA +295 -0
  861. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/RECORD +10 -0
  862. package/python-runtime/python/lib/python3.12/site-packages/annotated_types-0.8.0.dist-info/WHEEL +4 -0
  863. package/python-runtime/python/lib/python3.12/site-packages/anyio/__init__.py +154 -0
  864. package/python-runtime/python/lib/python3.12/site-packages/anyio/_backends/__init__.py +0 -0
  865. package/python-runtime/python/lib/python3.12/site-packages/anyio/_backends/_asyncio.py +3300 -0
  866. package/python-runtime/python/lib/python3.12/site-packages/anyio/_backends/_trio.py +1489 -0
  867. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/__init__.py +0 -0
  868. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_asyncio_selector_thread.py +167 -0
  869. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_concurrency_utils.py +156 -0
  870. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_contextmanagers.py +200 -0
  871. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_eventloop.py +244 -0
  872. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_exceptions.py +205 -0
  873. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_fileio.py +1047 -0
  874. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_futures.py +191 -0
  875. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_resources.py +18 -0
  876. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_signals.py +29 -0
  877. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_sockets.py +1032 -0
  878. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_streams.py +52 -0
  879. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_subprocesses.py +196 -0
  880. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_synchronization.py +780 -0
  881. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_tasks.py +464 -0
  882. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_tempfile.py +623 -0
  883. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_testing.py +82 -0
  884. package/python-runtime/python/lib/python3.12/site-packages/anyio/_core/_typedattr.py +90 -0
  885. package/python-runtime/python/lib/python3.12/site-packages/anyio/_lazyimport.py +176 -0
  886. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/__init__.py +63 -0
  887. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_eventloop.py +443 -0
  888. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_resources.py +39 -0
  889. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_sockets.py +401 -0
  890. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_streams.py +237 -0
  891. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_subprocesses.py +82 -0
  892. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_tasks.py +223 -0
  893. package/python-runtime/python/lib/python3.12/site-packages/anyio/abc/_testing.py +79 -0
  894. package/python-runtime/python/lib/python3.12/site-packages/anyio/from_thread.py +689 -0
  895. package/python-runtime/python/lib/python3.12/site-packages/anyio/functools.py +400 -0
  896. package/python-runtime/python/lib/python3.12/site-packages/anyio/itertools.py +632 -0
  897. package/python-runtime/python/lib/python3.12/site-packages/anyio/lowlevel.py +228 -0
  898. package/python-runtime/python/lib/python3.12/site-packages/anyio/py.typed +0 -0
  899. package/python-runtime/python/lib/python3.12/site-packages/anyio/pytest_plugin.py +408 -0
  900. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/__init__.py +0 -0
  901. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/buffered.py +212 -0
  902. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/file.py +162 -0
  903. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/memory.py +365 -0
  904. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/stapled.py +160 -0
  905. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/text.py +189 -0
  906. package/python-runtime/python/lib/python3.12/site-packages/anyio/streams/tls.py +450 -0
  907. package/python-runtime/python/lib/python3.12/site-packages/anyio/to_interpreter.py +246 -0
  908. package/python-runtime/python/lib/python3.12/site-packages/anyio/to_process.py +269 -0
  909. package/python-runtime/python/lib/python3.12/site-packages/anyio/to_thread.py +80 -0
  910. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/INSTALLER +1 -0
  911. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/METADATA +108 -0
  912. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/RECORD +100 -0
  913. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/WHEEL +5 -0
  914. package/python-runtime/python/lib/python3.12/site-packages/anyio-4.16.0.dist-info/entry_points.txt +2 -0
  915. package/python-runtime/python/lib/python3.12/site-packages/attr/__init__.py +104 -0
  916. package/python-runtime/python/lib/python3.12/site-packages/attr/__init__.pyi +389 -0
  917. package/python-runtime/python/lib/python3.12/site-packages/attr/_cmp.py +160 -0
  918. package/python-runtime/python/lib/python3.12/site-packages/attr/_cmp.pyi +13 -0
  919. package/python-runtime/python/lib/python3.12/site-packages/attr/_compat.py +99 -0
  920. package/python-runtime/python/lib/python3.12/site-packages/attr/_config.py +31 -0
  921. package/python-runtime/python/lib/python3.12/site-packages/attr/_funcs.py +497 -0
  922. package/python-runtime/python/lib/python3.12/site-packages/attr/_make.py +3406 -0
  923. package/python-runtime/python/lib/python3.12/site-packages/attr/_next_gen.py +674 -0
  924. package/python-runtime/python/lib/python3.12/site-packages/attr/_typing_compat.pyi +15 -0
  925. package/python-runtime/python/lib/python3.12/site-packages/attr/_version_info.py +89 -0
  926. package/python-runtime/python/lib/python3.12/site-packages/attr/_version_info.pyi +9 -0
  927. package/python-runtime/python/lib/python3.12/site-packages/attr/converters.py +162 -0
  928. package/python-runtime/python/lib/python3.12/site-packages/attr/converters.pyi +19 -0
  929. package/python-runtime/python/lib/python3.12/site-packages/attr/exceptions.py +95 -0
  930. package/python-runtime/python/lib/python3.12/site-packages/attr/exceptions.pyi +17 -0
  931. package/python-runtime/python/lib/python3.12/site-packages/attr/filters.py +72 -0
  932. package/python-runtime/python/lib/python3.12/site-packages/attr/filters.pyi +6 -0
  933. package/python-runtime/python/lib/python3.12/site-packages/attr/py.typed +0 -0
  934. package/python-runtime/python/lib/python3.12/site-packages/attr/setters.py +79 -0
  935. package/python-runtime/python/lib/python3.12/site-packages/attr/setters.pyi +20 -0
  936. package/python-runtime/python/lib/python3.12/site-packages/attr/validators.py +750 -0
  937. package/python-runtime/python/lib/python3.12/site-packages/attr/validators.pyi +140 -0
  938. package/python-runtime/python/lib/python3.12/site-packages/attrs/__init__.py +72 -0
  939. package/python-runtime/python/lib/python3.12/site-packages/attrs/__init__.pyi +314 -0
  940. package/python-runtime/python/lib/python3.12/site-packages/attrs/converters.py +3 -0
  941. package/python-runtime/python/lib/python3.12/site-packages/attrs/exceptions.py +3 -0
  942. package/python-runtime/python/lib/python3.12/site-packages/attrs/filters.py +3 -0
  943. package/python-runtime/python/lib/python3.12/site-packages/attrs/py.typed +0 -0
  944. package/python-runtime/python/lib/python3.12/site-packages/attrs/setters.py +3 -0
  945. package/python-runtime/python/lib/python3.12/site-packages/attrs/validators.py +3 -0
  946. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/INSTALLER +1 -0
  947. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/METADATA +199 -0
  948. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/RECORD +55 -0
  949. package/python-runtime/python/lib/python3.12/site-packages/attrs-26.1.0.dist-info/WHEEL +4 -0
  950. package/python-runtime/python/lib/python3.12/site-packages/certifi/__init__.py +4 -0
  951. package/python-runtime/python/lib/python3.12/site-packages/certifi/__main__.py +12 -0
  952. package/python-runtime/python/lib/python3.12/site-packages/certifi/cacert.pem +3885 -0
  953. package/python-runtime/python/lib/python3.12/site-packages/certifi/core.py +83 -0
  954. package/python-runtime/python/lib/python3.12/site-packages/certifi/py.typed +0 -0
  955. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/INSTALLER +1 -0
  956. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/METADATA +79 -0
  957. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/RECORD +18 -0
  958. package/python-runtime/python/lib/python3.12/site-packages/certifi-2026.10.23.dist-info/WHEEL +5 -0
  959. package/python-runtime/python/lib/python3.12/site-packages/cffi/__init__.py +14 -0
  960. package/python-runtime/python/lib/python3.12/site-packages/cffi/_cffi_errors.h +135 -0
  961. package/python-runtime/python/lib/python3.12/site-packages/cffi/_cffi_gen_src.py +216 -0
  962. package/python-runtime/python/lib/python3.12/site-packages/cffi/_cffi_include.h +397 -0
  963. package/python-runtime/python/lib/python3.12/site-packages/cffi/_embedding.h +512 -0
  964. package/python-runtime/python/lib/python3.12/site-packages/cffi/_imp_emulation.py +83 -0
  965. package/python-runtime/python/lib/python3.12/site-packages/cffi/_shimmed_dist_utils.py +45 -0
  966. package/python-runtime/python/lib/python3.12/site-packages/cffi/api.py +960 -0
  967. package/python-runtime/python/lib/python3.12/site-packages/cffi/backend_ctypes.py +1120 -0
  968. package/python-runtime/python/lib/python3.12/site-packages/cffi/cffi_opcode.py +187 -0
  969. package/python-runtime/python/lib/python3.12/site-packages/cffi/commontypes.py +82 -0
  970. package/python-runtime/python/lib/python3.12/site-packages/cffi/cparser.py +1014 -0
  971. package/python-runtime/python/lib/python3.12/site-packages/cffi/error.py +31 -0
  972. package/python-runtime/python/lib/python3.12/site-packages/cffi/ffiplatform.py +113 -0
  973. package/python-runtime/python/lib/python3.12/site-packages/cffi/gen_src.py +5 -0
  974. package/python-runtime/python/lib/python3.12/site-packages/cffi/lock.py +30 -0
  975. package/python-runtime/python/lib/python3.12/site-packages/cffi/model.py +617 -0
  976. package/python-runtime/python/lib/python3.12/site-packages/cffi/parse_c_type.h +181 -0
  977. package/python-runtime/python/lib/python3.12/site-packages/cffi/pkgconfig.py +121 -0
  978. package/python-runtime/python/lib/python3.12/site-packages/cffi/recompiler.py +1586 -0
  979. package/python-runtime/python/lib/python3.12/site-packages/cffi/setuptools_ext.py +231 -0
  980. package/python-runtime/python/lib/python3.12/site-packages/cffi/vengine_cpy.py +1058 -0
  981. package/python-runtime/python/lib/python3.12/site-packages/cffi/vengine_gen.py +679 -0
  982. package/python-runtime/python/lib/python3.12/site-packages/cffi/verifier.py +306 -0
  983. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/INSTALLER +1 -0
  984. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/METADATA +67 -0
  985. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/RECORD +53 -0
  986. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/WHEEL +6 -0
  987. package/python-runtime/python/lib/python3.12/site-packages/cffi-2.1.1.dist-info/entry_points.txt +5 -0
  988. package/python-runtime/python/lib/python3.12/site-packages/click/__init__.py +144 -0
  989. package/python-runtime/python/lib/python3.12/site-packages/click/_compat.py +590 -0
  990. package/python-runtime/python/lib/python3.12/site-packages/click/_termui_impl.py +970 -0
  991. package/python-runtime/python/lib/python3.12/site-packages/click/_textwrap.py +188 -0
  992. package/python-runtime/python/lib/python3.12/site-packages/click/_utils.py +45 -0
  993. package/python-runtime/python/lib/python3.12/site-packages/click/_winconsole.py +292 -0
  994. package/python-runtime/python/lib/python3.12/site-packages/click/core.py +3825 -0
  995. package/python-runtime/python/lib/python3.12/site-packages/click/decorators.py +625 -0
  996. package/python-runtime/python/lib/python3.12/site-packages/click/exceptions.py +378 -0
  997. package/python-runtime/python/lib/python3.12/site-packages/click/formatting.py +320 -0
  998. package/python-runtime/python/lib/python3.12/site-packages/click/globals.py +67 -0
  999. package/python-runtime/python/lib/python3.12/site-packages/click/parser.py +533 -0
  1000. package/python-runtime/python/lib/python3.12/site-packages/click/py.typed +0 -0
  1001. package/python-runtime/python/lib/python3.12/site-packages/click/shell_completion.py +796 -0
  1002. package/python-runtime/python/lib/python3.12/site-packages/click/termui.py +1024 -0
  1003. package/python-runtime/python/lib/python3.12/site-packages/click/testing.py +796 -0
  1004. package/python-runtime/python/lib/python3.12/site-packages/click/types.py +1437 -0
  1005. package/python-runtime/python/lib/python3.12/site-packages/click/utils.py +676 -0
  1006. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/INSTALLER +1 -0
  1007. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/METADATA +83 -0
  1008. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/RECORD +40 -0
  1009. package/python-runtime/python/lib/python3.12/site-packages/click-8.5.1.dist-info/WHEEL +4 -0
  1010. package/python-runtime/python/lib/python3.12/site-packages/cryptography/__about__.py +17 -0
  1011. package/python-runtime/python/lib/python3.12/site-packages/cryptography/__init__.py +13 -0
  1012. package/python-runtime/python/lib/python3.12/site-packages/cryptography/cobblestone.py +21 -0
  1013. package/python-runtime/python/lib/python3.12/site-packages/cryptography/exceptions.py +52 -0
  1014. package/python-runtime/python/lib/python3.12/site-packages/cryptography/fernet.py +240 -0
  1015. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/__init__.py +13 -0
  1016. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/_oid.py +373 -0
  1017. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/asn1/__init__.py +47 -0
  1018. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/asn1/asn1.py +533 -0
  1019. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/backends/__init__.py +13 -0
  1020. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/backends/openssl/__init__.py +9 -0
  1021. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/backends/openssl/backend.py +309 -0
  1022. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/__init__.py +5 -0
  1023. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/__init__.pyi +67 -0
  1024. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/_openssl.pyi +8 -0
  1025. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/asn1.pyi +7 -0
  1026. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/cobblestone.pyi +33 -0
  1027. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/declarative_asn1.pyi +133 -0
  1028. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/exceptions.pyi +17 -0
  1029. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/ocsp.pyi +117 -0
  1030. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/__init__.pyi +82 -0
  1031. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/aead.pyi +189 -0
  1032. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ciphers.pyi +38 -0
  1033. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/cmac.pyi +18 -0
  1034. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/dh.pyi +51 -0
  1035. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/dsa.pyi +41 -0
  1036. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ec.pyi +52 -0
  1037. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed25519.pyi +13 -0
  1038. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/ed448.pyi +13 -0
  1039. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hashes.pyi +30 -0
  1040. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hmac.pyi +22 -0
  1041. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/hpke.pyi +109 -0
  1042. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/kdf.pyi +205 -0
  1043. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/keys.pyi +34 -0
  1044. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/keywrap.pyi +28 -0
  1045. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/mldsa.pyi +35 -0
  1046. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/mlkem.pyi +18 -0
  1047. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/poly1305.pyi +15 -0
  1048. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/rsa.pyi +55 -0
  1049. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/x25519.pyi +13 -0
  1050. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/openssl/x448.pyi +13 -0
  1051. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/pkcs12.pyi +52 -0
  1052. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/pkcs7.pyi +50 -0
  1053. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/test_support.pyi +23 -0
  1054. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust/x509.pyi +313 -0
  1055. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/_rust.abi3.so +0 -0
  1056. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/__init__.py +5 -0
  1057. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/_conditional.py +199 -0
  1058. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/bindings/openssl/binding.py +107 -0
  1059. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/__init__.py +5 -0
  1060. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/__init__.py +5 -0
  1061. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/algorithms.py +145 -0
  1062. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/decrepit/ciphers/modes.py +53 -0
  1063. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/__init__.py +5 -0
  1064. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_asymmetric.py +19 -0
  1065. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_cipheralgorithm.py +60 -0
  1066. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_modes.py +105 -0
  1067. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/_serialization.py +136 -0
  1068. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/__init__.py +5 -0
  1069. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/dh.py +253 -0
  1070. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py +179 -0
  1071. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ec.py +369 -0
  1072. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed25519.py +116 -0
  1073. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py +143 -0
  1074. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/mldsa.py +505 -0
  1075. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/mlkem.py +278 -0
  1076. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/padding.py +141 -0
  1077. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py +295 -0
  1078. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/types.py +94 -0
  1079. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/utils.py +28 -0
  1080. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py +134 -0
  1081. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/asymmetric/x448.py +137 -0
  1082. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/__init__.py +27 -0
  1083. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/aead.py +23 -0
  1084. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/algorithms.py +138 -0
  1085. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/base.py +146 -0
  1086. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/ciphers/modes.py +192 -0
  1087. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/cmac.py +10 -0
  1088. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/constant_time.py +14 -0
  1089. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hashes.py +357 -0
  1090. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hmac.py +13 -0
  1091. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/hpke.py +27 -0
  1092. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/__init__.py +32 -0
  1093. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/argon2.py +17 -0
  1094. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/concatkdf.py +16 -0
  1095. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/hkdf.py +16 -0
  1096. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/kbkdf.py +26 -0
  1097. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/pbkdf2.py +13 -0
  1098. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/scrypt.py +19 -0
  1099. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/kdf/x963kdf.py +13 -0
  1100. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/keywrap.py +25 -0
  1101. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/padding.py +69 -0
  1102. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/poly1305.py +11 -0
  1103. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/__init__.py +85 -0
  1104. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/base.py +16 -0
  1105. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs12.py +176 -0
  1106. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/pkcs7.py +412 -0
  1107. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/serialization/ssh.py +1615 -0
  1108. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/__init__.py +9 -0
  1109. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/hotp.py +101 -0
  1110. package/python-runtime/python/lib/python3.12/site-packages/cryptography/hazmat/primitives/twofactor/totp.py +56 -0
  1111. package/python-runtime/python/lib/python3.12/site-packages/cryptography/py.typed +0 -0
  1112. package/python-runtime/python/lib/python3.12/site-packages/cryptography/utils.py +136 -0
  1113. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/__init__.py +270 -0
  1114. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/base.py +834 -0
  1115. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/certificate_transparency.py +35 -0
  1116. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/extensions.py +2533 -0
  1117. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/general_name.py +281 -0
  1118. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/name.py +489 -0
  1119. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/ocsp.py +379 -0
  1120. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/oid.py +37 -0
  1121. package/python-runtime/python/lib/python3.12/site-packages/cryptography/x509/verification.py +34 -0
  1122. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/INSTALLER +1 -0
  1123. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/METADATA +111 -0
  1124. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/RECORD +199 -0
  1125. package/python-runtime/python/lib/python3.12/site-packages/cryptography-50.0.2.dist-info/WHEEL +4 -0
  1126. package/python-runtime/python/lib/python3.12/site-packages/dotenv/__init__.py +51 -0
  1127. package/python-runtime/python/lib/python3.12/site-packages/dotenv/__main__.py +6 -0
  1128. package/python-runtime/python/lib/python3.12/site-packages/dotenv/cli.py +246 -0
  1129. package/python-runtime/python/lib/python3.12/site-packages/dotenv/ipython.py +50 -0
  1130. package/python-runtime/python/lib/python3.12/site-packages/dotenv/main.py +487 -0
  1131. package/python-runtime/python/lib/python3.12/site-packages/dotenv/parser.py +191 -0
  1132. package/python-runtime/python/lib/python3.12/site-packages/dotenv/py.typed +1 -0
  1133. package/python-runtime/python/lib/python3.12/site-packages/dotenv/variables.py +86 -0
  1134. package/python-runtime/python/lib/python3.12/site-packages/dotenv/version.py +1 -0
  1135. package/python-runtime/python/lib/python3.12/site-packages/h11/__init__.py +62 -0
  1136. package/python-runtime/python/lib/python3.12/site-packages/h11/_abnf.py +132 -0
  1137. package/python-runtime/python/lib/python3.12/site-packages/h11/_connection.py +659 -0
  1138. package/python-runtime/python/lib/python3.12/site-packages/h11/_events.py +369 -0
  1139. package/python-runtime/python/lib/python3.12/site-packages/h11/_headers.py +282 -0
  1140. package/python-runtime/python/lib/python3.12/site-packages/h11/_readers.py +250 -0
  1141. package/python-runtime/python/lib/python3.12/site-packages/h11/_receivebuffer.py +153 -0
  1142. package/python-runtime/python/lib/python3.12/site-packages/h11/_state.py +365 -0
  1143. package/python-runtime/python/lib/python3.12/site-packages/h11/_util.py +135 -0
  1144. package/python-runtime/python/lib/python3.12/site-packages/h11/_version.py +16 -0
  1145. package/python-runtime/python/lib/python3.12/site-packages/h11/_writers.py +145 -0
  1146. package/python-runtime/python/lib/python3.12/site-packages/h11/py.typed +1 -0
  1147. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/INSTALLER +1 -0
  1148. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/METADATA +202 -0
  1149. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/RECORD +29 -0
  1150. package/python-runtime/python/lib/python3.12/site-packages/h11-0.16.0.dist-info/WHEEL +5 -0
  1151. package/python-runtime/python/lib/python3.12/site-packages/httpcore/__init__.py +141 -0
  1152. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_api.py +94 -0
  1153. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/__init__.py +39 -0
  1154. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/connection.py +222 -0
  1155. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/connection_pool.py +420 -0
  1156. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/http11.py +379 -0
  1157. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/http2.py +592 -0
  1158. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/http_proxy.py +367 -0
  1159. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/interfaces.py +137 -0
  1160. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_async/socks_proxy.py +341 -0
  1161. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/__init__.py +0 -0
  1162. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/anyio.py +146 -0
  1163. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/auto.py +52 -0
  1164. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/base.py +101 -0
  1165. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/mock.py +143 -0
  1166. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/sync.py +241 -0
  1167. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_backends/trio.py +159 -0
  1168. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_exceptions.py +81 -0
  1169. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_models.py +516 -0
  1170. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_ssl.py +9 -0
  1171. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/__init__.py +39 -0
  1172. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/connection.py +222 -0
  1173. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/connection_pool.py +420 -0
  1174. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/http11.py +379 -0
  1175. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/http2.py +592 -0
  1176. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/http_proxy.py +367 -0
  1177. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/interfaces.py +137 -0
  1178. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_sync/socks_proxy.py +341 -0
  1179. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_synchronization.py +318 -0
  1180. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_trace.py +107 -0
  1181. package/python-runtime/python/lib/python3.12/site-packages/httpcore/_utils.py +37 -0
  1182. package/python-runtime/python/lib/python3.12/site-packages/httpcore/py.typed +0 -0
  1183. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/INSTALLER +1 -0
  1184. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/METADATA +625 -0
  1185. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/RECORD +68 -0
  1186. package/python-runtime/python/lib/python3.12/site-packages/httpcore-1.0.9.dist-info/WHEEL +4 -0
  1187. package/python-runtime/python/lib/python3.12/site-packages/httpx/__init__.py +105 -0
  1188. package/python-runtime/python/lib/python3.12/site-packages/httpx/__version__.py +3 -0
  1189. package/python-runtime/python/lib/python3.12/site-packages/httpx/_api.py +438 -0
  1190. package/python-runtime/python/lib/python3.12/site-packages/httpx/_auth.py +348 -0
  1191. package/python-runtime/python/lib/python3.12/site-packages/httpx/_client.py +2019 -0
  1192. package/python-runtime/python/lib/python3.12/site-packages/httpx/_config.py +248 -0
  1193. package/python-runtime/python/lib/python3.12/site-packages/httpx/_content.py +240 -0
  1194. package/python-runtime/python/lib/python3.12/site-packages/httpx/_decoders.py +393 -0
  1195. package/python-runtime/python/lib/python3.12/site-packages/httpx/_exceptions.py +379 -0
  1196. package/python-runtime/python/lib/python3.12/site-packages/httpx/_main.py +506 -0
  1197. package/python-runtime/python/lib/python3.12/site-packages/httpx/_models.py +1277 -0
  1198. package/python-runtime/python/lib/python3.12/site-packages/httpx/_multipart.py +300 -0
  1199. package/python-runtime/python/lib/python3.12/site-packages/httpx/_status_codes.py +162 -0
  1200. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/__init__.py +15 -0
  1201. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/asgi.py +187 -0
  1202. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/base.py +86 -0
  1203. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/default.py +406 -0
  1204. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/mock.py +43 -0
  1205. package/python-runtime/python/lib/python3.12/site-packages/httpx/_transports/wsgi.py +149 -0
  1206. package/python-runtime/python/lib/python3.12/site-packages/httpx/_types.py +114 -0
  1207. package/python-runtime/python/lib/python3.12/site-packages/httpx/_urlparse.py +527 -0
  1208. package/python-runtime/python/lib/python3.12/site-packages/httpx/_urls.py +641 -0
  1209. package/python-runtime/python/lib/python3.12/site-packages/httpx/_utils.py +242 -0
  1210. package/python-runtime/python/lib/python3.12/site-packages/httpx/py.typed +0 -0
  1211. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/INSTALLER +1 -0
  1212. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/METADATA +203 -0
  1213. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/RECORD +54 -0
  1214. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/WHEEL +4 -0
  1215. package/python-runtime/python/lib/python3.12/site-packages/httpx-0.28.1.dist-info/entry_points.txt +2 -0
  1216. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/__init__.py +14 -0
  1217. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_api.py +93 -0
  1218. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_decoders.py +139 -0
  1219. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_exceptions.py +5 -0
  1220. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/_models.py +54 -0
  1221. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse/py.typed +0 -0
  1222. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/INSTALLER +1 -0
  1223. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/METADATA +351 -0
  1224. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/RECORD +17 -0
  1225. package/python-runtime/python/lib/python3.12/site-packages/httpx_sse-0.4.3.dist-info/WHEEL +5 -0
  1226. package/python-runtime/python/lib/python3.12/site-packages/idna/__init__.py +47 -0
  1227. package/python-runtime/python/lib/python3.12/site-packages/idna/__main__.py +6 -0
  1228. package/python-runtime/python/lib/python3.12/site-packages/idna/cli.py +132 -0
  1229. package/python-runtime/python/lib/python3.12/site-packages/idna/codec.py +225 -0
  1230. package/python-runtime/python/lib/python3.12/site-packages/idna/compat.py +43 -0
  1231. package/python-runtime/python/lib/python3.12/site-packages/idna/core.py +863 -0
  1232. package/python-runtime/python/lib/python3.12/site-packages/idna/idnadata.py +1933 -0
  1233. package/python-runtime/python/lib/python3.12/site-packages/idna/intranges.py +55 -0
  1234. package/python-runtime/python/lib/python3.12/site-packages/idna/package_data.py +1 -0
  1235. package/python-runtime/python/lib/python3.12/site-packages/idna/py.typed +0 -0
  1236. package/python-runtime/python/lib/python3.12/site-packages/idna/uts46data.py +17117 -0
  1237. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/INSTALLER +1 -0
  1238. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/METADATA +176 -0
  1239. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/RECORD +28 -0
  1240. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/WHEEL +4 -0
  1241. package/python-runtime/python/lib/python3.12/site-packages/idna-3.20.dist-info/entry_points.txt +3 -0
  1242. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/__init__.py +120 -0
  1243. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/__main__.py +6 -0
  1244. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_format.py +546 -0
  1245. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_keywords.py +449 -0
  1246. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_legacy_keywords.py +449 -0
  1247. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_types.py +204 -0
  1248. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_typing.py +29 -0
  1249. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/_utils.py +355 -0
  1250. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/__init__.py +5 -0
  1251. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/const_vs_enum.py +30 -0
  1252. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/contains.py +28 -0
  1253. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/import_benchmark.py +31 -0
  1254. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/issue232/issue.json +2653 -0
  1255. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/issue232.py +25 -0
  1256. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/json_schema_test_suite.py +12 -0
  1257. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/nested_schemas.py +56 -0
  1258. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/subcomponents.py +42 -0
  1259. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/unused_registry.py +35 -0
  1260. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/useless_applicator_schemas.py +106 -0
  1261. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/useless_keywords.py +32 -0
  1262. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/benchmarks/validator_creation.py +14 -0
  1263. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/cli.py +292 -0
  1264. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/exceptions.py +490 -0
  1265. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/protocols.py +230 -0
  1266. package/python-runtime/python/lib/python3.12/site-packages/jsonschema/validators.py +1410 -0
  1267. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/INSTALLER +1 -0
  1268. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/METADATA +170 -0
  1269. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/RECORD +82 -0
  1270. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/WHEEL +4 -0
  1271. package/python-runtime/python/lib/python3.12/site-packages/jsonschema-4.26.0.dist-info/entry_points.txt +2 -0
  1272. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/__init__.py +12 -0
  1273. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/_core.py +38 -0
  1274. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/metaschema.json +42 -0
  1275. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/applicator +56 -0
  1276. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/content +17 -0
  1277. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/core +57 -0
  1278. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/format +14 -0
  1279. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/meta-data +37 -0
  1280. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft201909/vocabularies/validation +98 -0
  1281. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/metaschema.json +58 -0
  1282. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/applicator +48 -0
  1283. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/content +17 -0
  1284. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/core +51 -0
  1285. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-annotation +14 -0
  1286. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/format-assertion +14 -0
  1287. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/meta-data +37 -0
  1288. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/unevaluated +15 -0
  1289. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft202012/vocabularies/validation +98 -0
  1290. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft3/metaschema.json +172 -0
  1291. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft4/metaschema.json +149 -0
  1292. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft6/metaschema.json +153 -0
  1293. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications/schemas/draft7/metaschema.json +166 -0
  1294. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/INSTALLER +1 -0
  1295. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/METADATA +54 -0
  1296. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/RECORD +33 -0
  1297. package/python-runtime/python/lib/python3.12/site-packages/jsonschema_specifications-2025.9.1.dist-info/WHEEL +4 -0
  1298. package/python-runtime/python/lib/python3.12/site-packages/jwt/__init__.py +78 -0
  1299. package/python-runtime/python/lib/python3.12/site-packages/jwt/algorithms.py +1121 -0
  1300. package/python-runtime/python/lib/python3.12/site-packages/jwt/api_jwk.py +196 -0
  1301. package/python-runtime/python/lib/python3.12/site-packages/jwt/api_jws.py +485 -0
  1302. package/python-runtime/python/lib/python3.12/site-packages/jwt/api_jwt.py +595 -0
  1303. package/python-runtime/python/lib/python3.12/site-packages/jwt/exceptions.py +113 -0
  1304. package/python-runtime/python/lib/python3.12/site-packages/jwt/help.py +66 -0
  1305. package/python-runtime/python/lib/python3.12/site-packages/jwt/jwk_set_cache.py +47 -0
  1306. package/python-runtime/python/lib/python3.12/site-packages/jwt/jwks_client.py +333 -0
  1307. package/python-runtime/python/lib/python3.12/site-packages/jwt/py.typed +0 -0
  1308. package/python-runtime/python/lib/python3.12/site-packages/jwt/types.py +69 -0
  1309. package/python-runtime/python/lib/python3.12/site-packages/jwt/utils.py +146 -0
  1310. package/python-runtime/python/lib/python3.12/site-packages/jwt/warnings.py +11 -0
  1311. package/python-runtime/python/lib/python3.12/site-packages/mcp/__init__.py +135 -0
  1312. package/python-runtime/python/lib/python3.12/site-packages/mcp/cli/__init__.py +6 -0
  1313. package/python-runtime/python/lib/python3.12/site-packages/mcp/cli/claude.py +148 -0
  1314. package/python-runtime/python/lib/python3.12/site-packages/mcp/cli/cli.py +488 -0
  1315. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/__init__.py +0 -0
  1316. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/__main__.py +85 -0
  1317. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/__init__.py +21 -0
  1318. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/exceptions.py +10 -0
  1319. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/extensions/__init__.py +0 -0
  1320. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/extensions/client_credentials.py +567 -0
  1321. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/oauth2.py +682 -0
  1322. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/auth/utils.py +395 -0
  1323. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/experimental/__init__.py +9 -0
  1324. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/experimental/task_handlers.py +290 -0
  1325. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/experimental/tasks.py +224 -0
  1326. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/session.py +640 -0
  1327. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/session_group.py +447 -0
  1328. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/sse.py +177 -0
  1329. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/stdio/__init__.py +278 -0
  1330. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/streamable_http.py +747 -0
  1331. package/python-runtime/python/lib/python3.12/site-packages/mcp/client/websocket.py +94 -0
  1332. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/__init__.py +1 -0
  1333. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/posix/__init__.py +1 -0
  1334. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/posix/utilities.py +60 -0
  1335. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/win32/__init__.py +1 -0
  1336. package/python-runtime/python/lib/python3.12/site-packages/mcp/os/win32/utilities.py +338 -0
  1337. package/python-runtime/python/lib/python3.12/site-packages/mcp/py.typed +0 -0
  1338. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/__init__.py +5 -0
  1339. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/__main__.py +50 -0
  1340. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/__init__.py +3 -0
  1341. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/errors.py +5 -0
  1342. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/__init__.py +3 -0
  1343. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/authorize.py +224 -0
  1344. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/metadata.py +29 -0
  1345. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/register.py +136 -0
  1346. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/revoke.py +91 -0
  1347. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/handlers/token.py +241 -0
  1348. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/json_response.py +10 -0
  1349. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/__init__.py +3 -0
  1350. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/auth_context.py +48 -0
  1351. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/bearer_auth.py +173 -0
  1352. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/middleware/client_auth.py +115 -0
  1353. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/provider.py +314 -0
  1354. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/routes.py +254 -0
  1355. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/auth/settings.py +56 -0
  1356. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/elicitation.py +190 -0
  1357. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/__init__.py +12 -0
  1358. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/request_context.py +285 -0
  1359. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/session_features.py +226 -0
  1360. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_context.py +614 -0
  1361. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_result_handler.py +243 -0
  1362. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_scope.py +75 -0
  1363. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/experimental/task_support.py +128 -0
  1364. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/__init__.py +11 -0
  1365. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/exceptions.py +21 -0
  1366. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/prompts/__init__.py +4 -0
  1367. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/prompts/base.py +183 -0
  1368. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/prompts/manager.py +60 -0
  1369. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/__init__.py +23 -0
  1370. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/base.py +50 -0
  1371. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/resource_manager.py +115 -0
  1372. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/templates.py +122 -0
  1373. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/resources/types.py +203 -0
  1374. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/server.py +1390 -0
  1375. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/tools/__init__.py +4 -0
  1376. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/tools/base.py +126 -0
  1377. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/tools/tool_manager.py +93 -0
  1378. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/__init__.py +1 -0
  1379. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/context_injection.py +68 -0
  1380. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/func_metadata.py +560 -0
  1381. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/logging.py +43 -0
  1382. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/fastmcp/utilities/types.py +101 -0
  1383. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/__init__.py +3 -0
  1384. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/experimental.py +342 -0
  1385. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/func_inspection.py +54 -0
  1386. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/helper_types.py +11 -0
  1387. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/lowlevel/server.py +830 -0
  1388. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/models.py +20 -0
  1389. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/session.py +701 -0
  1390. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/sse.py +299 -0
  1391. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/stdio.py +88 -0
  1392. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/streamable_http.py +1131 -0
  1393. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/streamable_http_manager.py +425 -0
  1394. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/transport_security.py +194 -0
  1395. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/validation.py +104 -0
  1396. package/python-runtime/python/lib/python3.12/site-packages/mcp/server/websocket.py +89 -0
  1397. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/__init__.py +0 -0
  1398. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/_httpx_utils.py +219 -0
  1399. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/auth.py +180 -0
  1400. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/auth_utils.py +80 -0
  1401. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/context.py +32 -0
  1402. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/exceptions.py +71 -0
  1403. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/__init__.py +7 -0
  1404. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/__init__.py +12 -0
  1405. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/capabilities.py +115 -0
  1406. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/context.py +101 -0
  1407. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/helpers.py +181 -0
  1408. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/in_memory_task_store.py +219 -0
  1409. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/message_queue.py +241 -0
  1410. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/polling.py +45 -0
  1411. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/resolver.py +60 -0
  1412. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/experimental/tasks/store.py +156 -0
  1413. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/memory.py +98 -0
  1414. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/message.py +50 -0
  1415. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/metadata_utils.py +45 -0
  1416. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/progress.py +58 -0
  1417. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/response_router.py +63 -0
  1418. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/session.py +552 -0
  1419. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/tool_name_validation.py +129 -0
  1420. package/python-runtime/python/lib/python3.12/site-packages/mcp/shared/version.py +3 -0
  1421. package/python-runtime/python/lib/python3.12/site-packages/mcp/types.py +1999 -0
  1422. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/INSTALLER +1 -0
  1423. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/METADATA +239 -0
  1424. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/RECORD +228 -0
  1425. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/WHEEL +4 -0
  1426. package/python-runtime/python/lib/python3.12/site-packages/mcp-1.30.0.dist-info/entry_points.txt +2 -0
  1427. package/python-runtime/python/lib/python3.12/site-packages/multipart/__init__.py +38 -0
  1428. package/python-runtime/python/lib/python3.12/site-packages/multipart/decoders.py +1 -0
  1429. package/python-runtime/python/lib/python3.12/site-packages/multipart/exceptions.py +1 -0
  1430. package/python-runtime/python/lib/python3.12/site-packages/multipart/multipart.py +1 -0
  1431. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/INSTALLER +1 -0
  1432. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/METADATA +182 -0
  1433. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/RECORD +236 -0
  1434. package/python-runtime/python/lib/python3.12/site-packages/pillow-13.0.0.dist-info/WHEEL +6 -0
  1435. package/python-runtime/python/lib/python3.12/site-packages/pycparser/__init__.py +98 -0
  1436. package/python-runtime/python/lib/python3.12/site-packages/pycparser/_ast_gen.py +385 -0
  1437. package/python-runtime/python/lib/python3.12/site-packages/pycparser/_c_ast.cfg +268 -0
  1438. package/python-runtime/python/lib/python3.12/site-packages/pycparser/ast_transforms.py +201 -0
  1439. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_ast.py +1670 -0
  1440. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_generator.py +866 -0
  1441. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_lexer.py +861 -0
  1442. package/python-runtime/python/lib/python3.12/site-packages/pycparser/c_parser.py +2759 -0
  1443. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/INSTALLER +1 -0
  1444. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/METADATA +286 -0
  1445. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/RECORD +21 -0
  1446. package/python-runtime/python/lib/python3.12/site-packages/pycparser-3.12.dist-info/WHEEL +5 -0
  1447. package/python-runtime/python/lib/python3.12/site-packages/pydantic/__init__.py +461 -0
  1448. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/__init__.py +0 -0
  1449. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_config.py +408 -0
  1450. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_contextlib.py +84 -0
  1451. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_core_metadata.py +97 -0
  1452. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_core_utils.py +156 -0
  1453. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_dataclasses.py +327 -0
  1454. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_decorators.py +906 -0
  1455. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_decorators_v1.py +174 -0
  1456. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_discriminated_union.py +510 -0
  1457. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_docs_extraction.py +128 -0
  1458. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_fields.py +910 -0
  1459. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_forward_ref.py +23 -0
  1460. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_generate_schema.py +3053 -0
  1461. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_generics.py +556 -0
  1462. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_git.py +27 -0
  1463. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_import_utils.py +20 -0
  1464. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_known_annotated_metadata.py +412 -0
  1465. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_mock_val_ser.py +241 -0
  1466. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_model_construction.py +833 -0
  1467. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_namespace_utils.py +300 -0
  1468. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_repr.py +122 -0
  1469. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_schema_gather.py +49 -0
  1470. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_schema_generation_shared.py +126 -0
  1471. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_serializers.py +59 -0
  1472. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_signature.py +193 -0
  1473. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_type_refs.py +128 -0
  1474. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_typing_extra.py +506 -0
  1475. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_utils.py +433 -0
  1476. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_validate_call.py +141 -0
  1477. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_internal/_validators.py +541 -0
  1478. package/python-runtime/python/lib/python3.12/site-packages/pydantic/_migration.py +317 -0
  1479. package/python-runtime/python/lib/python3.12/site-packages/pydantic/alias_generators.py +62 -0
  1480. package/python-runtime/python/lib/python3.12/site-packages/pydantic/aliases.py +136 -0
  1481. package/python-runtime/python/lib/python3.12/site-packages/pydantic/annotated_handlers.py +123 -0
  1482. package/python-runtime/python/lib/python3.12/site-packages/pydantic/class_validators.py +5 -0
  1483. package/python-runtime/python/lib/python3.12/site-packages/pydantic/color.py +605 -0
  1484. package/python-runtime/python/lib/python3.12/site-packages/pydantic/config.py +1295 -0
  1485. package/python-runtime/python/lib/python3.12/site-packages/pydantic/dataclasses.py +385 -0
  1486. package/python-runtime/python/lib/python3.12/site-packages/pydantic/datetime_parse.py +5 -0
  1487. package/python-runtime/python/lib/python3.12/site-packages/pydantic/decorator.py +5 -0
  1488. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/__init__.py +0 -0
  1489. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/class_validators.py +257 -0
  1490. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/config.py +72 -0
  1491. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/copy_internals.py +224 -0
  1492. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/decorator.py +286 -0
  1493. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/json.py +142 -0
  1494. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/parse.py +81 -0
  1495. package/python-runtime/python/lib/python3.12/site-packages/pydantic/deprecated/tools.py +104 -0
  1496. package/python-runtime/python/lib/python3.12/site-packages/pydantic/env_settings.py +5 -0
  1497. package/python-runtime/python/lib/python3.12/site-packages/pydantic/error_wrappers.py +5 -0
  1498. package/python-runtime/python/lib/python3.12/site-packages/pydantic/errors.py +185 -0
  1499. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/__init__.py +1 -0
  1500. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/arguments_schema.py +44 -0
  1501. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/missing_sentinel.py +29 -0
  1502. package/python-runtime/python/lib/python3.12/site-packages/pydantic/experimental/pipeline.py +684 -0
  1503. package/python-runtime/python/lib/python3.12/site-packages/pydantic/fields.py +2065 -0
  1504. package/python-runtime/python/lib/python3.12/site-packages/pydantic/functional_serializers.py +461 -0
  1505. package/python-runtime/python/lib/python3.12/site-packages/pydantic/functional_validators.py +920 -0
  1506. package/python-runtime/python/lib/python3.12/site-packages/pydantic/generics.py +5 -0
  1507. package/python-runtime/python/lib/python3.12/site-packages/pydantic/json.py +5 -0
  1508. package/python-runtime/python/lib/python3.12/site-packages/pydantic/json_schema.py +3281 -0
  1509. package/python-runtime/python/lib/python3.12/site-packages/pydantic/main.py +1947 -0
  1510. package/python-runtime/python/lib/python3.12/site-packages/pydantic/mypy.py +1469 -0
  1511. package/python-runtime/python/lib/python3.12/site-packages/pydantic/networks.py +1417 -0
  1512. package/python-runtime/python/lib/python3.12/site-packages/pydantic/parse.py +5 -0
  1513. package/python-runtime/python/lib/python3.12/site-packages/pydantic/plugin/__init__.py +190 -0
  1514. package/python-runtime/python/lib/python3.12/site-packages/pydantic/plugin/_loader.py +56 -0
  1515. package/python-runtime/python/lib/python3.12/site-packages/pydantic/plugin/_schema_validator.py +152 -0
  1516. package/python-runtime/python/lib/python3.12/site-packages/pydantic/py.typed +0 -0
  1517. package/python-runtime/python/lib/python3.12/site-packages/pydantic/root_model.py +189 -0
  1518. package/python-runtime/python/lib/python3.12/site-packages/pydantic/schema.py +5 -0
  1519. package/python-runtime/python/lib/python3.12/site-packages/pydantic/tools.py +5 -0
  1520. package/python-runtime/python/lib/python3.12/site-packages/pydantic/type_adapter.py +780 -0
  1521. package/python-runtime/python/lib/python3.12/site-packages/pydantic/types.py +3405 -0
  1522. package/python-runtime/python/lib/python3.12/site-packages/pydantic/typing.py +5 -0
  1523. package/python-runtime/python/lib/python3.12/site-packages/pydantic/utils.py +5 -0
  1524. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/__init__.py +131 -0
  1525. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/_hypothesis_plugin.py +391 -0
  1526. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/annotated_types.py +72 -0
  1527. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/class_validators.py +361 -0
  1528. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/color.py +494 -0
  1529. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/config.py +191 -0
  1530. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/dataclasses.py +503 -0
  1531. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/datetime_parse.py +248 -0
  1532. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/decorator.py +264 -0
  1533. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/env_settings.py +350 -0
  1534. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/error_wrappers.py +161 -0
  1535. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/errors.py +646 -0
  1536. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/fields.py +1253 -0
  1537. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/generics.py +400 -0
  1538. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/json.py +112 -0
  1539. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/main.py +1130 -0
  1540. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/mypy.py +950 -0
  1541. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/networks.py +747 -0
  1542. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/parse.py +66 -0
  1543. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/py.typed +0 -0
  1544. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/schema.py +1163 -0
  1545. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/tools.py +92 -0
  1546. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/types.py +1213 -0
  1547. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/typing.py +627 -0
  1548. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/utils.py +807 -0
  1549. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/validators.py +768 -0
  1550. package/python-runtime/python/lib/python3.12/site-packages/pydantic/v1/version.py +38 -0
  1551. package/python-runtime/python/lib/python3.12/site-packages/pydantic/validate_call_decorator.py +121 -0
  1552. package/python-runtime/python/lib/python3.12/site-packages/pydantic/validators.py +5 -0
  1553. package/python-runtime/python/lib/python3.12/site-packages/pydantic/version.py +113 -0
  1554. package/python-runtime/python/lib/python3.12/site-packages/pydantic/warnings.py +130 -0
  1555. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/INSTALLER +1 -0
  1556. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/METADATA +1646 -0
  1557. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/RECORD +219 -0
  1558. package/python-runtime/python/lib/python3.12/site-packages/pydantic-2.14.3.dist-info/WHEEL +4 -0
  1559. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/__init__.py +194 -0
  1560. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/_pydantic_core/__init__.pyi +1114 -0
  1561. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/_pydantic_core/_schema_gather.pyi +34 -0
  1562. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/_pydantic_core.cpython-312-darwin.so +0 -0
  1563. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/core_schema.py +5093 -0
  1564. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core/py.typed +0 -0
  1565. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/INSTALLER +1 -0
  1566. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/METADATA +172 -0
  1567. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/RECORD +14 -0
  1568. package/python-runtime/python/lib/python3.12/site-packages/pydantic_core-2.50.4.dist-info/WHEEL +4 -0
  1569. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/__init__.py +74 -0
  1570. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/exceptions.py +10 -0
  1571. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/main.py +1133 -0
  1572. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/py.typed +0 -0
  1573. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/__init__.py +91 -0
  1574. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/base.py +767 -0
  1575. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/__init__.py +48 -0
  1576. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/aws.py +158 -0
  1577. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/azure.py +246 -0
  1578. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/cli.py +1942 -0
  1579. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/dotenv.py +226 -0
  1580. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/env.py +423 -0
  1581. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/gcp.py +365 -0
  1582. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/json.py +61 -0
  1583. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/nested_secrets.py +220 -0
  1584. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/pyproject.py +64 -0
  1585. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/secrets.py +146 -0
  1586. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/toml.py +72 -0
  1587. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/providers/yaml.py +147 -0
  1588. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/types.py +109 -0
  1589. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/sources/utils.py +515 -0
  1590. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/utils.py +46 -0
  1591. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings/version.py +1 -0
  1592. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/INSTALLER +1 -0
  1593. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/METADATA +72 -0
  1594. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/RECORD +50 -0
  1595. package/python-runtime/python/lib/python3.12/site-packages/pydantic_settings-2.16.2.dist-info/WHEEL +4 -0
  1596. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/INSTALLER +1 -0
  1597. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/METADATA +94 -0
  1598. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/RECORD +32 -0
  1599. package/python-runtime/python/lib/python3.12/site-packages/pyjwt-2.15.1.dist-info/WHEEL +5 -0
  1600. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/INSTALLER +1 -0
  1601. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/METADATA +835 -0
  1602. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/RECORD +25 -0
  1603. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/WHEEL +5 -0
  1604. package/python-runtime/python/lib/python3.12/site-packages/python_dotenv-1.2.4.dist-info/entry_points.txt +2 -0
  1605. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/__init__.py +35 -0
  1606. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/decoders.py +185 -0
  1607. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/exceptions.py +34 -0
  1608. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/multipart.py +2005 -0
  1609. package/python-runtime/python/lib/python3.12/site-packages/python_multipart/py.typed +0 -0
  1610. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/INSTALLER +1 -0
  1611. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/METADATA +179 -0
  1612. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/RECORD +22 -0
  1613. package/python-runtime/python/lib/python3.12/site-packages/python_multipart-0.0.33.dist-info/WHEEL +4 -0
  1614. package/python-runtime/python/lib/python3.12/site-packages/referencing/__init__.py +7 -0
  1615. package/python-runtime/python/lib/python3.12/site-packages/referencing/_attrs.py +31 -0
  1616. package/python-runtime/python/lib/python3.12/site-packages/referencing/_attrs.pyi +21 -0
  1617. package/python-runtime/python/lib/python3.12/site-packages/referencing/_core.py +739 -0
  1618. package/python-runtime/python/lib/python3.12/site-packages/referencing/exceptions.py +165 -0
  1619. package/python-runtime/python/lib/python3.12/site-packages/referencing/jsonschema.py +642 -0
  1620. package/python-runtime/python/lib/python3.12/site-packages/referencing/py.typed +0 -0
  1621. package/python-runtime/python/lib/python3.12/site-packages/referencing/retrieval.py +94 -0
  1622. package/python-runtime/python/lib/python3.12/site-packages/referencing/typing.py +61 -0
  1623. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/INSTALLER +1 -0
  1624. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/METADATA +64 -0
  1625. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/RECORD +33 -0
  1626. package/python-runtime/python/lib/python3.12/site-packages/referencing-0.37.0.dist-info/WHEEL +4 -0
  1627. package/python-runtime/python/lib/python3.12/site-packages/rpds/__init__.py +5 -0
  1628. package/python-runtime/python/lib/python3.12/site-packages/rpds/__init__.pyi +79 -0
  1629. package/python-runtime/python/lib/python3.12/site-packages/rpds/py.typed +0 -0
  1630. package/python-runtime/python/lib/python3.12/site-packages/rpds/rpds.cpython-312-darwin.so +0 -0
  1631. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/INSTALLER +1 -0
  1632. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/METADATA +99 -0
  1633. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/RECORD +11 -0
  1634. package/python-runtime/python/lib/python3.12/site-packages/rpds_py-2026.9.1.dist-info/WHEEL +4 -0
  1635. package/python-runtime/python/lib/python3.12/site-packages/socksio/__init__.py +46 -0
  1636. package/python-runtime/python/lib/python3.12/site-packages/socksio/_types.py +3 -0
  1637. package/python-runtime/python/lib/python3.12/site-packages/socksio/compat.py +86 -0
  1638. package/python-runtime/python/lib/python3.12/site-packages/socksio/exceptions.py +6 -0
  1639. package/python-runtime/python/lib/python3.12/site-packages/socksio/py.typed +0 -0
  1640. package/python-runtime/python/lib/python3.12/site-packages/socksio/socks4.py +253 -0
  1641. package/python-runtime/python/lib/python3.12/site-packages/socksio/socks5.py +399 -0
  1642. package/python-runtime/python/lib/python3.12/site-packages/socksio/utils.py +95 -0
  1643. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/INSTALLER +1 -0
  1644. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/METADATA +182 -0
  1645. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/RECORD +20 -0
  1646. package/python-runtime/python/lib/python3.12/site-packages/socksio-1.0.0.dist-info/WHEEL +4 -0
  1647. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/__init__.py +5 -0
  1648. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/_utils.py +36 -0
  1649. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/event.py +96 -0
  1650. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/py.typed +0 -0
  1651. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette/sse.py +602 -0
  1652. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/INSTALLER +1 -0
  1653. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/METADATA +493 -0
  1654. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/RECORD +16 -0
  1655. package/python-runtime/python/lib/python3.12/site-packages/sse_starlette-3.7.0.dist-info/WHEEL +5 -0
  1656. package/python-runtime/python/lib/python3.12/site-packages/starlette/__init__.py +1 -0
  1657. package/python-runtime/python/lib/python3.12/site-packages/starlette/_exception_handler.py +67 -0
  1658. package/python-runtime/python/lib/python3.12/site-packages/starlette/_utils.py +152 -0
  1659. package/python-runtime/python/lib/python3.12/site-packages/starlette/applications.py +124 -0
  1660. package/python-runtime/python/lib/python3.12/site-packages/starlette/authentication.py +157 -0
  1661. package/python-runtime/python/lib/python3.12/site-packages/starlette/background.py +36 -0
  1662. package/python-runtime/python/lib/python3.12/site-packages/starlette/concurrency.py +59 -0
  1663. package/python-runtime/python/lib/python3.12/site-packages/starlette/config.py +142 -0
  1664. package/python-runtime/python/lib/python3.12/site-packages/starlette/convertors.py +89 -0
  1665. package/python-runtime/python/lib/python3.12/site-packages/starlette/datastructures.py +717 -0
  1666. package/python-runtime/python/lib/python3.12/site-packages/starlette/endpoints.py +128 -0
  1667. package/python-runtime/python/lib/python3.12/site-packages/starlette/exceptions.py +43 -0
  1668. package/python-runtime/python/lib/python3.12/site-packages/starlette/formparsers.py +289 -0
  1669. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/__init__.py +37 -0
  1670. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/authentication.py +52 -0
  1671. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/base.py +254 -0
  1672. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/body_limit.py +132 -0
  1673. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/cors.py +177 -0
  1674. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/errors.py +259 -0
  1675. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/exceptions.py +73 -0
  1676. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/gzip.py +230 -0
  1677. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/httpsredirect.py +22 -0
  1678. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/opentelemetry.py +126 -0
  1679. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/sessions.py +139 -0
  1680. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/trustedhost.py +66 -0
  1681. package/python-runtime/python/lib/python3.12/site-packages/starlette/middleware/wsgi.py +157 -0
  1682. package/python-runtime/python/lib/python3.12/site-packages/starlette/py.typed +0 -0
  1683. package/python-runtime/python/lib/python3.12/site-packages/starlette/requests.py +357 -0
  1684. package/python-runtime/python/lib/python3.12/site-packages/starlette/responses.py +616 -0
  1685. package/python-runtime/python/lib/python3.12/site-packages/starlette/routing.py +772 -0
  1686. package/python-runtime/python/lib/python3.12/site-packages/starlette/schemas.py +152 -0
  1687. package/python-runtime/python/lib/python3.12/site-packages/starlette/staticfiles.py +231 -0
  1688. package/python-runtime/python/lib/python3.12/site-packages/starlette/status.py +211 -0
  1689. package/python-runtime/python/lib/python3.12/site-packages/starlette/templating.py +156 -0
  1690. package/python-runtime/python/lib/python3.12/site-packages/starlette/testclient.py +624 -0
  1691. package/python-runtime/python/lib/python3.12/site-packages/starlette/types.py +26 -0
  1692. package/python-runtime/python/lib/python3.12/site-packages/starlette/websockets.py +202 -0
  1693. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/INSTALLER +1 -0
  1694. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/METADATA +181 -0
  1695. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/RECORD +78 -0
  1696. package/python-runtime/python/lib/python3.12/site-packages/starlette-1.10.0.dist-info/WHEEL +4 -0
  1697. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/__init__.py +49 -0
  1698. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/budget.py +70 -0
  1699. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/completion.py +13 -0
  1700. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/generated.py +250 -0
  1701. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/policy.py +35 -0
  1702. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/retry.py +21 -0
  1703. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/safety.py +170 -0
  1704. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness/tracing.py +138 -0
  1705. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/INSTALLER +1 -0
  1706. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/METADATA +13 -0
  1707. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/RECORD +23 -0
  1708. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.0.dist-info/WHEEL +5 -0
  1709. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol/__init__.py +1 -0
  1710. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol/generated.py +250 -0
  1711. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/INSTALLER +1 -0
  1712. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/METADATA +12 -0
  1713. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/RECORD +11 -0
  1714. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.0.dist-info/WHEEL +5 -0
  1715. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/__init__.py +529 -0
  1716. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/antihallucination.py +644 -0
  1717. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/approval.py +730 -0
  1718. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/approval_policy.py +243 -0
  1719. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/ask_user.py +324 -0
  1720. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/branch.py +419 -0
  1721. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/cache_control.py +254 -0
  1722. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/calibration.py +318 -0
  1723. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/compaction.py +737 -0
  1724. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/compaction_policy.py +97 -0
  1725. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/config.py +225 -0
  1726. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/default.harness.json +32 -0
  1727. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/default.harness.yaml +38 -0
  1728. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/delegation_gate.py +100 -0
  1729. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/errors.py +58 -0
  1730. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/gateway_catalog.py +397 -0
  1731. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/handoff.py +147 -0
  1732. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/harness.py +922 -0
  1733. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/harness_spec.py +339 -0
  1734. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/history.py +962 -0
  1735. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/hooks.py +541 -0
  1736. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/__init__.py +204 -0
  1737. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/anthropic_native.py +392 -0
  1738. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/compat.py +316 -0
  1739. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/errors.py +207 -0
  1740. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/google_genai.py +454 -0
  1741. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/openai_compat.py +769 -0
  1742. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/openai_responses.py +554 -0
  1743. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/parts.py +69 -0
  1744. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/presets.py +259 -0
  1745. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/llm/system_proxy.py +309 -0
  1746. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/loop.py +1040 -0
  1747. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/maintenance.py +238 -0
  1748. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/mcp.py +673 -0
  1749. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/mcp_server.py +319 -0
  1750. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/model_catalog.py +7742 -0
  1751. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/model_info.py +472 -0
  1752. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/model_resolve.py +271 -0
  1753. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/native_bridge.py +1034 -0
  1754. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/observation_aging.py +196 -0
  1755. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/orchestration.py +462 -0
  1756. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/otel.py +384 -0
  1757. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/plugins.py +487 -0
  1758. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/pool.py +438 -0
  1759. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/pricing.py +88 -0
  1760. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/pseudo.py +713 -0
  1761. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/recording.py +454 -0
  1762. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/reminders.py +339 -0
  1763. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/replay.py +222 -0
  1764. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/resume.py +343 -0
  1765. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/retry.py +163 -0
  1766. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/sandboxed.py +201 -0
  1767. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/skills.py +730 -0
  1768. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/spill.py +127 -0
  1769. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/__init__.py +138 -0
  1770. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/in_memory.py +215 -0
  1771. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/sqlalchemy_store.py +472 -0
  1772. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/sqlite_store.py +497 -0
  1773. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/storage/write_lease.py +173 -0
  1774. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/subagent.py +564 -0
  1775. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/todo.py +348 -0
  1776. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tokens.py +162 -0
  1777. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tool_presentation.py +132 -0
  1778. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tool_schema.py +124 -0
  1779. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tool_search.py +177 -0
  1780. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tools.py +457 -0
  1781. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/tracing.py +285 -0
  1782. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/transport/__init__.py +39 -0
  1783. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/transport/fastapi_sse.py +116 -0
  1784. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/transport/stdio_jsonrpc.py +431 -0
  1785. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime/world_state.py +345 -0
  1786. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/INSTALLER +1 -0
  1787. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/METADATA +72 -0
  1788. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/RECORD +147 -0
  1789. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.0.dist-info/WHEEL +5 -0
  1790. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native/__init__.py +5 -0
  1791. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native/steerable_agent_runtime_native.abi3.so +0 -0
  1792. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/INSTALLER +1 -0
  1793. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/METADATA +7 -0
  1794. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/RECORD +9 -0
  1795. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime_native-1.0.7.dist-info/WHEEL +4 -0
  1796. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/__init__.py +28 -0
  1797. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/__main__.py +119 -0
  1798. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/_version.py +14 -0
  1799. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/acp_adapter.py +890 -0
  1800. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/acp_fs.py +64 -0
  1801. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/acp_terminal.py +147 -0
  1802. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/ag_ui.py +223 -0
  1803. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/delivery.py +2933 -0
  1804. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/display.py +308 -0
  1805. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/egress_ask.py +183 -0
  1806. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/file_edit.py +251 -0
  1807. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/headless.py +760 -0
  1808. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/host_spawn.py +137 -0
  1809. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/host_tools.py +255 -0
  1810. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/jpeg_ascii.py +314 -0
  1811. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/landlock.py +353 -0
  1812. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/landlock_run.py +35 -0
  1813. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/loop_limits.py +85 -0
  1814. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/multi_file_edit.py +109 -0
  1815. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/png_ascii.py +294 -0
  1816. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/ptc_js.py +986 -0
  1817. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/ptc_js_worker.cjs +579 -0
  1818. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/run_code.py +634 -0
  1819. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/run_code_driver.py +229 -0
  1820. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/sandbox.py +771 -0
  1821. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/search_tools.py +173 -0
  1822. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/shell_session.py +301 -0
  1823. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/sidecar.py +3785 -0
  1824. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/stream_chunks.py +115 -0
  1825. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/todo_tools.py +49 -0
  1826. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/tool_contract.json +352 -0
  1827. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/tool_contract.py +62 -0
  1828. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/web_tools.py +1375 -0
  1829. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/workspace_fs.py +71 -0
  1830. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar/workspace_tools.py +1472 -0
  1831. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/INSTALLER +1 -0
  1832. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/METADATA +58 -0
  1833. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/RECORD +79 -0
  1834. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/WHEEL +5 -0
  1835. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.0.dist-info/entry_points.txt +4 -0
  1836. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/INSTALLER +1 -0
  1837. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/METADATA +73 -0
  1838. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/RECORD +7 -0
  1839. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions-4.16.0.dist-info/WHEEL +4 -0
  1840. package/python-runtime/python/lib/python3.12/site-packages/typing_extensions.py +4422 -0
  1841. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/__init__.py +0 -0
  1842. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/introspection.py +604 -0
  1843. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/py.typed +0 -0
  1844. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/typing_objects.py +620 -0
  1845. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection/typing_objects.pyi +421 -0
  1846. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/INSTALLER +1 -0
  1847. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/METADATA +49 -0
  1848. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/RECORD +13 -0
  1849. package/python-runtime/python/lib/python3.12/site-packages/typing_inspection-0.4.5.dist-info/WHEEL +4 -0
  1850. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/__init__.py +5 -0
  1851. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/__main__.py +4 -0
  1852. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_ansi.py +29 -0
  1853. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_compat.py +91 -0
  1854. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_subprocess.py +84 -0
  1855. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/_types.py +280 -0
  1856. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/config.py +618 -0
  1857. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/importer.py +34 -0
  1858. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/lifespan/__init__.py +0 -0
  1859. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/lifespan/off.py +17 -0
  1860. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/lifespan/on.py +137 -0
  1861. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/logging.py +117 -0
  1862. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/__init__.py +0 -0
  1863. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/asyncio.py +11 -0
  1864. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/auto.py +17 -0
  1865. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/uvloop.py +10 -0
  1866. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/loops/zuvloop.py +10 -0
  1867. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/main.py +656 -0
  1868. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/__init__.py +0 -0
  1869. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/asgi2.py +15 -0
  1870. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/message_logger.py +87 -0
  1871. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/proxy_headers.py +187 -0
  1872. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/middleware/wsgi.py +199 -0
  1873. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/__init__.py +0 -0
  1874. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/__init__.py +0 -0
  1875. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/auto.py +15 -0
  1876. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/auto_zttp_impl.py +89 -0
  1877. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/flow_control.py +54 -0
  1878. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/h11_impl.py +540 -0
  1879. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/httptools_impl.py +581 -0
  1880. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/zttp_h2_impl.py +559 -0
  1881. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/http/zttp_impl.py +537 -0
  1882. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/utils.py +62 -0
  1883. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/__init__.py +0 -0
  1884. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/auto.py +21 -0
  1885. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/websockets_impl.py +390 -0
  1886. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/websockets_sansio_impl.py +556 -0
  1887. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/protocols/websockets/wsproto_impl.py +500 -0
  1888. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/py.typed +1 -0
  1889. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/server.py +356 -0
  1890. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/__init__.py +16 -0
  1891. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/basereload.py +124 -0
  1892. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/multiprocess.py +282 -0
  1893. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/statreload.py +52 -0
  1894. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/supervisors/watchfilesreload.py +86 -0
  1895. package/python-runtime/python/lib/python3.12/site-packages/uvicorn/workers.py +111 -0
  1896. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/INSTALLER +1 -0
  1897. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/METADATA +189 -0
  1898. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/RECORD +98 -0
  1899. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/WHEEL +4 -0
  1900. package/python-runtime/python/lib/python3.12/site-packages/uvicorn-0.54.0.dist-info/entry_points.txt +2 -0
  1901. package/python-runtime/python/lib/python3.12/site.py +693 -0
  1902. package/python-runtime/python/lib/python3.12/smtplib.py +1109 -0
  1903. package/python-runtime/python/lib/python3.12/sndhdr.py +271 -0
  1904. package/python-runtime/python/lib/python3.12/socket.py +983 -0
  1905. package/python-runtime/python/lib/python3.12/socketserver.py +863 -0
  1906. package/python-runtime/python/lib/python3.12/sqlite3/__init__.py +70 -0
  1907. package/python-runtime/python/lib/python3.12/sqlite3/__main__.py +127 -0
  1908. package/python-runtime/python/lib/python3.12/sqlite3/dbapi2.py +108 -0
  1909. package/python-runtime/python/lib/python3.12/sqlite3/dump.py +89 -0
  1910. package/python-runtime/python/lib/python3.12/sre_compile.py +7 -0
  1911. package/python-runtime/python/lib/python3.12/sre_constants.py +7 -0
  1912. package/python-runtime/python/lib/python3.12/sre_parse.py +7 -0
  1913. package/python-runtime/python/lib/python3.12/ssl.py +1488 -0
  1914. package/python-runtime/python/lib/python3.12/stat.py +195 -0
  1915. package/python-runtime/python/lib/python3.12/statistics.py +1454 -0
  1916. package/python-runtime/python/lib/python3.12/string.py +309 -0
  1917. package/python-runtime/python/lib/python3.12/stringprep.py +272 -0
  1918. package/python-runtime/python/lib/python3.12/struct.py +15 -0
  1919. package/python-runtime/python/lib/python3.12/subprocess.py +2216 -0
  1920. package/python-runtime/python/lib/python3.12/sunau.py +533 -0
  1921. package/python-runtime/python/lib/python3.12/symtable.py +362 -0
  1922. package/python-runtime/python/lib/python3.12/sysconfig.py +894 -0
  1923. package/python-runtime/python/lib/python3.12/tabnanny.py +340 -0
  1924. package/python-runtime/python/lib/python3.12/tarfile.py +3031 -0
  1925. package/python-runtime/python/lib/python3.12/telnetlib.py +680 -0
  1926. package/python-runtime/python/lib/python3.12/tempfile.py +956 -0
  1927. package/python-runtime/python/lib/python3.12/textwrap.py +491 -0
  1928. package/python-runtime/python/lib/python3.12/this.py +28 -0
  1929. package/python-runtime/python/lib/python3.12/threading.py +1708 -0
  1930. package/python-runtime/python/lib/python3.12/timeit.py +381 -0
  1931. package/python-runtime/python/lib/python3.12/token.py +143 -0
  1932. package/python-runtime/python/lib/python3.12/tokenize.py +594 -0
  1933. package/python-runtime/python/lib/python3.12/tomllib/__init__.py +10 -0
  1934. package/python-runtime/python/lib/python3.12/tomllib/_parser.py +691 -0
  1935. package/python-runtime/python/lib/python3.12/tomllib/_re.py +107 -0
  1936. package/python-runtime/python/lib/python3.12/tomllib/_types.py +10 -0
  1937. package/python-runtime/python/lib/python3.12/trace.py +748 -0
  1938. package/python-runtime/python/lib/python3.12/traceback.py +1187 -0
  1939. package/python-runtime/python/lib/python3.12/tracemalloc.py +560 -0
  1940. package/python-runtime/python/lib/python3.12/tty.py +73 -0
  1941. package/python-runtime/python/lib/python3.12/turtle.py +4207 -0
  1942. package/python-runtime/python/lib/python3.12/types.py +333 -0
  1943. package/python-runtime/python/lib/python3.12/typing.py +3494 -0
  1944. package/python-runtime/python/lib/python3.12/unittest/__init__.py +85 -0
  1945. package/python-runtime/python/lib/python3.12/unittest/__main__.py +18 -0
  1946. package/python-runtime/python/lib/python3.12/unittest/_log.py +86 -0
  1947. package/python-runtime/python/lib/python3.12/unittest/async_case.py +143 -0
  1948. package/python-runtime/python/lib/python3.12/unittest/case.py +1456 -0
  1949. package/python-runtime/python/lib/python3.12/unittest/loader.py +497 -0
  1950. package/python-runtime/python/lib/python3.12/unittest/main.py +291 -0
  1951. package/python-runtime/python/lib/python3.12/unittest/mock.py +3054 -0
  1952. package/python-runtime/python/lib/python3.12/unittest/result.py +256 -0
  1953. package/python-runtime/python/lib/python3.12/unittest/runner.py +292 -0
  1954. package/python-runtime/python/lib/python3.12/unittest/signals.py +71 -0
  1955. package/python-runtime/python/lib/python3.12/unittest/suite.py +379 -0
  1956. package/python-runtime/python/lib/python3.12/unittest/util.py +170 -0
  1957. package/python-runtime/python/lib/python3.12/urllib/__init__.py +0 -0
  1958. package/python-runtime/python/lib/python3.12/urllib/error.py +74 -0
  1959. package/python-runtime/python/lib/python3.12/urllib/parse.py +1262 -0
  1960. package/python-runtime/python/lib/python3.12/urllib/request.py +2816 -0
  1961. package/python-runtime/python/lib/python3.12/urllib/response.py +84 -0
  1962. package/python-runtime/python/lib/python3.12/urllib/robotparser.py +275 -0
  1963. package/python-runtime/python/lib/python3.12/uu.py +216 -0
  1964. package/python-runtime/python/lib/python3.12/uuid.py +793 -0
  1965. package/python-runtime/python/lib/python3.12/warnings.py +598 -0
  1966. package/python-runtime/python/lib/python3.12/wave.py +653 -0
  1967. package/python-runtime/python/lib/python3.12/weakref.py +674 -0
  1968. package/python-runtime/python/lib/python3.12/webbrowser.py +689 -0
  1969. package/python-runtime/python/lib/python3.12/xdrlib.py +242 -0
  1970. package/python-runtime/python/lib/python3.12/xml/__init__.py +20 -0
  1971. package/python-runtime/python/lib/python3.12/xml/dom/NodeFilter.py +27 -0
  1972. package/python-runtime/python/lib/python3.12/xml/dom/__init__.py +140 -0
  1973. package/python-runtime/python/lib/python3.12/xml/dom/domreg.py +99 -0
  1974. package/python-runtime/python/lib/python3.12/xml/dom/expatbuilder.py +962 -0
  1975. package/python-runtime/python/lib/python3.12/xml/dom/minicompat.py +109 -0
  1976. package/python-runtime/python/lib/python3.12/xml/dom/minidom.py +2008 -0
  1977. package/python-runtime/python/lib/python3.12/xml/dom/pulldom.py +336 -0
  1978. package/python-runtime/python/lib/python3.12/xml/dom/xmlbuilder.py +389 -0
  1979. package/python-runtime/python/lib/python3.12/xml/etree/ElementInclude.py +186 -0
  1980. package/python-runtime/python/lib/python3.12/xml/etree/ElementPath.py +423 -0
  1981. package/python-runtime/python/lib/python3.12/xml/etree/ElementTree.py +2085 -0
  1982. package/python-runtime/python/lib/python3.12/xml/etree/__init__.py +33 -0
  1983. package/python-runtime/python/lib/python3.12/xml/etree/cElementTree.py +3 -0
  1984. package/python-runtime/python/lib/python3.12/xml/parsers/__init__.py +8 -0
  1985. package/python-runtime/python/lib/python3.12/xml/parsers/expat.py +8 -0
  1986. package/python-runtime/python/lib/python3.12/xml/sax/__init__.py +94 -0
  1987. package/python-runtime/python/lib/python3.12/xml/sax/_exceptions.py +127 -0
  1988. package/python-runtime/python/lib/python3.12/xml/sax/expatreader.py +454 -0
  1989. package/python-runtime/python/lib/python3.12/xml/sax/handler.py +387 -0
  1990. package/python-runtime/python/lib/python3.12/xml/sax/saxutils.py +369 -0
  1991. package/python-runtime/python/lib/python3.12/xml/sax/xmlreader.py +378 -0
  1992. package/python-runtime/python/lib/python3.12/zipapp.py +206 -0
  1993. package/python-runtime/python/lib/python3.12/zipfile/__init__.py +2340 -0
  1994. package/python-runtime/python/lib/python3.12/zipfile/__main__.py +4 -0
  1995. package/python-runtime/python/lib/python3.12/zipfile/_path/__init__.py +412 -0
  1996. package/python-runtime/python/lib/python3.12/zipfile/_path/glob.py +53 -0
  1997. package/python-runtime/python/lib/python3.12/zipimport.py +712 -0
  1998. package/python-runtime/python/lib/python3.12/zoneinfo/__init__.py +31 -0
  1999. package/python-runtime/python/lib/python3.12/zoneinfo/_common.py +164 -0
  2000. package/python-runtime/python/lib/python3.12/zoneinfo/_tzpath.py +181 -0
  2001. package/python-runtime/python/lib/python3.12/zoneinfo/_zoneinfo.py +772 -0
  2002. package/python-runtime/python/lib/tcl9/9.0/http-2.10.1.tm +5475 -0
  2003. package/python-runtime/python/lib/tcl9/9.0/msgcat-1.7.1.tm +1349 -0
  2004. package/python-runtime/python/lib/tcl9/9.0/platform/shell-1.1.4.tm +241 -0
  2005. package/python-runtime/python/lib/tcl9/9.0/platform-1.1.0.tm +443 -0
  2006. package/python-runtime/python/lib/tcl9/9.0/tcltest-2.5.10.tm +3588 -0
  2007. package/python-runtime/python/lib/tcl9.0/auto.tcl +711 -0
  2008. package/python-runtime/python/lib/tcl9.0/clock.tcl +2110 -0
  2009. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/cookiejar.tcl +746 -0
  2010. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/idna.tcl +292 -0
  2011. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/pkgIndex.tcl +3 -0
  2012. package/python-runtime/python/lib/tcl9.0/cookiejar0.2/public_suffix_list.dat.gz +0 -0
  2013. package/python-runtime/python/lib/tcl9.0/encoding/ascii.enc +20 -0
  2014. package/python-runtime/python/lib/tcl9.0/encoding/big5.enc +1516 -0
  2015. package/python-runtime/python/lib/tcl9.0/encoding/cns11643.enc +1584 -0
  2016. package/python-runtime/python/lib/tcl9.0/encoding/cp1250.enc +20 -0
  2017. package/python-runtime/python/lib/tcl9.0/encoding/cp1251.enc +20 -0
  2018. package/python-runtime/python/lib/tcl9.0/encoding/cp1252.enc +20 -0
  2019. package/python-runtime/python/lib/tcl9.0/encoding/cp1253.enc +20 -0
  2020. package/python-runtime/python/lib/tcl9.0/encoding/cp1254.enc +20 -0
  2021. package/python-runtime/python/lib/tcl9.0/encoding/cp1255.enc +20 -0
  2022. package/python-runtime/python/lib/tcl9.0/encoding/cp1256.enc +20 -0
  2023. package/python-runtime/python/lib/tcl9.0/encoding/cp1257.enc +20 -0
  2024. package/python-runtime/python/lib/tcl9.0/encoding/cp1258.enc +20 -0
  2025. package/python-runtime/python/lib/tcl9.0/encoding/cp165.enc +20 -0
  2026. package/python-runtime/python/lib/tcl9.0/encoding/cp437.enc +20 -0
  2027. package/python-runtime/python/lib/tcl9.0/encoding/cp737.enc +20 -0
  2028. package/python-runtime/python/lib/tcl9.0/encoding/cp775.enc +20 -0
  2029. package/python-runtime/python/lib/tcl9.0/encoding/cp850.enc +20 -0
  2030. package/python-runtime/python/lib/tcl9.0/encoding/cp852.enc +20 -0
  2031. package/python-runtime/python/lib/tcl9.0/encoding/cp855.enc +20 -0
  2032. package/python-runtime/python/lib/tcl9.0/encoding/cp857.enc +20 -0
  2033. package/python-runtime/python/lib/tcl9.0/encoding/cp860.enc +20 -0
  2034. package/python-runtime/python/lib/tcl9.0/encoding/cp861.enc +20 -0
  2035. package/python-runtime/python/lib/tcl9.0/encoding/cp862.enc +20 -0
  2036. package/python-runtime/python/lib/tcl9.0/encoding/cp863.enc +20 -0
  2037. package/python-runtime/python/lib/tcl9.0/encoding/cp864.enc +20 -0
  2038. package/python-runtime/python/lib/tcl9.0/encoding/cp865.enc +20 -0
  2039. package/python-runtime/python/lib/tcl9.0/encoding/cp866.enc +20 -0
  2040. package/python-runtime/python/lib/tcl9.0/encoding/cp869.enc +20 -0
  2041. package/python-runtime/python/lib/tcl9.0/encoding/cp874.enc +20 -0
  2042. package/python-runtime/python/lib/tcl9.0/encoding/cp932.enc +801 -0
  2043. package/python-runtime/python/lib/tcl9.0/encoding/cp936.enc +2162 -0
  2044. package/python-runtime/python/lib/tcl9.0/encoding/cp949.enc +2128 -0
  2045. package/python-runtime/python/lib/tcl9.0/encoding/cp950.enc +1499 -0
  2046. package/python-runtime/python/lib/tcl9.0/encoding/dingbats.enc +20 -0
  2047. package/python-runtime/python/lib/tcl9.0/encoding/ebcdic.enc +20 -0
  2048. package/python-runtime/python/lib/tcl9.0/encoding/euc-cn.enc +1397 -0
  2049. package/python-runtime/python/lib/tcl9.0/encoding/euc-jp.enc +1353 -0
  2050. package/python-runtime/python/lib/tcl9.0/encoding/euc-kr.enc +1533 -0
  2051. package/python-runtime/python/lib/tcl9.0/encoding/gb12345.enc +1414 -0
  2052. package/python-runtime/python/lib/tcl9.0/encoding/gb1988.enc +20 -0
  2053. package/python-runtime/python/lib/tcl9.0/encoding/gb2312-raw.enc +1380 -0
  2054. package/python-runtime/python/lib/tcl9.0/encoding/gb2312.enc +1397 -0
  2055. package/python-runtime/python/lib/tcl9.0/encoding/iso2022-jp.enc +12 -0
  2056. package/python-runtime/python/lib/tcl9.0/encoding/iso2022-kr.enc +7 -0
  2057. package/python-runtime/python/lib/tcl9.0/encoding/iso2022.enc +14 -0
  2058. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-1.enc +20 -0
  2059. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-10.enc +20 -0
  2060. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-11.enc +20 -0
  2061. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-13.enc +20 -0
  2062. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-14.enc +20 -0
  2063. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-15.enc +20 -0
  2064. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-16.enc +20 -0
  2065. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-2.enc +20 -0
  2066. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-3.enc +20 -0
  2067. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-4.enc +20 -0
  2068. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-5.enc +20 -0
  2069. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-6.enc +20 -0
  2070. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-7.enc +20 -0
  2071. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-8.enc +20 -0
  2072. package/python-runtime/python/lib/tcl9.0/encoding/iso8859-9.enc +20 -0
  2073. package/python-runtime/python/lib/tcl9.0/encoding/jis0201.enc +20 -0
  2074. package/python-runtime/python/lib/tcl9.0/encoding/jis0208.enc +1319 -0
  2075. package/python-runtime/python/lib/tcl9.0/encoding/jis0212.enc +1159 -0
  2076. package/python-runtime/python/lib/tcl9.0/encoding/koi8-r.enc +20 -0
  2077. package/python-runtime/python/lib/tcl9.0/encoding/koi8-ru.enc +20 -0
  2078. package/python-runtime/python/lib/tcl9.0/encoding/koi8-t.enc +20 -0
  2079. package/python-runtime/python/lib/tcl9.0/encoding/koi8-u.enc +20 -0
  2080. package/python-runtime/python/lib/tcl9.0/encoding/ksc5601.enc +1516 -0
  2081. package/python-runtime/python/lib/tcl9.0/encoding/macCentEuro.enc +20 -0
  2082. package/python-runtime/python/lib/tcl9.0/encoding/macCroatian.enc +20 -0
  2083. package/python-runtime/python/lib/tcl9.0/encoding/macCyrillic.enc +20 -0
  2084. package/python-runtime/python/lib/tcl9.0/encoding/macDingbats.enc +20 -0
  2085. package/python-runtime/python/lib/tcl9.0/encoding/macGreek.enc +20 -0
  2086. package/python-runtime/python/lib/tcl9.0/encoding/macIceland.enc +20 -0
  2087. package/python-runtime/python/lib/tcl9.0/encoding/macJapan.enc +785 -0
  2088. package/python-runtime/python/lib/tcl9.0/encoding/macRoman.enc +20 -0
  2089. package/python-runtime/python/lib/tcl9.0/encoding/macRomania.enc +20 -0
  2090. package/python-runtime/python/lib/tcl9.0/encoding/macThai.enc +20 -0
  2091. package/python-runtime/python/lib/tcl9.0/encoding/macTurkish.enc +20 -0
  2092. package/python-runtime/python/lib/tcl9.0/encoding/macUkraine.enc +20 -0
  2093. package/python-runtime/python/lib/tcl9.0/encoding/shiftjis.enc +690 -0
  2094. package/python-runtime/python/lib/tcl9.0/encoding/symbol.enc +20 -0
  2095. package/python-runtime/python/lib/tcl9.0/encoding/tis-620.enc +20 -0
  2096. package/python-runtime/python/lib/tcl9.0/foreachline.tcl +25 -0
  2097. package/python-runtime/python/lib/tcl9.0/history.tcl +335 -0
  2098. package/python-runtime/python/lib/tcl9.0/icu.tcl +145 -0
  2099. package/python-runtime/python/lib/tcl9.0/init.tcl +773 -0
  2100. package/python-runtime/python/lib/tcl9.0/install.tcl +275 -0
  2101. package/python-runtime/python/lib/tcl9.0/opt0.4/optparse.tcl +1069 -0
  2102. package/python-runtime/python/lib/tcl9.0/opt0.4/pkgIndex.tcl +12 -0
  2103. package/python-runtime/python/lib/tcl9.0/package.tcl +767 -0
  2104. package/python-runtime/python/lib/tcl9.0/parray.tcl +28 -0
  2105. package/python-runtime/python/lib/tcl9.0/readfile.tcl +23 -0
  2106. package/python-runtime/python/lib/tcl9.0/safe.tcl +1461 -0
  2107. package/python-runtime/python/lib/tcl9.0/tclAppInit.c +183 -0
  2108. package/python-runtime/python/lib/tcl9.0/tclIndex +112 -0
  2109. package/python-runtime/python/lib/tcl9.0/tm.tcl +378 -0
  2110. package/python-runtime/python/lib/tcl9.0/word.tcl +155 -0
  2111. package/python-runtime/python/lib/tcl9.0/writefile.tcl +37 -0
  2112. package/python-runtime/python/lib/thread3.0.4/libtcl9thread3.0.4.dylib +0 -0
  2113. package/python-runtime/python/lib/thread3.0.4/libthread3.0.4.dylib +0 -0
  2114. package/python-runtime/python/lib/thread3.0.4/pkgIndex.tcl +52 -0
  2115. package/python-runtime/python/lib/thread3.0.4/ttrace.tcl +943 -0
  2116. package/python-runtime/python/lib/tk9.0/bgerror.tcl +282 -0
  2117. package/python-runtime/python/lib/tk9.0/button.tcl +782 -0
  2118. package/python-runtime/python/lib/tk9.0/choosedir.tcl +310 -0
  2119. package/python-runtime/python/lib/tk9.0/clrpick.tcl +696 -0
  2120. package/python-runtime/python/lib/tk9.0/comdlg.tcl +322 -0
  2121. package/python-runtime/python/lib/tk9.0/console.tcl +1148 -0
  2122. package/python-runtime/python/lib/tk9.0/dialog.tcl +175 -0
  2123. package/python-runtime/python/lib/tk9.0/entry.tcl +720 -0
  2124. package/python-runtime/python/lib/tk9.0/focus.tcl +178 -0
  2125. package/python-runtime/python/lib/tk9.0/fontchooser.tcl +512 -0
  2126. package/python-runtime/python/lib/tk9.0/iconbadges.tcl +253 -0
  2127. package/python-runtime/python/lib/tk9.0/iconlist.tcl +705 -0
  2128. package/python-runtime/python/lib/tk9.0/icons.tcl +54 -0
  2129. package/python-runtime/python/lib/tk9.0/images/README +7 -0
  2130. package/python-runtime/python/lib/tk9.0/images/logo.eps +2091 -0
  2131. package/python-runtime/python/lib/tk9.0/images/logo100.gif +0 -0
  2132. package/python-runtime/python/lib/tk9.0/images/logo64.gif +0 -0
  2133. package/python-runtime/python/lib/tk9.0/images/logoLarge.gif +0 -0
  2134. package/python-runtime/python/lib/tk9.0/images/logoMed.gif +0 -0
  2135. package/python-runtime/python/lib/tk9.0/images/pwrdLogo.eps +1897 -0
  2136. package/python-runtime/python/lib/tk9.0/images/pwrdLogo100.gif +0 -0
  2137. package/python-runtime/python/lib/tk9.0/images/pwrdLogo150.gif +0 -0
  2138. package/python-runtime/python/lib/tk9.0/images/pwrdLogo175.gif +0 -0
  2139. package/python-runtime/python/lib/tk9.0/images/pwrdLogo200.gif +0 -0
  2140. package/python-runtime/python/lib/tk9.0/images/pwrdLogo75.gif +0 -0
  2141. package/python-runtime/python/lib/tk9.0/images/tai-ku.gif +0 -0
  2142. package/python-runtime/python/lib/tk9.0/listbox.tcl +522 -0
  2143. package/python-runtime/python/lib/tk9.0/megawidget.tcl +297 -0
  2144. package/python-runtime/python/lib/tk9.0/menu.tcl +1376 -0
  2145. package/python-runtime/python/lib/tk9.0/mkpsenc.tcl +1488 -0
  2146. package/python-runtime/python/lib/tk9.0/msgbox.tcl +454 -0
  2147. package/python-runtime/python/lib/tk9.0/optMenu.tcl +43 -0
  2148. package/python-runtime/python/lib/tk9.0/palette.tcl +283 -0
  2149. package/python-runtime/python/lib/tk9.0/panedwindow.tcl +194 -0
  2150. package/python-runtime/python/lib/tk9.0/pkgIndex.tcl +3 -0
  2151. package/python-runtime/python/lib/tk9.0/print.tcl +1460 -0
  2152. package/python-runtime/python/lib/tk9.0/safetk.tcl +262 -0
  2153. package/python-runtime/python/lib/tk9.0/scale.tcl +299 -0
  2154. package/python-runtime/python/lib/tk9.0/scaling.tcl +232 -0
  2155. package/python-runtime/python/lib/tk9.0/scrlbar.tcl +500 -0
  2156. package/python-runtime/python/lib/tk9.0/spinbox.tcl +580 -0
  2157. package/python-runtime/python/lib/tk9.0/systray.tcl +483 -0
  2158. package/python-runtime/python/lib/tk9.0/tclIndex +252 -0
  2159. package/python-runtime/python/lib/tk9.0/tearoff.tcl +155 -0
  2160. package/python-runtime/python/lib/tk9.0/text.tcl +1295 -0
  2161. package/python-runtime/python/lib/tk9.0/tk.tcl +853 -0
  2162. package/python-runtime/python/lib/tk9.0/tkAppInit.c +200 -0
  2163. package/python-runtime/python/lib/tk9.0/tkfbox.tcl +1251 -0
  2164. package/python-runtime/python/lib/tk9.0/ttk/altTheme.tcl +153 -0
  2165. package/python-runtime/python/lib/tk9.0/ttk/aquaTheme.tcl +178 -0
  2166. package/python-runtime/python/lib/tk9.0/ttk/button.tcl +83 -0
  2167. package/python-runtime/python/lib/tk9.0/ttk/clamTheme.tcl +196 -0
  2168. package/python-runtime/python/lib/tk9.0/ttk/classicTheme.tcl +145 -0
  2169. package/python-runtime/python/lib/tk9.0/ttk/combobox.tcl +555 -0
  2170. package/python-runtime/python/lib/tk9.0/ttk/cursors.tcl +205 -0
  2171. package/python-runtime/python/lib/tk9.0/ttk/defaults.tcl +231 -0
  2172. package/python-runtime/python/lib/tk9.0/ttk/entry.tcl +678 -0
  2173. package/python-runtime/python/lib/tk9.0/ttk/fonts.tcl +152 -0
  2174. package/python-runtime/python/lib/tk9.0/ttk/menubutton.tcl +237 -0
  2175. package/python-runtime/python/lib/tk9.0/ttk/notebook.tcl +255 -0
  2176. package/python-runtime/python/lib/tk9.0/ttk/panedwindow.tcl +89 -0
  2177. package/python-runtime/python/lib/tk9.0/ttk/progress.tcl +55 -0
  2178. package/python-runtime/python/lib/tk9.0/ttk/scale.tcl +94 -0
  2179. package/python-runtime/python/lib/tk9.0/ttk/scrollbar.tcl +119 -0
  2180. package/python-runtime/python/lib/tk9.0/ttk/sizegrip.tcl +102 -0
  2181. package/python-runtime/python/lib/tk9.0/ttk/spinbox.tcl +204 -0
  2182. package/python-runtime/python/lib/tk9.0/ttk/treeview.tcl +464 -0
  2183. package/python-runtime/python/lib/tk9.0/ttk/ttk.tcl +223 -0
  2184. package/python-runtime/python/lib/tk9.0/ttk/utils.tcl +317 -0
  2185. package/python-runtime/python/lib/tk9.0/ttk/vistaTheme.tcl +259 -0
  2186. package/python-runtime/python/lib/tk9.0/ttk/winTheme.tcl +119 -0
  2187. package/python-runtime/python/lib/tk9.0/ttk/xpTheme.tcl +95 -0
  2188. package/python-runtime/python/lib/tk9.0/xmfbox.tcl +982 -0
  2189. package/python-runtime/python/share/man/man1/python3.1 +630 -0
  2190. package/python-runtime/python/share/man/man1/python3.12.1 +630 -0
  2191. package/runtime.json +8768 -0
  2192. package/README.md +0 -3
@@ -0,0 +1,3053 @@
1
+ """Convert python types to pydantic-core schema."""
2
+
3
+ from __future__ import annotations as _annotations
4
+
5
+ import collections.abc
6
+ import dataclasses
7
+ import datetime
8
+ import inspect
9
+ import os
10
+ import pathlib
11
+ import re
12
+ import sys
13
+ import typing
14
+ import warnings
15
+ from collections.abc import Callable, Generator, Iterable, Iterator, Mapping
16
+ from copy import copy
17
+ from decimal import Decimal
18
+ from enum import Enum
19
+ from fractions import Fraction
20
+ from functools import partial
21
+ from inspect import Parameter, _ParameterKind
22
+ from ipaddress import IPv4Address, IPv4Interface, IPv4Network, IPv6Address, IPv6Interface, IPv6Network
23
+ from itertools import chain
24
+ from operator import attrgetter
25
+ from types import EllipsisType, FunctionType, GenericAlias, LambdaType, MethodType, NoneType
26
+ from typing import (
27
+ TYPE_CHECKING,
28
+ Any,
29
+ ClassVar,
30
+ ForwardRef,
31
+ Literal,
32
+ TypeAlias,
33
+ TypeVar,
34
+ cast,
35
+ overload,
36
+ )
37
+ from uuid import UUID
38
+ from zoneinfo import ZoneInfo
39
+
40
+ import typing_extensions
41
+ from pydantic_core import (
42
+ MISSING,
43
+ CoreSchema,
44
+ MultiHostUrl,
45
+ PydanticCustomError,
46
+ PydanticSerializationUnexpectedValue,
47
+ PydanticUndefined,
48
+ Url,
49
+ core_schema,
50
+ to_jsonable_python,
51
+ )
52
+ from typing_extensions import ( # noqa: UP035 (for `get_args` and `get_origin`)
53
+ TypeAliasType,
54
+ get_args,
55
+ get_origin,
56
+ is_typeddict,
57
+ )
58
+ from typing_inspection import typing_objects
59
+ from typing_inspection.introspection import AnnotationSource, get_literal_values, is_union_origin
60
+
61
+ from ..aliases import AliasChoices, AliasPath
62
+ from ..annotated_handlers import GetCoreSchemaHandler, GetJsonSchemaHandler
63
+ from ..config import ConfigDict, JsonDict, JsonEncoder, JsonSchemaExtraCallable
64
+ from ..errors import (
65
+ PydanticForbiddenQualifier,
66
+ PydanticInvalidForJsonSchema,
67
+ PydanticSchemaGenerationError,
68
+ PydanticUndefinedAnnotation,
69
+ PydanticUserError,
70
+ )
71
+ from ..functional_validators import AfterValidator, BeforeValidator, FieldValidatorModes, PlainValidator, WrapValidator
72
+ from ..json_schema import JsonSchemaValue
73
+ from ..version import version_short
74
+ from ..warnings import (
75
+ ArbitraryTypeWarning,
76
+ PydanticDeprecatedSince20,
77
+ TypedDictExtraConfigWarning,
78
+ UnsupportedFieldAttributeWarning,
79
+ )
80
+ from . import _decorators, _discriminated_union, _known_annotated_metadata, _repr, _type_refs, _typing_extra
81
+ from ._config import ConfigWrapper, ConfigWrapperStack
82
+ from ._contextlib import contextmanager
83
+ from ._core_metadata import CoreMetadata, update_core_metadata
84
+ from ._core_utils import (
85
+ get_ref,
86
+ is_list_like_schema_with_items_schema,
87
+ )
88
+ from ._decorators import (
89
+ Decorator,
90
+ DecoratorInfos,
91
+ FieldSerializerDecoratorInfo,
92
+ FieldValidatorDecoratorInfo,
93
+ ModelSerializerDecoratorInfo,
94
+ ModelValidatorDecoratorInfo,
95
+ RootValidatorDecoratorInfo,
96
+ ValidatorDecoratorInfo,
97
+ get_attribute_from_bases,
98
+ inspect_field_serializer,
99
+ inspect_model_serializer,
100
+ inspect_validator,
101
+ mro,
102
+ )
103
+ from ._docs_extraction import extract_docstrings_from_cls
104
+ from ._fields import (
105
+ collect_dataclass_fields,
106
+ rebuild_dataclass_fields,
107
+ rebuild_model_fields,
108
+ takes_validated_data_argument,
109
+ update_field_from_config,
110
+ )
111
+ from ._forward_ref import PydanticRecursiveRef
112
+ from ._generics import get_model_typevars_map, get_standard_typevars_map, replace_types
113
+ from ._import_utils import import_cached_base_model, import_cached_field_info
114
+ from ._mock_val_ser import MockCoreSchema
115
+ from ._namespace_utils import NamespacesTuple, NsResolver
116
+ from ._schema_gather import MissingDefinitionError, gather_schemas_for_cleaning
117
+ from ._schema_generation_shared import CallbackGetCoreSchemaHandler
118
+ from ._utils import lenient_issubclass, smart_deepcopy
119
+
120
+ if TYPE_CHECKING:
121
+ from ..fields import ComputedFieldInfo, FieldInfo
122
+ from ..main import BaseModel
123
+ from ..types import Discriminator
124
+ from ._dataclasses import StandardDataclass
125
+ from ._schema_generation_shared import GetJsonSchemaFunction
126
+
127
+ if sys.version_info >= (3, 15):
128
+ from builtins import frozendict
129
+
130
+ _SUPPORTS_TYPEDDICT = sys.version_info >= (3, 12)
131
+
132
+ FieldDecoratorInfo: TypeAlias = ValidatorDecoratorInfo | FieldValidatorDecoratorInfo | FieldSerializerDecoratorInfo
133
+ FieldDecoratorInfoType = TypeVar('FieldDecoratorInfoType', bound=FieldDecoratorInfo)
134
+ AnyFieldDecorator = (
135
+ Decorator[ValidatorDecoratorInfo] | Decorator[FieldValidatorDecoratorInfo] | Decorator[FieldSerializerDecoratorInfo]
136
+ )
137
+
138
+ ModifyCoreSchemaWrapHandler: TypeAlias = GetCoreSchemaHandler
139
+ GetCoreSchemaFunction: TypeAlias = Callable[[Any, ModifyCoreSchemaWrapHandler], core_schema.CoreSchema]
140
+ ParametersCallback: TypeAlias = Callable[[int, str, Any], Literal['skip'] | None]
141
+
142
+ TUPLE_TYPES: list[type] = [typing.Tuple, tuple] # noqa: UP006
143
+ _NONE_SCHEMA = core_schema.none_schema()
144
+ _CALLABLE_SCHEMA = core_schema.callable_schema()
145
+
146
+
147
+ _SIMPLE_SCHEMA_TYPES: frozenset[type[Any]] = frozenset(
148
+ {
149
+ str,
150
+ int,
151
+ bool,
152
+ float,
153
+ bytes,
154
+ complex,
155
+ NoneType,
156
+ object,
157
+ type,
158
+ EllipsisType,
159
+ re.Pattern,
160
+ datetime.datetime,
161
+ datetime.date,
162
+ datetime.time,
163
+ datetime.timedelta,
164
+ Decimal,
165
+ ZoneInfo,
166
+ }
167
+ )
168
+ """Exact types handled directly, without checking for `__get_pydantic_core_schema__()`/`__get_pydantic_json_schema__()` methods."""
169
+
170
+
171
+ def _is_simple_schema_type(obj: Any) -> bool:
172
+ return obj is None or (type(obj) is type and obj in _SIMPLE_SCHEMA_TYPES)
173
+
174
+
175
+ def _copy_schema_handler(schema: CoreSchema) -> Callable[[GenerateSchema, Any], CoreSchema]:
176
+ """Return fresh copies of a fixed schema made only of immutable values."""
177
+
178
+ def handler(self: GenerateSchema, obj: Any) -> CoreSchema:
179
+ return schema.copy()
180
+
181
+ return handler
182
+
183
+
184
+ # Note: This does not play very well with type checkers. For example,
185
+ # `a: LambdaType = lambda x: x` will raise a type error by Pyright.
186
+ ValidateCallSupportedTypes: TypeAlias = LambdaType | FunctionType | MethodType | partial
187
+
188
+
189
+ VALIDATE_CALL_SUPPORTED_TYPES = get_args(ValidateCallSupportedTypes)
190
+ UNSUPPORTED_STANDALONE_FIELDINFO_ATTRIBUTES: list[tuple[str, Any]] = [
191
+ ('alias', None),
192
+ ('validation_alias', None),
193
+ ('serialization_alias', None),
194
+ # will be set if any alias is set, so disable it to avoid double warnings:
195
+ # 'alias_priority',
196
+ ('default', PydanticUndefined),
197
+ ('default_factory', None),
198
+ ('exclude', None),
199
+ ('deprecated', None),
200
+ ('repr', True),
201
+ ('validate_default', None),
202
+ ('frozen', None),
203
+ ('init', None),
204
+ ('init_var', None),
205
+ ('kw_only', None),
206
+ ]
207
+ """`FieldInfo` attributes (and their default value) that can't be used outside of a model (e.g. in a type adapter or a PEP 695 type alias)."""
208
+
209
+ _mode_to_validator: dict[
210
+ FieldValidatorModes, type[BeforeValidator | AfterValidator | PlainValidator | WrapValidator]
211
+ ] = {'before': BeforeValidator, 'after': AfterValidator, 'plain': PlainValidator, 'wrap': WrapValidator}
212
+
213
+
214
+ def check_validator_fields_against_field_name(
215
+ info: FieldDecoratorInfo,
216
+ field: str,
217
+ ) -> bool:
218
+ """Check if field name is in validator fields.
219
+
220
+ Args:
221
+ info: The field info.
222
+ field: The field name to check.
223
+
224
+ Returns:
225
+ `True` if field name is in validator fields, `False` otherwise.
226
+ """
227
+ fields = info.fields
228
+ return '*' in fields or field in fields
229
+
230
+
231
+ def check_decorator_fields_exist(decorators: Iterable[AnyFieldDecorator], fields: Iterable[str]) -> None:
232
+ """Check if the defined fields in decorators exist in `fields` param.
233
+
234
+ It ignores the check for a decorator if the decorator has `*` as field or `check_fields=False`.
235
+
236
+ Args:
237
+ decorators: An iterable of decorators.
238
+ fields: An iterable of fields name.
239
+
240
+ Raises:
241
+ PydanticUserError: If one of the field names does not exist in `fields` param.
242
+ """
243
+ fields = set(fields)
244
+ for dec in decorators:
245
+ if '*' in dec.info.fields:
246
+ continue
247
+ if dec.info.check_fields is False:
248
+ continue
249
+ for field in dec.info.fields:
250
+ if field not in fields:
251
+ raise PydanticUserError(
252
+ f'Decorators defined with incorrect fields: {dec.cls_ref}.{dec.cls_var_name}'
253
+ " (use check_fields=False if you're inheriting from the model and intended this)",
254
+ code='decorator-missing-field',
255
+ )
256
+
257
+
258
+ def filter_field_decorator_info_by_field(
259
+ validator_functions: Iterable[Decorator[FieldDecoratorInfoType]], field: str
260
+ ) -> list[Decorator[FieldDecoratorInfoType]]:
261
+ return [dec for dec in validator_functions if check_validator_fields_against_field_name(dec.info, field)]
262
+
263
+
264
+ def apply_each_item_validators(
265
+ schema: core_schema.CoreSchema,
266
+ each_item_validators: list[Decorator[ValidatorDecoratorInfo]],
267
+ ) -> core_schema.CoreSchema:
268
+ # This V1 compatibility shim should eventually be removed
269
+
270
+ # fail early if each_item_validators is empty
271
+ if not each_item_validators:
272
+ return schema
273
+
274
+ # push down any `each_item=True` validators
275
+ # note that this won't work for any Annotated types that get wrapped by a function validator
276
+ # but that's okay because that didn't exist in V1
277
+ if schema['type'] == 'nullable':
278
+ schema['schema'] = apply_each_item_validators(schema['schema'], each_item_validators)
279
+ return schema
280
+ elif schema['type'] == 'missing-sentinel' and 'schema' in schema:
281
+ schema['schema'] = apply_each_item_validators(schema['schema'], each_item_validators)
282
+ return schema
283
+ elif schema['type'] == 'tuple':
284
+ if (variadic_item_index := schema.get('variadic_item_index')) is not None:
285
+ schema['items_schema'][variadic_item_index] = apply_validators(
286
+ schema['items_schema'][variadic_item_index],
287
+ each_item_validators,
288
+ )
289
+ elif is_list_like_schema_with_items_schema(schema):
290
+ inner_schema = schema.get('items_schema', core_schema.any_schema())
291
+ schema['items_schema'] = apply_validators(inner_schema, each_item_validators)
292
+ elif schema['type'] == 'dict':
293
+ inner_schema = schema.get('values_schema', core_schema.any_schema())
294
+ schema['values_schema'] = apply_validators(inner_schema, each_item_validators)
295
+ else:
296
+ raise TypeError(
297
+ f'`@validator(..., each_item=True)` cannot be applied to fields with a schema of {schema["type"]}'
298
+ )
299
+ return schema
300
+
301
+
302
+ def _extract_json_schema_info_from_field_info(
303
+ info: FieldInfo | ComputedFieldInfo,
304
+ ) -> tuple[JsonDict | None, JsonDict | JsonSchemaExtraCallable | None]:
305
+ json_schema_updates = {
306
+ 'title': info.title,
307
+ 'description': info.description,
308
+ 'deprecated': bool(info.deprecated) or info.deprecated == '' or None,
309
+ 'examples': to_jsonable_python(info.examples),
310
+ }
311
+ json_schema_updates = {k: v for k, v in json_schema_updates.items() if v is not None}
312
+ return (json_schema_updates or None, info.json_schema_extra)
313
+
314
+
315
+ JsonEncoders = dict[type[Any], JsonEncoder]
316
+
317
+
318
+ def _add_custom_serialization_from_json_encoders(
319
+ json_encoders: JsonEncoders | None, tp: Any, schema: CoreSchema
320
+ ) -> CoreSchema:
321
+ """Iterate over the json_encoders and add the first matching encoder to the schema.
322
+
323
+ Args:
324
+ json_encoders: A dictionary of types and their encoder functions.
325
+ tp: The type to check for a matching encoder.
326
+ schema: The schema to add the encoder to.
327
+ """
328
+ if not json_encoders:
329
+ return schema
330
+ if 'serialization' in schema:
331
+ return schema
332
+ # Check the class type and its superclasses for a matching encoder
333
+ # Decimal.__class__.__mro__ (and probably other cases) doesn't include Decimal itself
334
+ # if the type is a GenericAlias (e.g. from list[int]) we need to use __class__ instead of .__mro__
335
+ for base in (tp, *getattr(tp, '__mro__', tp.__class__.__mro__)[:-1]):
336
+ encoder = json_encoders.get(base)
337
+ if encoder is None:
338
+ continue
339
+
340
+ warnings.warn(
341
+ f'`json_encoders` is deprecated. See https://pydantic.dev/docs/validation/{version_short()}/concepts/serialization/#custom-serializers for alternatives',
342
+ PydanticDeprecatedSince20,
343
+ )
344
+
345
+ # TODO: in theory we should check that the schema accepts a serialization key
346
+ schema['serialization'] = core_schema.plain_serializer_function_ser_schema(encoder, when_used='json')
347
+ return schema
348
+
349
+ return schema
350
+
351
+
352
+ GENERATE_SCHEMA_ERRORS = (
353
+ PydanticForbiddenQualifier,
354
+ PydanticInvalidForJsonSchema,
355
+ PydanticSchemaGenerationError,
356
+ PydanticUndefinedAnnotation,
357
+ )
358
+ """Errors raised during core schema generation. This does *not* include `InvalidSchemaError`, which is raised during schema cleaning."""
359
+
360
+
361
+ def _get_typed_dict_extra_items(typed_dict_cls: type[Any]) -> tuple[bool, Any, bool]:
362
+ """Return whether the TypedDict class is closed, the type of its extra items and whether
363
+ they are read-only (as per PEP 728).
364
+
365
+ The `__closed__` and `__extra_items__` attributes only reflect the arguments passed to the class itself,
366
+ so the first class in the (virtual) MRO explicitly specifying one of them is used.
367
+ `extra_items=Never` is normalized to `closed=True`, and the `ReadOnly` qualifier is stripped.
368
+ """
369
+ for base in mro(typed_dict_cls):
370
+ # `__closed__` is `None` when not specified:
371
+ closed = base.__dict__.get('__closed__')
372
+ extra_items = base.__dict__.get('__extra_items__', typing_extensions.NoExtraItems)
373
+ if closed is not None or not typing_objects.is_noextraitems(extra_items):
374
+ break
375
+ else:
376
+ return False, typing_extensions.NoExtraItems, False
377
+
378
+ if closed is not None:
379
+ # `closed` and `extra_items` can't be used together:
380
+ return closed, typing_extensions.NoExtraItems, False
381
+
382
+ readonly = typing_objects.is_readonly(get_origin(extra_items))
383
+ if readonly:
384
+ extra_items = get_args(extra_items)[0]
385
+ # TODO: `Never` wrapped in a type alias (e.g. `type NoExtras = Never`) or in `Annotated` isn't detected here,
386
+ # and fails during schema generation. Unwrapping should only apply to this check (to preserve alias handling).
387
+ if typing_objects.is_never(extra_items):
388
+ return True, typing_extensions.NoExtraItems, False
389
+ return False, extra_items, readonly
390
+
391
+
392
+ class InvalidSchemaError(Exception):
393
+ """The core schema is invalid."""
394
+
395
+
396
+ class GenerateSchema:
397
+ """Generate core schema for a Pydantic model, dataclass and types like `str`, `datetime`, ... ."""
398
+
399
+ __slots__ = (
400
+ '_config_wrapper_stack',
401
+ '_ns_resolver',
402
+ '_typevars_map',
403
+ 'field_name_stack',
404
+ 'model_type_stack',
405
+ 'defs',
406
+ )
407
+
408
+ def __init__(
409
+ self,
410
+ config_wrapper: ConfigWrapper,
411
+ ns_resolver: NsResolver | None = None,
412
+ typevars_map: Mapping[TypeVar, Any] | None = None,
413
+ ) -> None:
414
+ # we need a stack for recursing into nested models
415
+ self._config_wrapper_stack = ConfigWrapperStack(config_wrapper)
416
+ self._ns_resolver = ns_resolver or NsResolver()
417
+ self._typevars_map = typevars_map
418
+ self.field_name_stack = _FieldNameStack()
419
+ self.model_type_stack = _ModelTypeStack()
420
+ self.defs = _Definitions()
421
+
422
+ # The handler lambdas take the `GenerateSchema` instance as their first argument, so that
423
+ # the dicts can be built once at class creation time and shared by all instances:
424
+ _handlers: ClassVar[dict[Any, Callable[[GenerateSchema, Any], core_schema.CoreSchema]]] = {
425
+ str: _copy_schema_handler(core_schema.str_schema()),
426
+ bytes: _copy_schema_handler(core_schema.bytes_schema()),
427
+ int: _copy_schema_handler(core_schema.int_schema()),
428
+ float: _copy_schema_handler(core_schema.float_schema()),
429
+ bool: _copy_schema_handler(core_schema.bool_schema()),
430
+ complex: _copy_schema_handler(core_schema.complex_schema()),
431
+ object: _copy_schema_handler(core_schema.any_schema()),
432
+ datetime.date: _copy_schema_handler(core_schema.date_schema()),
433
+ datetime.datetime: _copy_schema_handler(core_schema.datetime_schema()),
434
+ datetime.time: _copy_schema_handler(core_schema.time_schema()),
435
+ datetime.timedelta: _copy_schema_handler(core_schema.timedelta_schema()),
436
+ Decimal: _copy_schema_handler(core_schema.decimal_schema()),
437
+ UUID: _copy_schema_handler(core_schema.uuid_schema()),
438
+ Url: _copy_schema_handler(core_schema.url_schema()),
439
+ Fraction: _copy_schema_handler(core_schema.fraction_schema()),
440
+ MultiHostUrl: _copy_schema_handler(core_schema.multi_host_url_schema()),
441
+ None: _copy_schema_handler(_NONE_SCHEMA),
442
+ NoneType: _copy_schema_handler(_NONE_SCHEMA),
443
+ MISSING: _copy_schema_handler(core_schema.missing_sentinel_schema()),
444
+ EllipsisType: _copy_schema_handler(core_schema.ellipsis_schema()),
445
+ type: lambda self, obj: self._type_schema(),
446
+ dict: lambda self, obj: self._dict_schema(Any, Any),
447
+ tuple: lambda self, obj: self._tuple_schema(obj),
448
+ list: lambda self, obj: self._list_schema(Any),
449
+ set: lambda self, obj: self._set_schema(Any),
450
+ collections.abc.MutableSet: lambda self, obj: self._set_schema(Any),
451
+ frozenset: lambda self, obj: self._frozenset_schema(Any),
452
+ collections.abc.Set: lambda self, obj: self._frozenset_schema(Any),
453
+ collections.abc.MutableSequence: lambda self, obj: self._list_schema(Any),
454
+ collections.abc.Sequence: lambda self, obj: self._sequence_schema(Any),
455
+ collections.deque: lambda self, obj: self._deque_schema(Any),
456
+ collections.abc.Iterable: lambda self, obj: self._iterable_schema(obj),
457
+ collections.abc.Generator: lambda self, obj: self._iterable_schema(obj),
458
+ collections.abc.Mapping: lambda self, obj: self._mapping_schema(obj, Any, Any),
459
+ collections.abc.MutableMapping: lambda self, obj: self._mapping_schema(obj, Any, Any),
460
+ collections.OrderedDict: lambda self, obj: self._ordered_dict_schema(Any, Any),
461
+ collections.defaultdict: lambda self, obj: self._mapping_schema(obj, Any, Any),
462
+ collections.Counter: lambda self, obj: self._counter_schema(Any),
463
+ collections.abc.Callable: _copy_schema_handler(_CALLABLE_SCHEMA),
464
+ collections.abc.Hashable: lambda self, obj: self._hashable_schema(),
465
+ IPv4Address: lambda self, obj: self._ip_schema(obj),
466
+ IPv4Interface: lambda self, obj: self._ip_schema(obj),
467
+ IPv4Network: lambda self, obj: self._ip_schema(obj),
468
+ IPv6Address: lambda self, obj: self._ip_schema(obj),
469
+ IPv6Interface: lambda self, obj: self._ip_schema(obj),
470
+ IPv6Network: lambda self, obj: self._ip_schema(obj),
471
+ os.PathLike: lambda self, obj: self._path_schema(obj, Any),
472
+ pathlib.Path: lambda self, obj: self._path_schema(obj, Any),
473
+ pathlib.PurePath: lambda self, obj: self._path_schema(obj, Any),
474
+ pathlib.PosixPath: lambda self, obj: self._path_schema(obj, Any),
475
+ pathlib.WindowsPath: lambda self, obj: self._path_schema(obj, Any),
476
+ pathlib.PurePosixPath: lambda self, obj: self._path_schema(obj, Any),
477
+ pathlib.PureWindowsPath: lambda self, obj: self._path_schema(obj, Any),
478
+ re.Pattern: lambda self, obj: self._pattern_schema(obj),
479
+ ZoneInfo: lambda self, obj: self._zoneinfo_schema(),
480
+ }
481
+
482
+ _generic_handlers: ClassVar[dict[Any, Callable[[GenerateSchema, Any], core_schema.CoreSchema]]] = {
483
+ tuple: lambda self, obj: self._tuple_schema(obj),
484
+ list: lambda self, obj: self._list_schema(self._get_first_arg_or_any(obj)),
485
+ dict: lambda self, obj: self._dict_schema(*self._get_first_two_args_or_any(obj)),
486
+ set: lambda self, obj: self._set_schema(self._get_first_arg_or_any(obj)),
487
+ frozenset: lambda self, obj: self._frozenset_schema(self._get_first_arg_or_any(obj)),
488
+ type: lambda self, obj: self._subclass_schema(obj),
489
+ collections.abc.MutableSequence: lambda self, obj: self._list_schema(self._get_first_arg_or_any(obj)),
490
+ collections.abc.MutableSet: lambda self, obj: self._set_schema(self._get_first_arg_or_any(obj)),
491
+ collections.abc.Set: lambda self, obj: self._frozenset_schema(self._get_first_arg_or_any(obj)),
492
+ collections.deque: lambda self, obj: self._deque_schema(self._get_first_arg_or_any(obj)),
493
+ collections.abc.Mapping: lambda self, obj: self._mapping_schema(
494
+ collections.abc.Mapping, *self._get_first_two_args_or_any(obj)
495
+ ),
496
+ collections.abc.MutableMapping: lambda self, obj: self._mapping_schema(
497
+ collections.abc.MutableMapping, *self._get_first_two_args_or_any(obj)
498
+ ),
499
+ collections.OrderedDict: lambda self, obj: self._ordered_dict_schema(*self._get_first_two_args_or_any(obj)),
500
+ collections.defaultdict: lambda self, obj: self._mapping_schema(
501
+ collections.defaultdict, *self._get_first_two_args_or_any(obj)
502
+ ),
503
+ collections.Counter: lambda self, obj: self._counter_schema(self._get_first_arg_or_any(obj)),
504
+ os.PathLike: lambda self, obj: self._path_schema(os.PathLike, self._get_first_arg_or_any(obj)),
505
+ pathlib.Path: lambda self, obj: self._path_schema(pathlib.Path, self._get_first_arg_or_any(obj)),
506
+ pathlib.PurePath: lambda self, obj: self._path_schema(pathlib.PurePath, self._get_first_arg_or_any(obj)),
507
+ pathlib.PosixPath: lambda self, obj: self._path_schema(pathlib.PosixPath, self._get_first_arg_or_any(obj)),
508
+ pathlib.WindowsPath: lambda self, obj: self._path_schema(pathlib.WindowsPath, self._get_first_arg_or_any(obj)),
509
+ pathlib.PurePosixPath: lambda self, obj: self._path_schema(
510
+ pathlib.PurePosixPath, self._get_first_arg_or_any(obj)
511
+ ),
512
+ pathlib.PureWindowsPath: lambda self, obj: self._path_schema(
513
+ pathlib.PureWindowsPath, self._get_first_arg_or_any(obj)
514
+ ),
515
+ collections.abc.Sequence: lambda self, obj: self._sequence_schema(self._get_first_arg_or_any(obj)),
516
+ collections.abc.Iterable: lambda self, obj: self._iterable_schema(obj),
517
+ collections.abc.Generator: lambda self, obj: self._iterable_schema(obj),
518
+ re.Pattern: lambda self, obj: self._pattern_schema(obj),
519
+ collections.abc.Callable: _copy_schema_handler(_CALLABLE_SCHEMA),
520
+ }
521
+
522
+ if sys.version_info >= (3, 15):
523
+ _handlers[frozendict] = lambda self, obj: self._frozendict_schema(Any, Any)
524
+ _generic_handlers[frozendict] = lambda self, obj: self._frozendict_schema(*self._get_first_two_args_or_any(obj))
525
+
526
+ def __init_subclass__(cls) -> None:
527
+ super().__init_subclass__()
528
+ warnings.warn(
529
+ 'Subclassing `GenerateSchema` is not supported. The API is highly subject to change in minor versions.',
530
+ UserWarning,
531
+ stacklevel=2,
532
+ )
533
+
534
+ @property
535
+ def _config_wrapper(self) -> ConfigWrapper:
536
+ return self._config_wrapper_stack.tail
537
+
538
+ @property
539
+ def _types_namespace(self) -> NamespacesTuple:
540
+ return self._ns_resolver.types_namespace
541
+
542
+ @property
543
+ def _arbitrary_types(self) -> bool:
544
+ return self._config_wrapper.arbitrary_types_allowed
545
+
546
+ # the following methods can be overridden but should be considered
547
+ # unstable / private APIs
548
+ def _list_schema(self, items_type: Any) -> CoreSchema:
549
+ return core_schema.list_schema(self.generate_schema(items_type))
550
+
551
+ def _dict_schema(self, keys_type: Any, values_type: Any) -> CoreSchema:
552
+ return core_schema.dict_schema(self.generate_schema(keys_type), self.generate_schema(values_type))
553
+
554
+ def _frozendict_schema(self, keys_type: Any, values_type: Any) -> CoreSchema:
555
+ return core_schema.frozendict_schema(self.generate_schema(keys_type), self.generate_schema(values_type))
556
+
557
+ def _ordered_dict_schema(self, keys_type: Any, values_type: Any) -> CoreSchema:
558
+ return core_schema.ordered_dict_schema(self.generate_schema(keys_type), self.generate_schema(values_type))
559
+
560
+ def _counter_schema(self, keys_type: Any) -> CoreSchema:
561
+ return core_schema.counter_schema(self.generate_schema(keys_type), core_schema.int_schema())
562
+
563
+ def _set_schema(self, items_type: Any) -> CoreSchema:
564
+ return core_schema.set_schema(self.generate_schema(items_type))
565
+
566
+ def _frozenset_schema(self, items_type: Any) -> CoreSchema:
567
+ return core_schema.frozenset_schema(self.generate_schema(items_type))
568
+
569
+ def _enum_schema(self, enum_type: type[Enum]) -> CoreSchema:
570
+ cases: list[Any] = list(enum_type.__members__.values())
571
+
572
+ enum_ref = _type_refs.enum_type_ref(enum_type)
573
+ description = None if not enum_type.__doc__ else inspect.cleandoc(enum_type.__doc__)
574
+ if (
575
+ description == 'An enumeration.'
576
+ ): # This is the default value provided by enum.EnumMeta.__new__; don't use it
577
+ description = None
578
+ js_updates = {'title': enum_type.__name__, 'description': description}
579
+ js_updates = {k: v for k, v in js_updates.items() if v is not None}
580
+
581
+ sub_type: Literal['str', 'int', 'float'] | None = None
582
+ if issubclass(enum_type, int):
583
+ sub_type = 'int'
584
+ value_ser_type: core_schema.SerSchema = core_schema.simple_ser_schema('int')
585
+ elif issubclass(enum_type, str):
586
+ # this handles `StrEnum` (3.11 only), and also `Foobar(str, Enum)`
587
+ sub_type = 'str'
588
+ value_ser_type = core_schema.simple_ser_schema('str')
589
+ elif issubclass(enum_type, float):
590
+ sub_type = 'float'
591
+ value_ser_type = core_schema.simple_ser_schema('float')
592
+ else:
593
+ # TODO this is an ugly hack, how do we trigger an Any schema for serialization?
594
+ value_ser_type = core_schema.plain_serializer_function_ser_schema(lambda x: x)
595
+
596
+ if cases:
597
+
598
+ def get_json_schema(schema: CoreSchema, handler: GetJsonSchemaHandler) -> JsonSchemaValue:
599
+ json_schema = handler(schema)
600
+ original_schema = handler.resolve_ref_schema(json_schema)
601
+ original_schema.update(js_updates)
602
+ return json_schema
603
+
604
+ enum_schema = core_schema.enum_schema(
605
+ enum_type,
606
+ cases,
607
+ sub_type=sub_type,
608
+ ref=enum_ref,
609
+ metadata={'pydantic_js_functions': [get_json_schema]},
610
+ )
611
+
612
+ if self._config_wrapper.use_enum_values:
613
+ enum_schema = core_schema.no_info_after_validator_function(
614
+ attrgetter('value'), enum_schema, serialization=value_ser_type
615
+ )
616
+
617
+ return enum_schema
618
+
619
+ else:
620
+
621
+ def get_json_schema_no_cases(_, handler: GetJsonSchemaHandler) -> JsonSchemaValue:
622
+ json_schema = handler(core_schema.enum_schema(enum_type, cases, sub_type=sub_type, ref=enum_ref))
623
+ original_schema = handler.resolve_ref_schema(json_schema)
624
+ original_schema.update(js_updates)
625
+ return json_schema
626
+
627
+ # Use an isinstance check for enums with no cases.
628
+ # The most important use case for this is creating TypeVar bounds for generics that should
629
+ # be restricted to enums. This is more consistent than it might seem at first, since you can only
630
+ # subclass enum.Enum (or subclasses of enum.Enum) if all parent classes have no cases.
631
+ # We use the get_json_schema function when an Enum subclass has been declared with no cases
632
+ # so that we can still generate a valid json schema.
633
+ return core_schema.is_instance_schema(
634
+ enum_type,
635
+ metadata={'pydantic_js_functions': [get_json_schema_no_cases]},
636
+ )
637
+
638
+ def _ip_schema(self, tp: Any) -> CoreSchema:
639
+ from ._validators import IP_VALIDATOR_LOOKUP, IpType
640
+
641
+ ip_type_json_schema_format: dict[type[IpType], str] = {
642
+ IPv4Address: 'ipv4',
643
+ IPv4Network: 'ipv4network',
644
+ IPv4Interface: 'ipv4interface',
645
+ IPv6Address: 'ipv6',
646
+ IPv6Network: 'ipv6network',
647
+ IPv6Interface: 'ipv6interface',
648
+ }
649
+
650
+ def ser_ip(ip: Any, info: core_schema.SerializationInfo) -> str | IpType:
651
+ if not isinstance(ip, (tp, str)):
652
+ raise PydanticSerializationUnexpectedValue(
653
+ f"Expected `{tp}` but got `{type(ip)}` with value `'{ip}'` - serialized value may not be as expected."
654
+ )
655
+ if info.mode == 'python':
656
+ return ip
657
+ return str(ip)
658
+
659
+ return core_schema.lax_or_strict_schema(
660
+ lax_schema=core_schema.no_info_plain_validator_function(IP_VALIDATOR_LOOKUP[tp]),
661
+ strict_schema=core_schema.json_or_python_schema(
662
+ json_schema=core_schema.no_info_after_validator_function(tp, core_schema.str_schema()),
663
+ python_schema=core_schema.is_instance_schema(tp),
664
+ ),
665
+ serialization=core_schema.plain_serializer_function_ser_schema(ser_ip, info_arg=True, when_used='always'),
666
+ metadata={
667
+ 'pydantic_js_functions': [lambda _1, _2: {'type': 'string', 'format': ip_type_json_schema_format[tp]}]
668
+ },
669
+ )
670
+
671
+ def _path_schema(self, tp: Any, path_type: Any) -> CoreSchema:
672
+ if tp is os.PathLike and (path_type not in {str, bytes} and not typing_objects.is_any(path_type)):
673
+ raise PydanticUserError(
674
+ '`os.PathLike` can only be used with `str`, `bytes` or `Any`', code='schema-for-unknown-type'
675
+ )
676
+
677
+ path_constructor = pathlib.PurePath if tp is os.PathLike else tp
678
+ strict_inner_schema = (
679
+ core_schema.bytes_schema(strict=True) if (path_type is bytes) else core_schema.str_schema(strict=True)
680
+ )
681
+ lax_inner_schema = core_schema.bytes_schema() if (path_type is bytes) else core_schema.str_schema()
682
+
683
+ def path_validator(input_value: str | bytes) -> os.PathLike[Any]: # type: ignore
684
+ try:
685
+ if path_type is bytes:
686
+ if isinstance(input_value, bytes):
687
+ try:
688
+ input_value = input_value.decode()
689
+ except UnicodeDecodeError as e:
690
+ raise PydanticCustomError('bytes_type', 'Input must be valid bytes') from e
691
+ else:
692
+ raise PydanticCustomError('bytes_type', 'Input must be bytes')
693
+ elif not isinstance(input_value, str):
694
+ raise PydanticCustomError('path_type', 'Input is not a valid path')
695
+
696
+ return path_constructor(input_value) # type: ignore
697
+ except TypeError as e:
698
+ raise PydanticCustomError('path_type', 'Input is not a valid path') from e
699
+
700
+ def ser_path(path: Any, info: core_schema.SerializationInfo) -> str | os.PathLike[Any]:
701
+ if not isinstance(path, (tp, str)):
702
+ raise PydanticSerializationUnexpectedValue(
703
+ f"Expected `{tp}` but got `{type(path)}` with value `'{path}'` - serialized value may not be as expected."
704
+ )
705
+ if info.mode == 'python':
706
+ return path
707
+ return str(path)
708
+
709
+ instance_schema = core_schema.json_or_python_schema(
710
+ json_schema=core_schema.no_info_after_validator_function(path_validator, lax_inner_schema),
711
+ python_schema=core_schema.is_instance_schema(tp),
712
+ )
713
+
714
+ schema = core_schema.lax_or_strict_schema(
715
+ lax_schema=core_schema.union_schema(
716
+ [
717
+ instance_schema,
718
+ core_schema.no_info_after_validator_function(path_validator, strict_inner_schema),
719
+ ],
720
+ custom_error_type='path_type',
721
+ custom_error_message=f'Input is not a valid path for {tp}',
722
+ ),
723
+ strict_schema=instance_schema,
724
+ serialization=core_schema.plain_serializer_function_ser_schema(ser_path, info_arg=True, when_used='always'),
725
+ metadata={'pydantic_js_functions': [lambda source, handler: {**handler(source), 'format': 'path'}]},
726
+ )
727
+ return schema
728
+
729
+ def _deque_schema(self, items_type: Any) -> CoreSchema:
730
+ return core_schema.deque_schema(self.generate_schema(items_type))
731
+
732
+ def _mapping_schema(self, tp: Any, keys_type: Any, values_type: Any) -> CoreSchema:
733
+ from ._validators import MAPPING_ORIGIN_MAP, defaultdict_validator, get_defaultdict_default_default_factory
734
+
735
+ mapped_origin = MAPPING_ORIGIN_MAP[tp]
736
+ keys_schema = self.generate_schema(keys_type)
737
+ with warnings.catch_warnings():
738
+ # We kind of abused `Field()` default factories to be able to specify
739
+ # the `defaultdict`'s `default_factory`. As a consequence, we get warnings
740
+ # as normally `FieldInfo.default_factory` is unsupported in the context where
741
+ # `Field()` is used and our only solution is to ignore them (note that this might
742
+ # wrongfully ignore valid warnings, e.g. if the `value_type` is a PEP 695 type alias
743
+ # with unsupported metadata).
744
+ warnings.simplefilter('ignore', category=UnsupportedFieldAttributeWarning)
745
+ values_schema = self.generate_schema(values_type)
746
+ dict_schema = core_schema.dict_schema(keys_schema, values_schema, strict=False)
747
+
748
+ if mapped_origin is dict:
749
+ schema = dict_schema
750
+ else:
751
+ check_instance = core_schema.json_or_python_schema(
752
+ json_schema=dict_schema,
753
+ python_schema=core_schema.is_instance_schema(mapped_origin),
754
+ )
755
+
756
+ if tp is collections.defaultdict:
757
+ default_default_factory = get_defaultdict_default_default_factory(values_type)
758
+ coerce_instance_wrap = partial(
759
+ core_schema.no_info_wrap_validator_function,
760
+ partial(defaultdict_validator, default_default_factory=default_default_factory),
761
+ )
762
+ else:
763
+ coerce_instance_wrap = partial(core_schema.no_info_after_validator_function, mapped_origin)
764
+
765
+ lax_schema = coerce_instance_wrap(dict_schema)
766
+ strict_schema = core_schema.chain_schema([check_instance, lax_schema])
767
+
768
+ schema = core_schema.lax_or_strict_schema(
769
+ lax_schema=lax_schema,
770
+ strict_schema=strict_schema,
771
+ serialization=core_schema.wrap_serializer_function_ser_schema(
772
+ lambda v, h: h(v), schema=dict_schema, info_arg=False
773
+ ),
774
+ )
775
+
776
+ return schema
777
+
778
+ def _arbitrary_type_schema(self, tp: Any) -> CoreSchema:
779
+ if not isinstance(tp, type):
780
+ warnings.warn(
781
+ f'{tp!r} is not a Python type (it may be an instance of an object),'
782
+ ' Pydantic will allow any object with no validation since we cannot even'
783
+ ' enforce that the input is an instance of the given type.'
784
+ ' To get rid of this error wrap the type with `pydantic.SkipValidation`.',
785
+ ArbitraryTypeWarning,
786
+ )
787
+ return core_schema.any_schema()
788
+ return core_schema.is_instance_schema(tp)
789
+
790
+ def _unknown_type_schema(self, obj: Any) -> CoreSchema:
791
+ raise PydanticSchemaGenerationError(
792
+ f'Unable to generate pydantic-core schema for {obj!r}. '
793
+ 'Set `arbitrary_types_allowed=True` in the model_config to ignore this error'
794
+ ' or implement `__get_pydantic_core_schema__` on your type to fully support it.'
795
+ '\n\nIf you got this error by calling handler(<some type>) within'
796
+ ' `__get_pydantic_core_schema__` then you likely need to call'
797
+ ' `handler.generate_schema(<some type>)` since we do not call'
798
+ ' `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.'
799
+ )
800
+
801
+ def _apply_discriminator_to_union(
802
+ self, schema: CoreSchema, discriminator: str | Discriminator | None
803
+ ) -> CoreSchema:
804
+ if discriminator is None:
805
+ return schema
806
+ try:
807
+ return _discriminated_union.apply_discriminator(
808
+ schema,
809
+ discriminator,
810
+ self.defs._definitions,
811
+ )
812
+ except _discriminated_union.MissingDefinitionForUnionRef:
813
+ # defer until defs are resolved
814
+ _discriminated_union.set_discriminator_in_metadata(
815
+ schema,
816
+ discriminator,
817
+ )
818
+ return schema
819
+
820
+ def clean_schema(self, schema: CoreSchema) -> CoreSchema:
821
+ return self.defs.finalize_schema(schema)
822
+
823
+ def _add_js_function(self, metadata_schema: CoreSchema, js_function: Callable[..., Any]) -> None:
824
+ metadata = metadata_schema.get('metadata', {})
825
+ pydantic_js_functions = metadata.setdefault('pydantic_js_functions', [])
826
+ # because of how we generate core schemas for nested generic models
827
+ # we can end up adding `BaseModel.__get_pydantic_json_schema__` multiple times
828
+ # this check may fail to catch duplicates if the function is a `functools.partial`
829
+ # or something like that, but if it does it'll fail by inserting the duplicate
830
+ if js_function not in pydantic_js_functions:
831
+ pydantic_js_functions.append(js_function)
832
+ metadata_schema['metadata'] = metadata
833
+
834
+ def generate_schema(
835
+ self,
836
+ obj: Any,
837
+ ) -> core_schema.CoreSchema:
838
+ """Generate core schema.
839
+
840
+ Args:
841
+ obj: The object to generate core schema for.
842
+
843
+ Returns:
844
+ The generated core schema.
845
+
846
+ Raises:
847
+ PydanticUndefinedAnnotation:
848
+ If it is not possible to evaluate forward reference.
849
+ PydanticSchemaGenerationError:
850
+ If it is not possible to generate pydantic-core schema.
851
+ TypeError:
852
+ - If `alias_generator` returns a disallowed type (must be str, AliasPath or AliasChoices).
853
+ - If V1 style validator with `each_item=True` applied on a wrong field.
854
+ PydanticUserError:
855
+ - If `typing.TypedDict` is used instead of `typing_extensions.TypedDict` on Python < 3.12.
856
+ - If `__modify_schema__` method is used instead of `__get_pydantic_json_schema__`.
857
+ """
858
+ if _is_simple_schema_type(obj):
859
+ return _add_custom_serialization_from_json_encoders(
860
+ self._config_wrapper.json_encoders, obj, self._handlers[obj](self, obj)
861
+ )
862
+
863
+ origin = get_origin(obj)
864
+ schema: CoreSchema | None = None
865
+ if origin is None:
866
+ # If the type has an origin, it is guaranteed to *not* be an ordinary class that could have
867
+ # a `__get_pydantic_core_schema__()` method:
868
+ schema = self._generate_schema_from_get_schema_method(obj, obj)
869
+
870
+ if schema is None:
871
+ schema = self._generate_schema_inner(obj, origin)
872
+
873
+ # `__get_pydantic_json_schema__()` is checked on the origin if it exists:
874
+ metadata_js_function = _extract_get_pydantic_json_schema(origin if origin is not None else obj)
875
+ if metadata_js_function is not None:
876
+ metadata_schema = resolve_original_schema(schema, self.defs)
877
+ if metadata_schema:
878
+ self._add_js_function(metadata_schema, metadata_js_function)
879
+
880
+ schema = _add_custom_serialization_from_json_encoders(self._config_wrapper.json_encoders, obj, schema)
881
+
882
+ return schema
883
+
884
+ def _model_schema(self, cls: type[BaseModel]) -> core_schema.CoreSchema:
885
+ """Generate schema for a Pydantic model."""
886
+ BaseModel_ = import_cached_base_model()
887
+
888
+ model_ref = _type_refs.model_type_ref(cls)
889
+ with self.defs.get_definition_ref_schema(ref=model_ref) as maybe_schema:
890
+ if maybe_schema is not None:
891
+ return maybe_schema
892
+
893
+ schema = cls.__dict__.get('__pydantic_core_schema__')
894
+ if schema is not None and not isinstance(schema, MockCoreSchema):
895
+ if schema['type'] == 'definitions':
896
+ schema = self.defs.unpack_definitions(schema)
897
+ ref = get_ref(schema)
898
+ if ref:
899
+ return self.defs.create_definition_reference_schema(schema)
900
+ else:
901
+ return schema
902
+
903
+ config_wrapper = ConfigWrapper(cls.model_config, check=False)
904
+
905
+ with self._config_wrapper_stack.push(config_wrapper), self._ns_resolver.push(cls):
906
+ core_config = self._config_wrapper.core_config(title=cls.__name__)
907
+
908
+ if cls.__pydantic_fields_complete__ or cls is BaseModel_:
909
+ fields = getattr(cls, '__pydantic_fields__', {})
910
+ extra_info = getattr(cls, '__pydantic_extra_info__', None)
911
+ else:
912
+ if '__pydantic_fields__' not in cls.__dict__:
913
+ # This happens when we have a loop in the schema generation:
914
+ # class Base[T](BaseModel):
915
+ # t: T
916
+ #
917
+ # class Other(BaseModel):
918
+ # b: 'Base[Other]'
919
+ # When we build fields for `Other`, we evaluate the forward annotation.
920
+ # At this point, `Other` doesn't have the model fields set. We create
921
+ # `Base[Other]`; model fields are successfully built, and we try to generate
922
+ # a schema for `t: Other`. As `Other.__pydantic_fields__` aren't set, we abort.
923
+ raise PydanticUndefinedAnnotation(
924
+ name=cls.__name__,
925
+ message=f'Class {cls.__name__!r} is not defined',
926
+ )
927
+ try:
928
+ fields, extra_info = rebuild_model_fields(
929
+ cls,
930
+ config_wrapper=self._config_wrapper,
931
+ ns_resolver=self._ns_resolver,
932
+ typevars_map=get_model_typevars_map(cls),
933
+ )
934
+ except NameError as e:
935
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
936
+
937
+ decorators = cls.__pydantic_decorators__
938
+ computed_fields = decorators.computed_fields
939
+ if decorators.field_validators or decorators.field_serializers or decorators.validators:
940
+ check_decorator_fields_exist(
941
+ chain(
942
+ decorators.field_validators.values(),
943
+ decorators.field_serializers.values(),
944
+ decorators.validators.values(),
945
+ ),
946
+ {*fields.keys(), *computed_fields.keys()},
947
+ )
948
+
949
+ model_validators = decorators.model_validators.values()
950
+
951
+ extras_schema = None
952
+ extras_keys_schema = None
953
+ if core_config.get('extra_fields_behavior') == 'allow' and extra_info is not None:
954
+ tp = get_origin(extra_info.annotation)
955
+ if tp is not dict:
956
+ raise PydanticSchemaGenerationError(
957
+ 'The type annotation for `__pydantic_extra__` must be `dict[str, ...]`'
958
+ )
959
+ # See the comments in `_get_args_resolving_forward_refs()` for why we need
960
+ # to re-evaluate the annotation:
961
+ extra_keys_type, extra_items_type = self._get_args_resolving_forward_refs(
962
+ extra_info.annotation,
963
+ required=True,
964
+ )
965
+ if extra_keys_type is not str:
966
+ extras_keys_schema = self.generate_schema(extra_keys_type)
967
+ if not typing_objects.is_any(extra_items_type):
968
+ extras_schema = self.generate_schema(extra_items_type)
969
+
970
+ generic_origin: type[BaseModel] | None = getattr(cls, '__pydantic_generic_metadata__', {}).get('origin')
971
+
972
+ if cls.__pydantic_root_model__:
973
+ inner_schema, metadata = self._common_field_schema('root', fields['root'], decorators)
974
+ if cls.__doc__ and metadata.get('pydantic_js_updates', {}).get('description'):
975
+ # This is a bit of a leaky abstraction, but as the model docstring takes priority
976
+ # over the root field's description, we need to override it here. This can't be done
977
+ # in the JSON Schema generation logic because the metadata's `pydantic_js_updates` are
978
+ # applied last, and overrides any value previously set (so the description set from the
979
+ # docstring in `GenerateJsonSchema._update_class_schema()` is overridden):
980
+ update_core_metadata(
981
+ metadata, pydantic_js_updates={'description': inspect.cleandoc(cls.__doc__)}
982
+ )
983
+
984
+ inner_schema = apply_model_validators(inner_schema, model_validators, 'inner')
985
+ model_schema = core_schema.model_schema(
986
+ cls,
987
+ inner_schema,
988
+ generic_origin=generic_origin,
989
+ custom_init=getattr(cls, '__pydantic_custom_init__', None),
990
+ root_model=True,
991
+ post_init=getattr(cls, '__pydantic_post_init__', None),
992
+ config=core_config,
993
+ ref=model_ref,
994
+ metadata=metadata,
995
+ )
996
+ else:
997
+ fields_schema: core_schema.CoreSchema = core_schema.model_fields_schema(
998
+ {k: self._generate_md_field_schema(k, v, decorators) for k, v in fields.items()},
999
+ computed_fields=[
1000
+ self._computed_field_schema(d, decorators.field_serializers)
1001
+ for d in computed_fields.values()
1002
+ ],
1003
+ extras_schema=extras_schema,
1004
+ extras_keys_schema=extras_keys_schema,
1005
+ model_name=cls.__name__,
1006
+ )
1007
+ inner_schema = apply_validators(fields_schema, decorators.root_validators.values())
1008
+ inner_schema = apply_model_validators(inner_schema, model_validators, 'inner')
1009
+
1010
+ model_schema = core_schema.model_schema(
1011
+ cls,
1012
+ inner_schema,
1013
+ generic_origin=generic_origin,
1014
+ custom_init=getattr(cls, '__pydantic_custom_init__', None),
1015
+ root_model=False,
1016
+ post_init=getattr(cls, '__pydantic_post_init__', None),
1017
+ config=core_config,
1018
+ ref=model_ref,
1019
+ )
1020
+
1021
+ schema = self._apply_model_serializers(model_schema, decorators.model_serializers.values())
1022
+ schema = apply_model_validators(schema, model_validators, 'outer')
1023
+ return self.defs.create_definition_reference_schema(schema)
1024
+
1025
+ def _resolve_self_type(self, obj: Any) -> Any:
1026
+ obj = self.model_type_stack.get()
1027
+ if obj is None:
1028
+ raise PydanticUserError('`typing.Self` is invalid in this context', code='invalid-self-type')
1029
+ return obj
1030
+
1031
+ def _generate_schema_from_get_schema_method(self, obj: Any, source: Any) -> core_schema.CoreSchema | None:
1032
+ BaseModel_ = import_cached_base_model()
1033
+
1034
+ get_schema = getattr(obj, '__get_pydantic_core_schema__', None)
1035
+
1036
+ if (
1037
+ get_schema is not None
1038
+ # BaseModel.__get_pydantic_core_schema__ is defined for backwards compatibility,
1039
+ # to allow existing code to call `super().__get_pydantic_core_schema__` in Pydantic
1040
+ # model that overrides `__get_pydantic_core_schema__`. However, it raises a deprecation
1041
+ # warning stating that the method will be removed, and during the core schema gen we actually
1042
+ # don't call the method:
1043
+ and getattr(get_schema, '__func__', None) is not BaseModel_.__get_pydantic_core_schema__.__func__ # pyright: ignore[reportFunctionMemberAccess]
1044
+ ):
1045
+ # Some referenceable types might have a `__get_pydantic_core_schema__` method
1046
+ # defined on it by users (e.g. on a dataclass). This generally doesn't play well
1047
+ # as these types are already recognized by the `GenerateSchema` class and isn't ideal
1048
+ # as we might end up calling `any_type_ref()` (relatively expensive) on types that are actually
1049
+ # not referenceable:
1050
+ with self.defs.get_definition_ref_schema(ref=_type_refs.any_type_ref(obj, get_origin(obj))) as maybe_schema:
1051
+ if maybe_schema is not None:
1052
+ return maybe_schema
1053
+
1054
+ if obj is source:
1055
+ ref_mode = 'unpack'
1056
+ else:
1057
+ ref_mode = 'to-def'
1058
+ schema = get_schema(
1059
+ source, CallbackGetCoreSchemaHandler(self._generate_schema_inner, self, ref_mode=ref_mode)
1060
+ )
1061
+ if schema['type'] == 'definitions':
1062
+ schema = self.defs.unpack_definitions(schema)
1063
+
1064
+ ref = get_ref(schema)
1065
+ if ref:
1066
+ return self.defs.create_definition_reference_schema(schema)
1067
+
1068
+ # Note: if schema is of type `'definition-ref'`, we might want to copy it as a
1069
+ # safety measure (because these are inlined in place -- i.e. mutated directly)
1070
+ return schema
1071
+
1072
+ if get_schema is None and (validators := getattr(obj, '__get_validators__', None)) is not None:
1073
+ from pydantic.v1 import BaseModel as BaseModelV1
1074
+
1075
+ if issubclass(obj, BaseModelV1):
1076
+ warnings.warn(
1077
+ f'Mixing V1 models and V2 models (or constructs, like `TypeAdapter`) is not supported. Please upgrade `{obj.__name__}` to V2.',
1078
+ UserWarning,
1079
+ )
1080
+ else:
1081
+ warnings.warn(
1082
+ '`__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead.',
1083
+ PydanticDeprecatedSince20,
1084
+ )
1085
+ return core_schema.chain_schema([core_schema.with_info_plain_validator_function(v) for v in validators()])
1086
+
1087
+ def _resolve_forward_ref(self, obj: Any) -> Any:
1088
+ # we assume that types_namespace has the target of forward references in its scope,
1089
+ # but this could fail, for example, if calling Validator on an imported type which contains
1090
+ # forward references to other types only defined in the module from which it was imported
1091
+ # `Validator(SomeImportedTypeAliasWithAForwardReference)`
1092
+ # or the equivalent for BaseModel
1093
+ # class Model(BaseModel):
1094
+ # x: SomeImportedTypeAliasWithAForwardReference
1095
+ try:
1096
+ obj = _typing_extra.eval_type(obj, *self._types_namespace)
1097
+ except NameError as e:
1098
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
1099
+
1100
+ # if obj is still a ForwardRef, it means we can't evaluate it, raise PydanticUndefinedAnnotation
1101
+ if isinstance(obj, ForwardRef):
1102
+ raise PydanticUndefinedAnnotation(obj.__forward_arg__, f'Unable to evaluate forward reference {obj}')
1103
+
1104
+ if self._typevars_map:
1105
+ obj = replace_types(obj, self._typevars_map)
1106
+
1107
+ return obj
1108
+
1109
+ @overload
1110
+ def _get_args_resolving_forward_refs(self, obj: Any, required: Literal[True]) -> tuple[Any, ...]: ...
1111
+
1112
+ @overload
1113
+ def _get_args_resolving_forward_refs(self, obj: Any) -> tuple[Any, ...] | None: ...
1114
+
1115
+ def _get_args_resolving_forward_refs(self, obj: Any, required: bool = False) -> tuple[Any, ...] | None:
1116
+ args = get_args(obj)
1117
+ if args:
1118
+ if isinstance(obj, GenericAlias):
1119
+ # PEP 585 generic aliases don't convert args to ForwardRefs, unlike `typing.List/Dict` etc.
1120
+ # This was fixed in https://github.com/python/cpython/pull/30900 (Python 3.11).
1121
+ # TODO: this shouldn't be necessary (probably even this `_get_args_resolving_forward_refs()` function)
1122
+ # once we drop support for Python 3.10 *or* if we implement our own `typing._eval_type()` implementation.
1123
+ args = (ForwardRef(a) if isinstance(a, str) else a for a in args)
1124
+ args = tuple(self._resolve_forward_ref(a) if isinstance(a, ForwardRef) else a for a in args)
1125
+ elif required: # pragma: no cover
1126
+ raise TypeError(f'Expected {obj} to have generic parameters but it had none')
1127
+ return args
1128
+
1129
+ def _get_first_arg_or_any(self, obj: Any) -> Any:
1130
+ args = self._get_args_resolving_forward_refs(obj)
1131
+ if not args:
1132
+ return Any
1133
+ return args[0]
1134
+
1135
+ def _get_first_two_args_or_any(self, obj: Any) -> tuple[Any, Any]:
1136
+ args = self._get_args_resolving_forward_refs(obj)
1137
+ if not args:
1138
+ return (Any, Any)
1139
+ if len(args) < 2:
1140
+ origin = get_origin(obj)
1141
+ raise TypeError(f'Expected two type arguments for {origin}, got 1')
1142
+ return args[0], args[1]
1143
+
1144
+ def _generate_schema_inner(self, obj: Any, origin: Any | None = PydanticUndefined) -> core_schema.CoreSchema:
1145
+ if typing_objects.is_self(obj):
1146
+ obj = self._resolve_self_type(obj)
1147
+ # The resolved type can be a parametrized generic (e.g. `GenericDataclass[int]`),
1148
+ # so the origin provided by the caller (computed on `Self`) is stale:
1149
+ origin = get_origin(obj)
1150
+
1151
+ origin = origin if origin is not PydanticUndefined else get_origin(obj)
1152
+
1153
+ if is_union_origin(origin):
1154
+ return self._direct_union_schema(obj)
1155
+
1156
+ if typing_objects.is_annotated(origin):
1157
+ return self._annotated_schema(obj)
1158
+
1159
+ if typing_objects.is_literal(origin):
1160
+ return self._literal_schema(obj)
1161
+
1162
+ if isinstance(obj, dict):
1163
+ # we assume this is already a valid schema
1164
+ return obj # type: ignore[return-value]
1165
+
1166
+ if isinstance(obj, str):
1167
+ obj = ForwardRef(obj)
1168
+
1169
+ if isinstance(obj, ForwardRef):
1170
+ return self.generate_schema(self._resolve_forward_ref(obj))
1171
+
1172
+ BaseModel = import_cached_base_model()
1173
+
1174
+ if lenient_issubclass(obj, BaseModel):
1175
+ with self.model_type_stack.push(obj):
1176
+ return self._model_schema(obj)
1177
+
1178
+ if isinstance(obj, PydanticRecursiveRef):
1179
+ return core_schema.definition_reference_schema(schema_ref=obj.type_ref)
1180
+
1181
+ return self.match_type(obj, origin)
1182
+
1183
+ def match_type(self, obj: Any, origin: Any) -> core_schema.CoreSchema: # noqa: C901
1184
+ """Main mapping of types to schemas.
1185
+
1186
+ The general structure is a series of if statements starting with the simple cases
1187
+ (non-generic primitive types) and then handling generics and other more complex cases.
1188
+
1189
+ Each case either generates a schema directly, calls into a public user-overridable method
1190
+ (like `GenerateSchema.tuple_variable_schema`) or calls into a private method that handles some
1191
+ boilerplate before calling into the user-facing method (e.g. `GenerateSchema._tuple_schema`).
1192
+
1193
+ The idea is that we'll evolve this into adding more and more user facing methods over time
1194
+ as they get requested and we figure out what the right API for them is.
1195
+ """
1196
+ if typing_objects.is_any(obj) or typing_objects.is_final(obj):
1197
+ # TODO: I'm not sure obj can be `Final` here, we call `typing_inspection.introspection.inspect_annotation()`
1198
+ # early for model-like fields, which handles it already.
1199
+ return core_schema.any_schema()
1200
+
1201
+ if origin is not None and (aliased_obj := typing_objects.DEPRECATED_ALIASES_IDS.get(id(obj))):
1202
+ # See https://typing-inspection.pydantic.dev/dev/usage/#inspecting-the-type-expression:
1203
+ obj = aliased_obj
1204
+ origin = None
1205
+
1206
+ if origin is None:
1207
+ # Thanks to the checks before this point, no origin means `obj` is a
1208
+ # simple type (not a generic alias, a union, an `Annotated` form).
1209
+ # examples: int, str, list, dict, collections.abc.Mapping, a `TypeAliasType` instance.
1210
+ try:
1211
+ handler = self._handlers.get(obj)
1212
+ except TypeError:
1213
+ pass
1214
+ else:
1215
+ if handler is not None:
1216
+ return handler(self, obj)
1217
+
1218
+ if typing_objects.is_typealiastype(obj):
1219
+ return self._type_alias_type_schema(obj)
1220
+ elif is_typeddict(obj):
1221
+ return self._typed_dict_schema(obj, None)
1222
+ elif inspect.isclass(obj) and issubclass(obj, Enum):
1223
+ # NOTE: this must come before the `is_namedtuple()` check as enums values
1224
+ # can be namedtuples:
1225
+ return self._enum_schema(obj)
1226
+ elif _typing_extra.is_namedtuple(obj):
1227
+ return self._namedtuple_schema(obj, None)
1228
+ elif typing_objects.is_newtype(obj):
1229
+ return self.generate_schema(obj.__supertype__)
1230
+ elif isinstance(obj, typing.TypeVar):
1231
+ return self._unsubstituted_typevar_schema(obj)
1232
+ elif isinstance(obj, VALIDATE_CALL_SUPPORTED_TYPES):
1233
+ return self._call_schema(obj) # pyright: ignore[reportArgumentType]
1234
+ # dataclasses.is_dataclass coerces dc instances to types, but we only handle
1235
+ # the case of a dc type here
1236
+ elif dataclasses.is_dataclass(obj):
1237
+ return self._dataclass_schema(obj, None) # pyright: ignore[reportArgumentType]
1238
+
1239
+ if origin is not None:
1240
+ return self._match_generic_type(obj, origin)
1241
+
1242
+ if self._arbitrary_types:
1243
+ return self._arbitrary_type_schema(obj)
1244
+ return self._unknown_type_schema(obj)
1245
+
1246
+ def _match_generic_type(self, obj: Any, origin: Any) -> CoreSchema: # noqa: C901
1247
+ # Need to handle generic dataclasses before looking for the schema properties because attribute accesses
1248
+ # on _GenericAlias delegate to the origin type, so lose the information about the concrete parametrization
1249
+ # As a result, currently, there is no way to cache the schema for generic dataclasses. This may be possible
1250
+ # to resolve by modifying the value returned by `Generic.__class_getitem__`, but that is a dangerous game.
1251
+ if dataclasses.is_dataclass(origin):
1252
+ return self._dataclass_schema(obj, origin) # pyright: ignore[reportArgumentType]
1253
+ elif _typing_extra.is_namedtuple(origin):
1254
+ return self._namedtuple_schema(obj, origin)
1255
+ elif typing_objects.is_final(origin):
1256
+ # TODO: I'm not sure obj can be `Final` here, we call `typing_inspection.introspection.inspect_annotation()`
1257
+ # early for model-like fields, which handles it already.
1258
+ return self.generate_schema(self._get_first_arg_or_any(obj))
1259
+
1260
+ schema = self._generate_schema_from_get_schema_method(origin, obj)
1261
+ if schema is not None:
1262
+ return schema
1263
+
1264
+ try:
1265
+ handler = self._generic_handlers.get(origin)
1266
+ except TypeError:
1267
+ pass
1268
+ else:
1269
+ if handler is not None:
1270
+ return handler(self, obj)
1271
+
1272
+ if typing_objects.is_typealiastype(origin):
1273
+ return self._type_alias_type_schema(obj)
1274
+ elif is_typeddict(origin):
1275
+ return self._typed_dict_schema(obj, origin)
1276
+
1277
+ if self._arbitrary_types:
1278
+ return self._arbitrary_type_schema(origin)
1279
+ return self._unknown_type_schema(obj)
1280
+
1281
+ def _generate_td_field_schema(
1282
+ self,
1283
+ name: str,
1284
+ field_info: FieldInfo,
1285
+ decorators: DecoratorInfos,
1286
+ *,
1287
+ required: bool = True,
1288
+ ) -> core_schema.TypedDictField:
1289
+ """Prepare a TypedDictField to represent a model or typeddict field."""
1290
+ schema, metadata = self._common_field_schema(name, field_info, decorators)
1291
+ return core_schema.typed_dict_field(
1292
+ schema,
1293
+ required=False if not field_info.is_required() else required,
1294
+ serialization_exclude=field_info.exclude,
1295
+ validation_alias=_convert_to_aliases(field_info.validation_alias),
1296
+ serialization_alias=field_info.serialization_alias,
1297
+ serialization_exclude_if=field_info.exclude_if,
1298
+ metadata=metadata,
1299
+ )
1300
+
1301
+ def _generate_md_field_schema(
1302
+ self,
1303
+ name: str,
1304
+ field_info: FieldInfo,
1305
+ decorators: DecoratorInfos,
1306
+ ) -> core_schema.ModelField:
1307
+ """Prepare a ModelField to represent a model field."""
1308
+ schema, metadata = self._common_field_schema(name, field_info, decorators)
1309
+ return core_schema.model_field(
1310
+ schema,
1311
+ serialization_exclude=field_info.exclude,
1312
+ validation_alias=_convert_to_aliases(field_info.validation_alias),
1313
+ serialization_alias=field_info.serialization_alias,
1314
+ serialization_exclude_if=field_info.exclude_if,
1315
+ frozen=field_info.frozen,
1316
+ metadata=metadata,
1317
+ )
1318
+
1319
+ def _generate_dc_field_schema(
1320
+ self,
1321
+ name: str,
1322
+ field_info: FieldInfo,
1323
+ decorators: DecoratorInfos,
1324
+ ) -> core_schema.DataclassField:
1325
+ """Prepare a DataclassField to represent the parameter/field, of a dataclass."""
1326
+ schema, metadata = self._common_field_schema(name, field_info, decorators)
1327
+ return core_schema.dataclass_field(
1328
+ name,
1329
+ schema,
1330
+ init=field_info.init,
1331
+ init_only=field_info.init_var or None,
1332
+ kw_only=None if field_info.kw_only else False,
1333
+ serialization_exclude=field_info.exclude,
1334
+ validation_alias=_convert_to_aliases(field_info.validation_alias),
1335
+ serialization_alias=field_info.serialization_alias,
1336
+ serialization_exclude_if=field_info.exclude_if,
1337
+ frozen=field_info.frozen,
1338
+ metadata=metadata,
1339
+ )
1340
+
1341
+ def _common_field_schema( # C901
1342
+ self, name: str, field_info: FieldInfo, decorators: DecoratorInfos
1343
+ ) -> tuple[CoreSchema, dict[str, Any]]:
1344
+ source_type, annotations = field_info.annotation, field_info.metadata
1345
+
1346
+ def set_discriminator(schema: CoreSchema) -> CoreSchema:
1347
+ schema = self._apply_discriminator_to_union(schema, field_info.discriminator)
1348
+ return schema
1349
+
1350
+ # Convert `@field_validator` decorators to `Before/After/Plain/WrapValidator` instances:
1351
+ if decorators.field_validators:
1352
+ validators_from_decorators = [
1353
+ _mode_to_validator[decorator.info.mode]._from_decorator(decorator)
1354
+ for decorator in filter_field_decorator_info_by_field(decorators.field_validators.values(), name)
1355
+ ]
1356
+ else:
1357
+ validators_from_decorators = []
1358
+
1359
+ with self.field_name_stack.push(name):
1360
+ if field_info.discriminator is not None:
1361
+ schema = self._apply_annotations(
1362
+ source_type, annotations + validators_from_decorators, transform_inner_schema=set_discriminator
1363
+ )
1364
+ else:
1365
+ schema = self._apply_annotations(
1366
+ source_type,
1367
+ annotations + validators_from_decorators,
1368
+ )
1369
+
1370
+ if decorators.validators:
1371
+ # This V1 compatibility shim should eventually be removed
1372
+ # push down any `each_item=True` validators
1373
+ # note that this won't work for any Annotated types that get wrapped by a function validator
1374
+ # but that's okay because that didn't exist in V1
1375
+ this_field_validators = filter_field_decorator_info_by_field(decorators.validators.values(), name)
1376
+ if _validators_require_validate_default(this_field_validators):
1377
+ field_info.validate_default = True
1378
+ each_item_validators = [v for v in this_field_validators if v.info.each_item is True]
1379
+ this_field_validators = [v for v in this_field_validators if v not in each_item_validators]
1380
+ schema = apply_each_item_validators(schema, each_item_validators)
1381
+
1382
+ schema = apply_validators(schema, this_field_validators)
1383
+
1384
+ # the default validator needs to go outside of any other validators
1385
+ # so that it is the topmost validator for the field validator
1386
+ # which uses it to check if the field has a default value or not
1387
+ if not field_info.is_required():
1388
+ schema = wrap_default(field_info, schema)
1389
+
1390
+ if decorators.field_serializers:
1391
+ schema = self._apply_field_serializers(
1392
+ schema, filter_field_decorator_info_by_field(decorators.field_serializers.values(), name)
1393
+ )
1394
+
1395
+ pydantic_js_updates, pydantic_js_extra = _extract_json_schema_info_from_field_info(field_info)
1396
+ core_metadata: dict[str, Any] = {}
1397
+ update_core_metadata(
1398
+ core_metadata, pydantic_js_updates=pydantic_js_updates, pydantic_js_extra=pydantic_js_extra
1399
+ )
1400
+
1401
+ return schema, core_metadata
1402
+
1403
+ def _direct_union_schema(self, obj: Any) -> CoreSchema:
1404
+ """Generate the optimized union schema without enlarging general dispatch frames."""
1405
+ if not self._config_wrapper.json_encoders:
1406
+ args = get_args(obj)
1407
+ # These exact simple types cannot attach hooks or union tags. Field-level
1408
+ # metadata and validators still process the fresh schema normally.
1409
+ if all(map(_is_simple_schema_type, args)):
1410
+ choices = [self._handlers[arg](self, arg) for arg in args if arg is not NoneType]
1411
+ if len(choices) == 1:
1412
+ schema = choices[0]
1413
+ else:
1414
+ schema = cast(core_schema.UnionSchema, {'type': 'union', 'choices': choices})
1415
+ if len(choices) < len(args): # one of the args is NoneType, so we need to make the schema nullable
1416
+ return {'type': 'nullable', 'schema': schema}
1417
+ else:
1418
+ return schema
1419
+ return self._union_schema(obj)
1420
+
1421
+ def _union_schema(self, union_type: Any) -> core_schema.CoreSchema:
1422
+ """Generate schema for a Union."""
1423
+ args = self._get_args_resolving_forward_refs(union_type, required=True)
1424
+ choices: list[CoreSchema] = []
1425
+ nullable = False
1426
+ allow_missing = False
1427
+ for arg in args:
1428
+ if arg is NoneType:
1429
+ nullable = True
1430
+ elif arg is MISSING:
1431
+ allow_missing = True
1432
+ else:
1433
+ choices.append(self.generate_schema(arg))
1434
+
1435
+ if not choices:
1436
+ # Only `None` and `MISSING` were present in the union (e.g. `None | MISSING`):
1437
+ s = core_schema.none_schema()
1438
+ nullable = False
1439
+ elif len(choices) == 1:
1440
+ s = choices[0]
1441
+ else:
1442
+ choices_with_tags: list[CoreSchema | tuple[CoreSchema, str]] = []
1443
+ for choice in choices:
1444
+ tag = cast(CoreMetadata, choice.get('metadata', {})).get('pydantic_internal_union_tag_key')
1445
+ if tag is not None:
1446
+ choices_with_tags.append((choice, tag))
1447
+ else:
1448
+ choices_with_tags.append(choice)
1449
+ s = core_schema.union_schema(choices_with_tags)
1450
+
1451
+ if nullable:
1452
+ s = core_schema.nullable_schema(s)
1453
+ if allow_missing:
1454
+ s = core_schema.missing_sentinel_schema(s)
1455
+ return s
1456
+
1457
+ def _type_alias_type_schema(self, obj: TypeAliasType) -> CoreSchema:
1458
+ ref = _type_refs.type_alias_type_ref(obj)
1459
+ with self.defs.get_definition_ref_schema(ref=ref) as maybe_schema:
1460
+ if maybe_schema is not None:
1461
+ return maybe_schema
1462
+
1463
+ origin: TypeAliasType = get_origin(obj) or obj
1464
+ typevars_map = get_standard_typevars_map(obj)
1465
+
1466
+ with self._ns_resolver.push(origin):
1467
+ try:
1468
+ annotation = _typing_extra.eval_type(origin.__value__, *self._types_namespace)
1469
+ except NameError as e:
1470
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
1471
+ annotation = replace_types(annotation, typevars_map)
1472
+ schema = self.generate_schema(annotation)
1473
+ assert schema['type'] != 'definitions'
1474
+ schema['ref'] = ref # type: ignore
1475
+ return self.defs.create_definition_reference_schema(schema)
1476
+
1477
+ def _literal_schema(self, literal_type: Any) -> CoreSchema:
1478
+ """Generate schema for a Literal."""
1479
+ expected = list(get_literal_values(literal_type, type_check=False, unpack_type_aliases='eager'))
1480
+ assert expected, f'literal "expected" cannot be empty, obj={literal_type}'
1481
+ schema = core_schema.literal_schema(expected)
1482
+
1483
+ if self._config_wrapper.use_enum_values and any(isinstance(v, Enum) for v in expected):
1484
+ schema = core_schema.no_info_after_validator_function(
1485
+ lambda v: v.value if isinstance(v, Enum) else v, schema
1486
+ )
1487
+
1488
+ return schema
1489
+
1490
+ def _typed_dict_schema(self, typed_dict_cls: Any, origin: Any) -> core_schema.CoreSchema:
1491
+ """Generate a core schema for a `TypedDict` class.
1492
+
1493
+ To be able to build a `DecoratorInfos` instance for the `TypedDict` class (which will include
1494
+ validators, serializers, etc.), we need to have access to the original bases of the class
1495
+ (see https://docs.python.org/3/library/types.html#types.get_original_bases).
1496
+ However, the `__orig_bases__` attribute was only added in 3.12 (https://github.com/python/cpython/pull/103698).
1497
+
1498
+ For this reason, we require Python 3.12 (or using the `typing_extensions` backport).
1499
+ """
1500
+ FieldInfo = import_cached_field_info()
1501
+
1502
+ typed_dict_ref = _type_refs.class_type_ref(typed_dict_cls, origin)
1503
+ with (
1504
+ self.model_type_stack.push(typed_dict_cls),
1505
+ self.defs.get_definition_ref_schema(ref=typed_dict_ref) as maybe_schema,
1506
+ ):
1507
+ if maybe_schema is not None:
1508
+ return maybe_schema
1509
+
1510
+ typevars_map = get_standard_typevars_map(typed_dict_cls)
1511
+ if origin is not None:
1512
+ typed_dict_cls = origin
1513
+
1514
+ if not _SUPPORTS_TYPEDDICT and type(typed_dict_cls).__module__ == 'typing':
1515
+ raise PydanticUserError(
1516
+ 'Please use `typing_extensions.TypedDict` instead of `typing.TypedDict` on Python < 3.12.',
1517
+ code='typed-dict-version',
1518
+ )
1519
+
1520
+ try:
1521
+ # if a typed dictionary class doesn't have config, we use the parent's config, hence a default of `None`
1522
+ # see https://github.com/pydantic/pydantic/issues/10917
1523
+ config: ConfigDict | None = get_attribute_from_bases(typed_dict_cls, '__pydantic_config__')
1524
+ except AttributeError:
1525
+ config = None
1526
+
1527
+ with self._config_wrapper_stack.push(config):
1528
+ core_config = self._config_wrapper.core_config(title=typed_dict_cls.__name__)
1529
+
1530
+ required_keys: frozenset[str] = typed_dict_cls.__required_keys__
1531
+
1532
+ fields: dict[str, core_schema.TypedDictField] = {}
1533
+
1534
+ decorators = DecoratorInfos.build(typed_dict_cls, replace_wrapped_methods=False)
1535
+ decorators.update_from_config(self._config_wrapper)
1536
+
1537
+ if self._config_wrapper.use_attribute_docstrings:
1538
+ field_docstrings = extract_docstrings_from_cls(typed_dict_cls, use_inspect=True)
1539
+ else:
1540
+ field_docstrings = None
1541
+
1542
+ try:
1543
+ annotations = _typing_extra.get_cls_type_hints(typed_dict_cls, ns_resolver=self._ns_resolver)
1544
+ except NameError as e:
1545
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
1546
+
1547
+ readonly_fields: list[str] = []
1548
+
1549
+ for field_name, annotation in annotations.items():
1550
+ field_info = FieldInfo.from_annotation(annotation, _source=AnnotationSource.TYPED_DICT)
1551
+ field_info.annotation = replace_types(field_info.annotation, typevars_map)
1552
+
1553
+ required = (
1554
+ field_name in required_keys or 'required' in field_info._qualifiers
1555
+ ) and 'not_required' not in field_info._qualifiers
1556
+ if 'read_only' in field_info._qualifiers:
1557
+ readonly_fields.append(field_name)
1558
+
1559
+ if (
1560
+ field_docstrings is not None
1561
+ and field_info.description is None
1562
+ and field_name in field_docstrings
1563
+ ):
1564
+ field_info.description = field_docstrings[field_name]
1565
+ update_field_from_config(self._config_wrapper, field_name, field_info)
1566
+
1567
+ fields[field_name] = self._generate_td_field_schema(
1568
+ field_name, field_info, decorators, required=required
1569
+ )
1570
+
1571
+ if readonly_fields:
1572
+ fields_repr = ', '.join(repr(f) for f in readonly_fields)
1573
+ plural = len(readonly_fields) >= 2
1574
+ warnings.warn(
1575
+ f'Item{"s" if plural else ""} {fields_repr} on TypedDict class {typed_dict_cls.__name__!r} '
1576
+ f'{"are" if plural else "is"} using the `ReadOnly` qualifier. Pydantic will not protect items '
1577
+ 'from any mutation on dictionary instances.',
1578
+ UserWarning,
1579
+ )
1580
+
1581
+ extra_behavior: core_schema.ExtraBehavior = 'ignore'
1582
+ extras_schema: CoreSchema | None = None # For 'allow', equivalent to `Any` - no validation performed.
1583
+
1584
+ is_closed, extra_items, extra_items_readonly = _get_typed_dict_extra_items(typed_dict_cls)
1585
+ if is_closed:
1586
+ extra_behavior = 'forbid'
1587
+ extras_schema = None
1588
+ elif not typing_objects.is_noextraitems(extra_items):
1589
+ extra_behavior = 'allow'
1590
+ extras_schema = self.generate_schema(replace_types(extra_items, typevars_map))
1591
+
1592
+ if extra_items_readonly:
1593
+ warnings.warn(
1594
+ f'Extra items on TypedDict class {typed_dict_cls.__name__!r} are using the `ReadOnly` qualifier. '
1595
+ 'Pydantic will not protect items from any mutation on dictionary instances.',
1596
+ UserWarning,
1597
+ )
1598
+
1599
+ if (config_extra := self._config_wrapper.extra) in ('allow', 'forbid'):
1600
+ if is_closed and config_extra == 'allow':
1601
+ warnings.warn(
1602
+ f"TypedDict class {typed_dict_cls.__qualname__!r} is closed, but 'extra' configuration "
1603
+ "is set to `'allow'`. The 'extra' configuration value will be ignored.",
1604
+ category=TypedDictExtraConfigWarning,
1605
+ )
1606
+ elif not typing_objects.is_noextraitems(extra_items) and config_extra == 'forbid':
1607
+ warnings.warn(
1608
+ f"TypedDict class {typed_dict_cls.__qualname__!r} allows extra items, but 'extra' configuration "
1609
+ "is set to `'forbid'`. The 'extra' configuration value will be ignored.",
1610
+ category=TypedDictExtraConfigWarning,
1611
+ )
1612
+ else:
1613
+ extra_behavior = config_extra
1614
+
1615
+ td_schema = core_schema.typed_dict_schema(
1616
+ fields,
1617
+ cls=typed_dict_cls,
1618
+ computed_fields=[
1619
+ self._computed_field_schema(d, decorators.field_serializers)
1620
+ for d in decorators.computed_fields.values()
1621
+ ],
1622
+ extra_behavior=extra_behavior,
1623
+ extras_schema=extras_schema,
1624
+ ref=typed_dict_ref,
1625
+ config=core_config,
1626
+ )
1627
+
1628
+ schema = self._apply_model_serializers(td_schema, decorators.model_serializers.values())
1629
+ schema = apply_model_validators(schema, decorators.model_validators.values(), 'all')
1630
+ return self.defs.create_definition_reference_schema(schema)
1631
+
1632
+ def _namedtuple_schema(self, namedtuple_cls: Any, origin: Any) -> core_schema.CoreSchema:
1633
+ """Generate schema for a NamedTuple."""
1634
+ namedtuple_ref = _type_refs.class_type_ref(namedtuple_cls, origin)
1635
+ with (
1636
+ self.model_type_stack.push(namedtuple_cls),
1637
+ self.defs.get_definition_ref_schema(ref=namedtuple_ref) as maybe_schema,
1638
+ ):
1639
+ if maybe_schema is not None:
1640
+ return maybe_schema
1641
+ typevars_map = get_standard_typevars_map(namedtuple_cls)
1642
+ if origin is not None:
1643
+ namedtuple_cls = origin
1644
+
1645
+ try:
1646
+ annotations = _typing_extra.get_cls_type_hints(namedtuple_cls, ns_resolver=self._ns_resolver)
1647
+ except NameError as e:
1648
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
1649
+
1650
+ # Filter annotations to only include fields that are actually in the NamedTuple
1651
+ # (as subclassing an existing NamedTuple is not supported yet - see https://github.com/python/typing/issues/427)
1652
+ # and use `Any` if no annotation exist (i.e. when using `collections.namedtuple()`).
1653
+ annotations = {field_name: annotations.get(field_name, Any) for field_name in namedtuple_cls._fields}
1654
+
1655
+ if typevars_map:
1656
+ annotations = {
1657
+ field_name: replace_types(annotation, typevars_map)
1658
+ for field_name, annotation in annotations.items()
1659
+ }
1660
+
1661
+ schema = core_schema.named_tuple_schema(
1662
+ namedtuple_cls,
1663
+ [
1664
+ self._generate_namedtuple_field_schema(
1665
+ field_name,
1666
+ annotation,
1667
+ default=namedtuple_cls._field_defaults.get(field_name, Parameter.empty),
1668
+ )
1669
+ for field_name, annotation in annotations.items()
1670
+ ],
1671
+ ref=namedtuple_ref,
1672
+ )
1673
+ return self.defs.create_definition_reference_schema(schema)
1674
+
1675
+ def _generate_namedtuple_field_schema(
1676
+ self,
1677
+ name: str,
1678
+ annotation: Any,
1679
+ default: Any = Parameter.empty,
1680
+ ) -> core_schema.NamedTupleField:
1681
+ """Generate the definition of a field in a named tuple."""
1682
+ FieldInfo = import_cached_field_info()
1683
+
1684
+ if default is Parameter.empty:
1685
+ field = FieldInfo.from_annotation(annotation, _source=AnnotationSource.NAMED_TUPLE)
1686
+ else:
1687
+ field = FieldInfo.from_annotated_attribute(annotation, default, _source=AnnotationSource.NAMED_TUPLE)
1688
+
1689
+ assert field.annotation is not None, 'field.annotation should not be None when generating a schema'
1690
+ update_field_from_config(self._config_wrapper, name, field)
1691
+
1692
+ with self.field_name_stack.push(name):
1693
+ schema = self._apply_annotations(
1694
+ field.annotation,
1695
+ [field],
1696
+ # Because we pass `field` as metadata above (required for attributes relevant for
1697
+ # JSON Scheme generation), we need to ignore the potential warnings about `FieldInfo`
1698
+ # attributes that will not be used:
1699
+ check_unsupported_field_info_attributes=False,
1700
+ )
1701
+
1702
+ if not field.is_required():
1703
+ schema = wrap_default(field, schema)
1704
+
1705
+ return core_schema.named_tuple_field(
1706
+ name,
1707
+ schema,
1708
+ validation_alias=_convert_to_aliases(field.validation_alias),
1709
+ )
1710
+
1711
+ def _generate_parameter_schema(
1712
+ self,
1713
+ name: str,
1714
+ annotation: type[Any],
1715
+ source: AnnotationSource,
1716
+ default: Any = Parameter.empty,
1717
+ mode: Literal['positional_only', 'positional_or_keyword', 'keyword_only'] | None = None,
1718
+ ) -> core_schema.ArgumentsParameter:
1719
+ """Generate the definition of a parameter in a function signature.
1720
+
1721
+ This definition is meant to be used for the `'arguments'` core schema, which will be replaced
1722
+ in V3 by the `'arguments-v3`'.
1723
+ """
1724
+ FieldInfo = import_cached_field_info()
1725
+
1726
+ if default is Parameter.empty:
1727
+ field = FieldInfo.from_annotation(annotation, _source=source)
1728
+ else:
1729
+ field = FieldInfo.from_annotated_attribute(annotation, default, _source=source)
1730
+
1731
+ assert field.annotation is not None, 'field.annotation should not be None when generating a schema'
1732
+ update_field_from_config(self._config_wrapper, name, field)
1733
+
1734
+ with self.field_name_stack.push(name):
1735
+ schema = self._apply_annotations(
1736
+ field.annotation,
1737
+ [field],
1738
+ # Because we pass `field` as metadata above (required for attributes relevant for
1739
+ # JSON Scheme generation), we need to ignore the potential warnings about `FieldInfo`
1740
+ # attributes that will not be used:
1741
+ check_unsupported_field_info_attributes=False,
1742
+ )
1743
+
1744
+ if not field.is_required():
1745
+ schema = wrap_default(field, schema)
1746
+
1747
+ parameter_schema = core_schema.arguments_parameter(
1748
+ name,
1749
+ schema,
1750
+ mode=mode,
1751
+ alias=_convert_to_aliases(field.validation_alias),
1752
+ )
1753
+
1754
+ return parameter_schema
1755
+
1756
+ def _generate_parameter_v3_schema(
1757
+ self,
1758
+ name: str,
1759
+ annotation: Any,
1760
+ source: AnnotationSource,
1761
+ mode: Literal[
1762
+ 'positional_only',
1763
+ 'positional_or_keyword',
1764
+ 'keyword_only',
1765
+ 'var_args',
1766
+ 'var_kwargs_uniform',
1767
+ 'var_kwargs_unpacked_typed_dict',
1768
+ ],
1769
+ default: Any = Parameter.empty,
1770
+ ) -> core_schema.ArgumentsV3Parameter:
1771
+ """Generate the definition of a parameter in a function signature.
1772
+
1773
+ This definition is meant to be used for the `'arguments-v3'` core schema, which will replace
1774
+ the `'arguments`' schema in V3.
1775
+ """
1776
+ FieldInfo = import_cached_field_info()
1777
+
1778
+ if default is Parameter.empty:
1779
+ field = FieldInfo.from_annotation(annotation, _source=source)
1780
+ else:
1781
+ field = FieldInfo.from_annotated_attribute(annotation, default, _source=source)
1782
+ update_field_from_config(self._config_wrapper, name, field)
1783
+
1784
+ with self.field_name_stack.push(name):
1785
+ schema = self._apply_annotations(
1786
+ field.annotation,
1787
+ [field],
1788
+ # Because we pass `field` as metadata above (required for attributes relevant for
1789
+ # JSON Scheme generation), we need to ignore the potential warnings about `FieldInfo`
1790
+ # attributes that will not be used:
1791
+ check_unsupported_field_info_attributes=False,
1792
+ )
1793
+
1794
+ if not field.is_required():
1795
+ schema = wrap_default(field, schema)
1796
+
1797
+ parameter_schema = core_schema.arguments_v3_parameter(
1798
+ name=name,
1799
+ schema=schema,
1800
+ mode=mode,
1801
+ alias=_convert_to_aliases(field.validation_alias),
1802
+ )
1803
+
1804
+ return parameter_schema
1805
+
1806
+ def _tuple_schema(self, tuple_type: Any) -> core_schema.CoreSchema:
1807
+ """Generate schema for a Tuple, e.g. `tuple[int, str]` or `tuple[int, ...]`."""
1808
+ # TODO: do we really need to resolve type vars here?
1809
+ typevars_map = get_standard_typevars_map(tuple_type)
1810
+ params = self._get_args_resolving_forward_refs(tuple_type)
1811
+
1812
+ if typevars_map and params:
1813
+ params = tuple(replace_types(param, typevars_map) for param in params)
1814
+
1815
+ # NOTE: subtle difference: `tuple[()]` gives `params=()`, whereas `typing.Tuple[()]` gives `params=((),)`
1816
+ # This is only true for <3.11, on Python 3.11+ `typing.Tuple[()]` gives `params=()`
1817
+ if not params:
1818
+ if tuple_type in TUPLE_TYPES:
1819
+ return core_schema.tuple_schema([core_schema.any_schema()], variadic_item_index=0)
1820
+ else:
1821
+ # special case for `tuple[()]` which means `tuple[]` - an empty tuple
1822
+ return core_schema.tuple_schema([])
1823
+ elif params[-1] is Ellipsis:
1824
+ if len(params) == 2:
1825
+ return core_schema.tuple_schema([self.generate_schema(params[0])], variadic_item_index=0)
1826
+ else:
1827
+ # TODO: something like https://github.com/pydantic/pydantic/issues/5952
1828
+ raise ValueError('Variable tuples can only have one type')
1829
+ elif len(params) == 1 and params[0] == ():
1830
+ # special case for `tuple[()]` which means `tuple[]` - an empty tuple
1831
+ # NOTE: This conditional can be removed when we drop support for Python 3.10.
1832
+ return core_schema.tuple_schema([])
1833
+ else:
1834
+ return core_schema.tuple_schema([self.generate_schema(param) for param in params])
1835
+
1836
+ def _type_schema(self) -> core_schema.CoreSchema:
1837
+ return core_schema.custom_error_schema(
1838
+ core_schema.is_instance_schema(type),
1839
+ custom_error_type='is_type',
1840
+ custom_error_message='Input should be a type',
1841
+ )
1842
+
1843
+ def _zoneinfo_schema(self) -> core_schema.CoreSchema:
1844
+ """Generate schema for a zone_info.ZoneInfo object"""
1845
+ from ._validators import validate_str_is_valid_iana_tz
1846
+
1847
+ metadata = {'pydantic_js_functions': [lambda _1, _2: {'type': 'string', 'format': 'zoneinfo'}]}
1848
+ return core_schema.no_info_plain_validator_function(
1849
+ validate_str_is_valid_iana_tz,
1850
+ serialization=core_schema.to_string_ser_schema(),
1851
+ metadata=metadata,
1852
+ )
1853
+
1854
+ def _union_is_subclass_schema(self, union_type: Any) -> core_schema.CoreSchema:
1855
+ """Generate schema for `type[Union[X, ...]]`."""
1856
+ args = self._get_args_resolving_forward_refs(union_type, required=True)
1857
+ return core_schema.union_schema([self.generate_schema(type[args]) for args in args])
1858
+
1859
+ def _subclass_schema(self, type_: Any) -> core_schema.CoreSchema:
1860
+ """Generate schema for a type, e.g. `type[int]`."""
1861
+ type_param = self._get_first_arg_or_any(type_)
1862
+
1863
+ # Assume `type[Annotated[<typ>, ...]]` is equivalent to `type[<typ>]`:
1864
+ type_param = _typing_extra.annotated_type(type_param) or type_param
1865
+
1866
+ if typing_objects.is_any(type_param):
1867
+ return self._type_schema()
1868
+ elif typing_objects.is_typealiastype(type_param):
1869
+ return self.generate_schema(type[type_param.__value__])
1870
+ elif typing_objects.is_typevar(type_param):
1871
+ if type_param.__bound__:
1872
+ if is_union_origin(get_origin(type_param.__bound__)):
1873
+ return self._union_is_subclass_schema(type_param.__bound__)
1874
+ return core_schema.is_subclass_schema(type_param.__bound__)
1875
+ elif type_param.__constraints__:
1876
+ return core_schema.union_schema([self.generate_schema(type[c]) for c in type_param.__constraints__])
1877
+ else:
1878
+ return self._type_schema()
1879
+ elif is_union_origin(get_origin(type_param)):
1880
+ return self._union_is_subclass_schema(type_param)
1881
+ else:
1882
+ if typing_objects.is_self(type_param):
1883
+ type_param = self._resolve_self_type(type_param)
1884
+ if _typing_extra.is_generic_alias(type_param):
1885
+ raise PydanticUserError(
1886
+ 'Subscripting `type[]` with an already parametrized type is not supported. '
1887
+ f'Instead of using type[{type_param!r}], use type[{_repr.display_as_type(get_origin(type_param))}].',
1888
+ code=None,
1889
+ )
1890
+ if not inspect.isclass(type_param):
1891
+ # when using type[None], this doesn't type convert to type[NoneType], and None isn't a class
1892
+ # so we handle it manually here
1893
+ if type_param is None:
1894
+ return core_schema.is_subclass_schema(NoneType)
1895
+ raise TypeError(f'Expected a class, got {type_param!r}')
1896
+ return core_schema.is_subclass_schema(type_param)
1897
+
1898
+ def _sequence_schema(self, items_type: Any) -> core_schema.CoreSchema:
1899
+ """Generate schema for a Sequence, e.g. `Sequence[int]`."""
1900
+ from ._serializers import serialize_sequence_via_list
1901
+
1902
+ item_type_schema = self.generate_schema(items_type)
1903
+ list_schema = core_schema.list_schema(item_type_schema)
1904
+
1905
+ json_schema = smart_deepcopy(list_schema)
1906
+ python_schema = core_schema.is_instance_schema(typing.Sequence, cls_repr='Sequence')
1907
+ if not typing_objects.is_any(items_type):
1908
+ from ._validators import sequence_validator
1909
+
1910
+ python_schema = core_schema.chain_schema(
1911
+ [python_schema, core_schema.no_info_wrap_validator_function(sequence_validator, list_schema)],
1912
+ )
1913
+
1914
+ serialization = core_schema.wrap_serializer_function_ser_schema(
1915
+ serialize_sequence_via_list, schema=item_type_schema, info_arg=True
1916
+ )
1917
+ return core_schema.json_or_python_schema(
1918
+ json_schema=json_schema, python_schema=python_schema, serialization=serialization
1919
+ )
1920
+
1921
+ def _iterable_schema(self, type_: Any) -> core_schema.GeneratorSchema:
1922
+ """Generate a schema for an `Iterable`."""
1923
+ item_type = self._get_first_arg_or_any(type_)
1924
+
1925
+ return core_schema.generator_schema(self.generate_schema(item_type))
1926
+
1927
+ def _pattern_schema(self, pattern_type: Any) -> core_schema.CoreSchema:
1928
+ from . import _validators
1929
+
1930
+ metadata = {'pydantic_js_functions': [lambda _1, _2: {'type': 'string', 'format': 'regex'}]}
1931
+ ser = core_schema.plain_serializer_function_ser_schema(
1932
+ attrgetter('pattern'), when_used='json', return_schema=core_schema.str_schema()
1933
+ )
1934
+ if pattern_type is typing.Pattern or pattern_type is re.Pattern:
1935
+ # bare type
1936
+ return core_schema.no_info_plain_validator_function(
1937
+ _validators.pattern_either_validator, serialization=ser, metadata=metadata
1938
+ )
1939
+
1940
+ param = self._get_args_resolving_forward_refs(
1941
+ pattern_type,
1942
+ required=True,
1943
+ )[0]
1944
+ if param is str:
1945
+ return core_schema.no_info_plain_validator_function(
1946
+ _validators.pattern_str_validator, serialization=ser, metadata=metadata
1947
+ )
1948
+ elif param is bytes:
1949
+ return core_schema.no_info_plain_validator_function(
1950
+ _validators.pattern_bytes_validator, serialization=ser, metadata=metadata
1951
+ )
1952
+ else:
1953
+ raise PydanticSchemaGenerationError(f'Unable to generate pydantic-core schema for {pattern_type!r}.')
1954
+
1955
+ def _hashable_schema(self) -> core_schema.CoreSchema:
1956
+ return core_schema.custom_error_schema(
1957
+ schema=core_schema.json_or_python_schema(
1958
+ json_schema=core_schema.chain_schema(
1959
+ [core_schema.any_schema(), core_schema.is_instance_schema(collections.abc.Hashable)]
1960
+ ),
1961
+ python_schema=core_schema.is_instance_schema(collections.abc.Hashable),
1962
+ ),
1963
+ custom_error_type='is_hashable',
1964
+ custom_error_message='Input should be hashable',
1965
+ )
1966
+
1967
+ def _dataclass_schema(
1968
+ self, dataclass: type[StandardDataclass], origin: type[StandardDataclass] | None
1969
+ ) -> core_schema.CoreSchema:
1970
+ """Generate schema for a dataclass."""
1971
+ dataclass_ref = _type_refs.class_type_ref(dataclass, origin)
1972
+ with (
1973
+ self.model_type_stack.push(dataclass),
1974
+ self.defs.get_definition_ref_schema(ref=dataclass_ref) as maybe_schema,
1975
+ ):
1976
+ if maybe_schema is not None:
1977
+ return maybe_schema
1978
+
1979
+ schema = dataclass.__dict__.get('__pydantic_core_schema__')
1980
+ if schema is not None and not isinstance(schema, MockCoreSchema):
1981
+ if schema['type'] == 'definitions':
1982
+ schema = self.defs.unpack_definitions(schema)
1983
+ ref = get_ref(schema)
1984
+ if ref:
1985
+ return self.defs.create_definition_reference_schema(schema)
1986
+ else:
1987
+ return schema
1988
+
1989
+ typevars_map = get_standard_typevars_map(dataclass)
1990
+ if origin is not None:
1991
+ dataclass = origin
1992
+
1993
+ # if (plain) dataclass doesn't have config, we use the parent's config, hence a default of `None`
1994
+ # (Pydantic dataclasses have an empty dict config by default).
1995
+ # see https://github.com/pydantic/pydantic/issues/10917
1996
+ config = getattr(dataclass, '__pydantic_config__', None)
1997
+
1998
+ from ..dataclasses import is_pydantic_dataclass
1999
+
2000
+ with self._ns_resolver.push(dataclass), self._config_wrapper_stack.push(config):
2001
+ if is_pydantic_dataclass(dataclass):
2002
+ if dataclass.__pydantic_fields_complete__():
2003
+ # Copy the field info instances to avoid mutating the `FieldInfo` instances
2004
+ # of the generic dataclass generic origin (e.g. `apply_typevars_map` below).
2005
+ # Note that we don't apply `deepcopy` on `__pydantic_fields__` because we
2006
+ # don't want to copy the `FieldInfo` attributes:
2007
+ fields = {
2008
+ f_name: copy(field_info) for f_name, field_info in dataclass.__pydantic_fields__.items()
2009
+ }
2010
+ if typevars_map:
2011
+ for field in fields.values():
2012
+ field.apply_typevars_map(typevars_map, *self._types_namespace)
2013
+ else:
2014
+ try:
2015
+ fields = rebuild_dataclass_fields(
2016
+ dataclass,
2017
+ config_wrapper=self._config_wrapper,
2018
+ ns_resolver=self._ns_resolver,
2019
+ typevars_map=typevars_map or {},
2020
+ )
2021
+ except NameError as e:
2022
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
2023
+ else:
2024
+ fields = collect_dataclass_fields(
2025
+ dataclass,
2026
+ typevars_map=typevars_map,
2027
+ config_wrapper=self._config_wrapper,
2028
+ )
2029
+
2030
+ if self._config_wrapper.extra == 'allow':
2031
+ # disallow combination of init=False on a dataclass field and extra='allow' on a dataclass
2032
+ for field_name, field in fields.items():
2033
+ if field.init is False:
2034
+ raise PydanticUserError(
2035
+ f'Field {field_name} has `init=False` and dataclass has config setting `extra="allow"`. '
2036
+ f'This combination is not allowed.',
2037
+ code='dataclass-init-false-extra-allow',
2038
+ )
2039
+
2040
+ decorators = dataclass.__dict__.get('__pydantic_decorators__')
2041
+ if decorators is None:
2042
+ decorators = DecoratorInfos.build(dataclass, replace_wrapped_methods=False)
2043
+ decorators.update_from_config(self._config_wrapper)
2044
+ # Move kw_only=False args to the start of the list, as this is how vanilla dataclasses work.
2045
+ # Note that when kw_only is missing or None, it is treated as equivalent to kw_only=True
2046
+ args = sorted(
2047
+ (self._generate_dc_field_schema(k, v, decorators) for k, v in fields.items()),
2048
+ key=lambda a: a.get('kw_only') is not False,
2049
+ )
2050
+ has_post_init = hasattr(dataclass, '__post_init__')
2051
+ has_slots = hasattr(dataclass, '__slots__')
2052
+
2053
+ args_schema = core_schema.dataclass_args_schema(
2054
+ dataclass.__name__,
2055
+ args,
2056
+ computed_fields=[
2057
+ self._computed_field_schema(d, decorators.field_serializers)
2058
+ for d in decorators.computed_fields.values()
2059
+ ],
2060
+ collect_init_only=has_post_init,
2061
+ )
2062
+
2063
+ inner_schema = apply_validators(args_schema, decorators.root_validators.values())
2064
+
2065
+ model_validators = decorators.model_validators.values()
2066
+ inner_schema = apply_model_validators(inner_schema, model_validators, 'inner')
2067
+
2068
+ core_config = self._config_wrapper.core_config(title=dataclass.__name__)
2069
+
2070
+ dc_schema = core_schema.dataclass_schema(
2071
+ dataclass,
2072
+ inner_schema,
2073
+ generic_origin=origin,
2074
+ post_init=has_post_init,
2075
+ ref=dataclass_ref,
2076
+ fields=[field.name for field in dataclasses.fields(dataclass)],
2077
+ slots=has_slots,
2078
+ config=core_config,
2079
+ # we don't use a custom __setattr__ for dataclasses, so we must
2080
+ # pass along the frozen config setting to the pydantic-core schema
2081
+ frozen=self._config_wrapper_stack.tail.frozen,
2082
+ )
2083
+ schema = self._apply_model_serializers(dc_schema, decorators.model_serializers.values())
2084
+ schema = apply_model_validators(schema, model_validators, 'outer')
2085
+ return self.defs.create_definition_reference_schema(schema)
2086
+
2087
+ def _call_schema(self, function: ValidateCallSupportedTypes) -> core_schema.CallSchema:
2088
+ """Generate schema for a Callable.
2089
+
2090
+ TODO support functional validators once we support them in Config
2091
+ """
2092
+ arguments_schema = self._arguments_schema(function)
2093
+
2094
+ return_schema: core_schema.CoreSchema | None = None
2095
+ config_wrapper = self._config_wrapper
2096
+ if config_wrapper.validate_return:
2097
+ sig = _typing_extra.signature_no_eval(function)
2098
+ return_hint = sig.return_annotation
2099
+ if return_hint is not sig.empty:
2100
+ globalns, localns = self._types_namespace
2101
+ type_hints = _typing_extra.get_function_type_hints(
2102
+ function, globalns=globalns, localns=localns, include_keys={'return'}
2103
+ )
2104
+ return_schema = self.generate_schema(type_hints['return'])
2105
+
2106
+ return core_schema.call_schema(
2107
+ arguments_schema,
2108
+ function,
2109
+ return_schema=return_schema,
2110
+ )
2111
+
2112
+ def _arguments_schema(
2113
+ self, function: ValidateCallSupportedTypes, parameters_callback: ParametersCallback | None = None
2114
+ ) -> core_schema.ArgumentsSchema:
2115
+ """Generate schema for a Signature."""
2116
+ mode_lookup: dict[_ParameterKind, Literal['positional_only', 'positional_or_keyword', 'keyword_only']] = {
2117
+ Parameter.POSITIONAL_ONLY: 'positional_only',
2118
+ Parameter.POSITIONAL_OR_KEYWORD: 'positional_or_keyword',
2119
+ Parameter.KEYWORD_ONLY: 'keyword_only',
2120
+ }
2121
+
2122
+ sig = _typing_extra.signature_no_eval(function)
2123
+ globalns, localns = self._types_namespace
2124
+ type_hints = _typing_extra.get_function_type_hints(function, globalns=globalns, localns=localns)
2125
+
2126
+ arguments_list: list[core_schema.ArgumentsParameter] = []
2127
+ var_args_schema: core_schema.CoreSchema | None = None
2128
+ var_kwargs_schema: core_schema.CoreSchema | None = None
2129
+ var_kwargs_mode: core_schema.VarKwargsMode | None = None
2130
+
2131
+ core_config = self._config_wrapper.core_config(title=None)
2132
+
2133
+ for i, (name, p) in enumerate(sig.parameters.items()):
2134
+ if p.annotation is sig.empty:
2135
+ annotation = typing.cast(Any, Any)
2136
+ else:
2137
+ annotation = type_hints[name]
2138
+
2139
+ if parameters_callback is not None:
2140
+ result = parameters_callback(i, name, annotation)
2141
+ if result == 'skip':
2142
+ continue
2143
+
2144
+ parameter_mode = mode_lookup.get(p.kind)
2145
+ if parameter_mode is not None:
2146
+ arg_schema = self._generate_parameter_schema(
2147
+ name, annotation, AnnotationSource.FUNCTION, p.default, parameter_mode
2148
+ )
2149
+ arguments_list.append(arg_schema)
2150
+ elif p.kind == Parameter.VAR_POSITIONAL:
2151
+ var_args_schema = self.generate_schema(annotation)
2152
+ else:
2153
+ assert p.kind == Parameter.VAR_KEYWORD, p.kind
2154
+
2155
+ unpack_type = _typing_extra.unpack_type(annotation)
2156
+ if unpack_type is not None:
2157
+ origin = get_origin(unpack_type) or unpack_type
2158
+ if not is_typeddict(origin):
2159
+ raise PydanticUserError(
2160
+ f'Expected a `TypedDict` class inside `Unpack[...]`, got {unpack_type!r}',
2161
+ code='unpack-typed-dict',
2162
+ )
2163
+ non_pos_only_param_names = {
2164
+ name for name, p in sig.parameters.items() if p.kind != Parameter.POSITIONAL_ONLY
2165
+ }
2166
+ overlapping_params = non_pos_only_param_names.intersection(origin.__annotations__)
2167
+ if overlapping_params:
2168
+ raise PydanticUserError(
2169
+ f'Typed dictionary {origin.__name__!r} overlaps with parameter'
2170
+ f'{"s" if len(overlapping_params) >= 2 else ""} '
2171
+ f'{", ".join(repr(p) for p in sorted(overlapping_params))}',
2172
+ code='overlapping-unpack-typed-dict',
2173
+ )
2174
+
2175
+ var_kwargs_mode = 'unpacked-typed-dict'
2176
+ var_kwargs_schema = self._typed_dict_schema(unpack_type, get_origin(unpack_type))
2177
+ else:
2178
+ var_kwargs_mode = 'uniform'
2179
+ var_kwargs_schema = self.generate_schema(annotation)
2180
+
2181
+ return core_schema.arguments_schema(
2182
+ arguments_list,
2183
+ var_args_schema=var_args_schema,
2184
+ var_kwargs_mode=var_kwargs_mode,
2185
+ var_kwargs_schema=var_kwargs_schema,
2186
+ validate_by_name=core_config.get('validate_by_name'),
2187
+ )
2188
+
2189
+ def _arguments_v3_schema(
2190
+ self, function: ValidateCallSupportedTypes, parameters_callback: ParametersCallback | None = None
2191
+ ) -> core_schema.ArgumentsV3Schema:
2192
+ mode_lookup: dict[
2193
+ _ParameterKind, Literal['positional_only', 'positional_or_keyword', 'var_args', 'keyword_only']
2194
+ ] = {
2195
+ Parameter.POSITIONAL_ONLY: 'positional_only',
2196
+ Parameter.POSITIONAL_OR_KEYWORD: 'positional_or_keyword',
2197
+ Parameter.VAR_POSITIONAL: 'var_args',
2198
+ Parameter.KEYWORD_ONLY: 'keyword_only',
2199
+ }
2200
+
2201
+ sig = _typing_extra.signature_no_eval(function)
2202
+ globalns, localns = self._types_namespace
2203
+ type_hints = _typing_extra.get_function_type_hints(function, globalns=globalns, localns=localns)
2204
+
2205
+ parameters_list: list[core_schema.ArgumentsV3Parameter] = []
2206
+ core_config = self._config_wrapper.core_config(title=None)
2207
+
2208
+ for i, (name, p) in enumerate(sig.parameters.items()):
2209
+ if parameters_callback is not None:
2210
+ result = parameters_callback(i, name, p.annotation)
2211
+ if result == 'skip':
2212
+ continue
2213
+
2214
+ if p.annotation is Parameter.empty:
2215
+ annotation = typing.cast(Any, Any)
2216
+ else:
2217
+ annotation = type_hints[name]
2218
+
2219
+ parameter_mode = mode_lookup.get(p.kind)
2220
+ if parameter_mode is None:
2221
+ assert p.kind == Parameter.VAR_KEYWORD, p.kind
2222
+
2223
+ unpack_type = _typing_extra.unpack_type(annotation)
2224
+ if unpack_type is not None:
2225
+ origin = get_origin(unpack_type) or unpack_type
2226
+ if not is_typeddict(origin):
2227
+ raise PydanticUserError(
2228
+ f'Expected a `TypedDict` class inside `Unpack[...]`, got {unpack_type!r}',
2229
+ code='unpack-typed-dict',
2230
+ )
2231
+ non_pos_only_param_names = {
2232
+ name for name, p in sig.parameters.items() if p.kind != Parameter.POSITIONAL_ONLY
2233
+ }
2234
+ overlapping_params = non_pos_only_param_names.intersection(origin.__annotations__)
2235
+ if overlapping_params:
2236
+ raise PydanticUserError(
2237
+ f'Typed dictionary {origin.__name__!r} overlaps with parameter'
2238
+ f'{"s" if len(overlapping_params) >= 2 else ""} '
2239
+ f'{", ".join(repr(p) for p in sorted(overlapping_params))}',
2240
+ code='overlapping-unpack-typed-dict',
2241
+ )
2242
+ parameter_mode = 'var_kwargs_unpacked_typed_dict'
2243
+ annotation = unpack_type
2244
+ else:
2245
+ parameter_mode = 'var_kwargs_uniform'
2246
+
2247
+ parameters_list.append(
2248
+ self._generate_parameter_v3_schema(
2249
+ name, annotation, AnnotationSource.FUNCTION, parameter_mode, default=p.default
2250
+ )
2251
+ )
2252
+
2253
+ return core_schema.arguments_v3_schema(
2254
+ parameters_list,
2255
+ validate_by_name=core_config.get('validate_by_name'),
2256
+ )
2257
+
2258
+ def _unsubstituted_typevar_schema(self, typevar: typing.TypeVar) -> core_schema.CoreSchema:
2259
+ try:
2260
+ has_default = typevar.has_default() # pyright: ignore[reportAttributeAccessIssue]
2261
+ except AttributeError:
2262
+ # Happens if using `typing.TypeVar` (and not `typing_extensions`) on Python < 3.13
2263
+ pass
2264
+ else:
2265
+ if has_default:
2266
+ return self.generate_schema(typevar.__default__) # pyright: ignore[reportAttributeAccessIssue]
2267
+
2268
+ if constraints := typevar.__constraints__:
2269
+ return self._union_schema(typing.Union[constraints]) # noqa: UP007
2270
+
2271
+ if bound := typevar.__bound__:
2272
+ schema = self.generate_schema(bound)
2273
+ schema['serialization'] = core_schema.simple_ser_schema('any')
2274
+ return schema
2275
+
2276
+ return core_schema.any_schema()
2277
+
2278
+ def _computed_field_schema(
2279
+ self,
2280
+ d: Decorator[ComputedFieldInfo],
2281
+ field_serializers: dict[str, Decorator[FieldSerializerDecoratorInfo]],
2282
+ ) -> core_schema.ComputedField:
2283
+ if d.info.return_type is not PydanticUndefined:
2284
+ return_type = d.info.return_type
2285
+ else:
2286
+ try:
2287
+ # Do not pass in globals as the function could be defined in a different module.
2288
+ # Instead, let `get_callable_return_type` infer the globals to use, but still pass
2289
+ # in locals that may contain a parent/rebuild namespace:
2290
+ return_type = _decorators.get_callable_return_type(d.func, localns=self._types_namespace.locals)
2291
+ except NameError as e:
2292
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
2293
+ if return_type is PydanticUndefined:
2294
+ raise PydanticUserError(
2295
+ 'Computed field is missing return type annotation or specifying `return_type`'
2296
+ ' to the `@computed_field` decorator (e.g. `@computed_field(return_type=int | str)`)',
2297
+ code='model-field-missing-annotation',
2298
+ )
2299
+
2300
+ return_type = replace_types(return_type, self._typevars_map)
2301
+ # Create a new ComputedFieldInfo so that different type parametrizations of the same
2302
+ # generic model's computed field can have different return types.
2303
+ d.info = dataclasses.replace(d.info, return_type=return_type)
2304
+ return_type_schema = self.generate_schema(return_type)
2305
+ # Apply serializers to computed field if there exist
2306
+ return_type_schema = self._apply_field_serializers(
2307
+ return_type_schema,
2308
+ filter_field_decorator_info_by_field(field_serializers.values(), d.cls_var_name),
2309
+ )
2310
+
2311
+ pydantic_js_updates, pydantic_js_extra = _extract_json_schema_info_from_field_info(d.info)
2312
+ core_metadata: dict[str, Any] = {}
2313
+ update_core_metadata(
2314
+ core_metadata,
2315
+ pydantic_js_updates={'readOnly': True, **(pydantic_js_updates if pydantic_js_updates else {})},
2316
+ pydantic_js_extra=pydantic_js_extra,
2317
+ )
2318
+ exclude_if = d.info.exclude_if
2319
+ # TODO: Should we support exclude_if from annotations?
2320
+ return core_schema.computed_field(
2321
+ d.cls_var_name,
2322
+ return_schema=return_type_schema,
2323
+ alias=d.info.alias,
2324
+ serialization_exclude_if=exclude_if,
2325
+ metadata=core_metadata,
2326
+ )
2327
+
2328
+ def _annotated_schema(self, annotated_type: Any) -> core_schema.CoreSchema:
2329
+ """Generate schema for an Annotated type, e.g. `Annotated[int, Field(...)]` or `Annotated[int, Gt(0)]`."""
2330
+ FieldInfo = import_cached_field_info()
2331
+ source_type, *annotations = self._get_args_resolving_forward_refs(
2332
+ annotated_type,
2333
+ required=True,
2334
+ )
2335
+ schema = self._apply_annotations(source_type, annotations)
2336
+ # put the default validator last so that TypeAdapter.get_default_value() works
2337
+ # even if there are function validators involved
2338
+ for annotation in annotations:
2339
+ if isinstance(annotation, FieldInfo):
2340
+ schema = wrap_default(annotation, schema)
2341
+ return schema
2342
+
2343
+ def _apply_annotations(
2344
+ self,
2345
+ source_type: Any,
2346
+ annotations: list[Any],
2347
+ transform_inner_schema: Callable[[CoreSchema], CoreSchema] = lambda x: x,
2348
+ check_unsupported_field_info_attributes: bool = True,
2349
+ ) -> CoreSchema:
2350
+ """Apply arguments from `Annotated` or from `FieldInfo` to a schema.
2351
+
2352
+ This gets called by `GenerateSchema._annotated_schema` but differs from it in that it does
2353
+ not expect `source_type` to be an `Annotated` object, it expects it to be the first argument of that
2354
+ (in other words, `GenerateSchema._annotated_schema` just unpacks `Annotated`, this process it).
2355
+ """
2356
+
2357
+ def inner_handler(obj: Any) -> CoreSchema:
2358
+ if _is_simple_schema_type(obj):
2359
+ return transform_inner_schema(self._handlers[obj](self, obj))
2360
+
2361
+ origin = get_origin(obj)
2362
+ schema: CoreSchema | None = None
2363
+ if origin is None:
2364
+ # If the type has an origin, it is guaranteed to *not* be an ordinary class that could have
2365
+ # a `__get_pydantic_core_schema__()` method:
2366
+ schema = self._generate_schema_from_get_schema_method(obj, source_type)
2367
+
2368
+ if schema is None:
2369
+ schema = self._generate_schema_inner(obj, origin)
2370
+
2371
+ # `__get_pydantic_json_schema__()` is checked on the origin if it exists:
2372
+ metadata_js_function = _extract_get_pydantic_json_schema(origin if origin is not None else obj)
2373
+ if metadata_js_function is not None:
2374
+ metadata_schema = resolve_original_schema(schema, self.defs)
2375
+ if metadata_schema is not None:
2376
+ self._add_js_function(metadata_schema, metadata_js_function)
2377
+ return transform_inner_schema(schema)
2378
+
2379
+ if not annotations:
2380
+ schema = inner_handler(source_type)
2381
+ # Preserve the callback handler's reference conversion before applying encoders.
2382
+ if schema.get('ref') is not None:
2383
+ schema = self.defs.create_definition_reference_schema(schema)
2384
+ return _add_custom_serialization_from_json_encoders(self._config_wrapper.json_encoders, source_type, schema)
2385
+
2386
+ annotations = list(_known_annotated_metadata.expand_grouped_metadata(annotations))
2387
+ pydantic_js_annotation_functions: list[GetJsonSchemaFunction] = []
2388
+ get_inner_schema = CallbackGetCoreSchemaHandler(inner_handler, self)
2389
+
2390
+ for annotation in annotations:
2391
+ if annotation is None:
2392
+ continue
2393
+ get_inner_schema = self._get_wrapped_inner_schema(
2394
+ get_inner_schema,
2395
+ annotation,
2396
+ pydantic_js_annotation_functions,
2397
+ check_unsupported_field_info_attributes=check_unsupported_field_info_attributes,
2398
+ )
2399
+
2400
+ schema = get_inner_schema(source_type)
2401
+ if pydantic_js_annotation_functions:
2402
+ core_metadata = schema.setdefault('metadata', {})
2403
+ update_core_metadata(core_metadata, pydantic_js_annotation_functions=pydantic_js_annotation_functions)
2404
+ return _add_custom_serialization_from_json_encoders(self._config_wrapper.json_encoders, source_type, schema)
2405
+
2406
+ def _apply_single_annotation(
2407
+ self,
2408
+ schema: core_schema.CoreSchema,
2409
+ metadata: Any,
2410
+ check_unsupported_field_info_attributes: bool = True,
2411
+ ) -> core_schema.CoreSchema:
2412
+ FieldInfo = import_cached_field_info()
2413
+
2414
+ if isinstance(metadata, FieldInfo):
2415
+ if (
2416
+ check_unsupported_field_info_attributes
2417
+ # HACK: we don't want to emit the warning for `FieldInfo` subclasses, because FastAPI does weird manipulations
2418
+ # with its subclasses and their annotations:
2419
+ and type(metadata) is FieldInfo
2420
+ ):
2421
+ for attr, value in self._get_unsupported_field_info_attributes(metadata):
2422
+ warnings.warn(
2423
+ f'The {attr!r} attribute with value {value!r} was provided to the `Field()` function, '
2424
+ f'which has no effect in the context it was used. {attr!r} is field-specific metadata, '
2425
+ 'and can only be attached to a model field using `Annotated` metadata or by assignment. '
2426
+ 'This may have happened because an `Annotated` type alias using the `type` statement was '
2427
+ 'used, or if the `Field()` function was attached to a single member of a union type.',
2428
+ category=UnsupportedFieldAttributeWarning,
2429
+ )
2430
+
2431
+ # Inside a model, a standalone `default_factory` is already reported as unsupported above:
2432
+ if metadata.default_factory_takes_validated_data and self.model_type_stack.get() is None:
2433
+ warnings.warn(
2434
+ "A 'default_factory' taking validated data as an argument was provided to the `Field()` function, "
2435
+ 'but no validated data is available in the context it was used.',
2436
+ category=UnsupportedFieldAttributeWarning,
2437
+ )
2438
+
2439
+ for field_metadata in metadata.metadata:
2440
+ schema = self._apply_single_annotation(schema, field_metadata)
2441
+
2442
+ if metadata.discriminator is not None:
2443
+ schema = self._apply_discriminator_to_union(schema, metadata.discriminator)
2444
+ return schema
2445
+
2446
+ if schema['type'] == 'nullable':
2447
+ # for nullable schemas, metadata is automatically applied to the inner schema
2448
+ inner = schema.get('schema', core_schema.any_schema())
2449
+ inner = self._apply_single_annotation(inner, metadata)
2450
+ if inner:
2451
+ schema['schema'] = inner
2452
+ return schema
2453
+
2454
+ if schema['type'] == 'missing-sentinel' and (inner := schema.get('schema')) is not None:
2455
+ # Same behavior as for nullable schemas: metadata is automatically applied to the inner schema
2456
+ inner = self._apply_single_annotation(inner, metadata)
2457
+ if inner:
2458
+ schema['schema'] = inner
2459
+ return schema
2460
+
2461
+ original_schema = schema
2462
+ ref = schema.get('ref')
2463
+ if ref is not None:
2464
+ schema = schema.copy()
2465
+ new_ref = ref + f'_{repr(metadata)}'
2466
+ if (existing := self.defs.get_schema_from_ref(new_ref)) is not None:
2467
+ return existing
2468
+ schema['ref'] = new_ref # pyright: ignore[reportGeneralTypeIssues]
2469
+ elif schema['type'] == 'definition-ref':
2470
+ ref = schema['schema_ref']
2471
+ if (referenced_schema := self.defs.get_schema_from_ref(ref)) is not None:
2472
+ schema = referenced_schema.copy()
2473
+ new_ref = ref + f'_{repr(metadata)}'
2474
+ if (existing := self.defs.get_schema_from_ref(new_ref)) is not None:
2475
+ return existing
2476
+ schema['ref'] = new_ref # pyright: ignore[reportGeneralTypeIssues]
2477
+
2478
+ maybe_updated_schema = _known_annotated_metadata.apply_known_metadata(metadata, schema)
2479
+
2480
+ if maybe_updated_schema is not None:
2481
+ return maybe_updated_schema
2482
+ return original_schema
2483
+
2484
+ def _apply_single_annotation_json_schema(
2485
+ self, schema: core_schema.CoreSchema, metadata: Any
2486
+ ) -> core_schema.CoreSchema:
2487
+ FieldInfo = import_cached_field_info()
2488
+
2489
+ if isinstance(metadata, FieldInfo):
2490
+ for field_metadata in metadata.metadata:
2491
+ schema = self._apply_single_annotation_json_schema(schema, field_metadata)
2492
+
2493
+ pydantic_js_updates, pydantic_js_extra = _extract_json_schema_info_from_field_info(metadata)
2494
+ core_metadata = schema.setdefault('metadata', {})
2495
+ update_core_metadata(
2496
+ core_metadata, pydantic_js_updates=pydantic_js_updates, pydantic_js_extra=pydantic_js_extra
2497
+ )
2498
+ return schema
2499
+
2500
+ def _get_unsupported_field_info_attributes(self, field_info: FieldInfo) -> list[tuple[str, Any]]:
2501
+ """Get the list of unsupported `FieldInfo` attributes when not directly used in `Annotated` for field annotations."""
2502
+ unused_metadata: list[tuple[str, Any]] = []
2503
+ for unused_metadata_name, unset_value in UNSUPPORTED_STANDALONE_FIELDINFO_ATTRIBUTES:
2504
+ if (
2505
+ (unused_metadata_value := getattr(field_info, unused_metadata_name)) is not unset_value
2506
+ # `default` and `default_factory` can still be used with a type adapter, so only include them
2507
+ # if used with a model-like class:
2508
+ and (
2509
+ unused_metadata_name not in ('default', 'default_factory')
2510
+ or self.model_type_stack.get() is not None
2511
+ )
2512
+ # Setting `alias` will set `validation/serialization_alias` as well, so we want to avoid duplicate warnings:
2513
+ and (
2514
+ unused_metadata_name not in ('validation_alias', 'serialization_alias')
2515
+ or 'alias' not in field_info._attributes_set
2516
+ )
2517
+ ):
2518
+ unused_metadata.append((unused_metadata_name, unused_metadata_value))
2519
+
2520
+ return unused_metadata
2521
+
2522
+ def _get_wrapped_inner_schema(
2523
+ self,
2524
+ get_inner_schema: GetCoreSchemaHandler,
2525
+ annotation: Any,
2526
+ pydantic_js_annotation_functions: list[GetJsonSchemaFunction],
2527
+ check_unsupported_field_info_attributes: bool = False,
2528
+ ) -> CallbackGetCoreSchemaHandler:
2529
+ annotation_get_schema: GetCoreSchemaFunction | None = getattr(annotation, '__get_pydantic_core_schema__', None)
2530
+
2531
+ def new_handler(source: Any) -> core_schema.CoreSchema:
2532
+ if annotation_get_schema is not None:
2533
+ schema = annotation_get_schema(source, get_inner_schema)
2534
+ else:
2535
+ schema = get_inner_schema(source)
2536
+ schema = self._apply_single_annotation(
2537
+ schema,
2538
+ annotation,
2539
+ check_unsupported_field_info_attributes=check_unsupported_field_info_attributes,
2540
+ )
2541
+ schema = self._apply_single_annotation_json_schema(schema, annotation)
2542
+
2543
+ metadata_js_function = _extract_get_pydantic_json_schema(annotation)
2544
+ if metadata_js_function is not None:
2545
+ pydantic_js_annotation_functions.append(metadata_js_function)
2546
+ return schema
2547
+
2548
+ return CallbackGetCoreSchemaHandler(new_handler, self)
2549
+
2550
+ def _apply_field_serializers(
2551
+ self,
2552
+ schema: core_schema.CoreSchema,
2553
+ serializers: list[Decorator[FieldSerializerDecoratorInfo]],
2554
+ ) -> core_schema.CoreSchema:
2555
+ """Apply field serializers to a schema."""
2556
+ if serializers:
2557
+ schema = copy(schema)
2558
+ if schema['type'] == 'definitions':
2559
+ inner_schema = schema['schema']
2560
+ schema['schema'] = self._apply_field_serializers(inner_schema, serializers)
2561
+ return schema
2562
+ elif 'ref' in schema:
2563
+ schema = self.defs.create_definition_reference_schema(schema)
2564
+
2565
+ # use the last serializer to make it easy to override a serializer set on a parent model
2566
+ serializer = serializers[-1]
2567
+ is_field_serializer, info_arg = inspect_field_serializer(serializer.func, serializer.info.mode)
2568
+
2569
+ if serializer.info.return_type is not PydanticUndefined:
2570
+ return_type = serializer.info.return_type
2571
+ else:
2572
+ try:
2573
+ # Do not pass in globals as the function could be defined in a different module.
2574
+ # Instead, let `get_callable_return_type` infer the globals to use, but still pass
2575
+ # in locals that may contain a parent/rebuild namespace:
2576
+ return_type = _decorators.get_callable_return_type(
2577
+ serializer.func, localns=self._types_namespace.locals
2578
+ )
2579
+ except NameError as e:
2580
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
2581
+
2582
+ if return_type is PydanticUndefined:
2583
+ return_schema = None
2584
+ else:
2585
+ return_schema = self.generate_schema(return_type)
2586
+
2587
+ if serializer.info.mode == 'wrap':
2588
+ schema['serialization'] = core_schema.wrap_serializer_function_ser_schema(
2589
+ serializer.func,
2590
+ is_field_serializer=is_field_serializer,
2591
+ info_arg=info_arg,
2592
+ return_schema=return_schema,
2593
+ when_used=serializer.info.when_used,
2594
+ )
2595
+ else:
2596
+ assert serializer.info.mode == 'plain'
2597
+ schema['serialization'] = core_schema.plain_serializer_function_ser_schema(
2598
+ serializer.func,
2599
+ is_field_serializer=is_field_serializer,
2600
+ info_arg=info_arg,
2601
+ return_schema=return_schema,
2602
+ when_used=serializer.info.when_used,
2603
+ )
2604
+ return schema
2605
+
2606
+ def _apply_model_serializers(
2607
+ self, schema: core_schema.CoreSchema, serializers: Iterable[Decorator[ModelSerializerDecoratorInfo]]
2608
+ ) -> core_schema.CoreSchema:
2609
+ """Apply model serializers to a schema."""
2610
+ ref: str | None = schema.pop('ref', None) # type: ignore
2611
+ if serializers:
2612
+ serializer = list(serializers)[-1]
2613
+ info_arg = inspect_model_serializer(serializer.func, serializer.info.mode)
2614
+
2615
+ if serializer.info.return_type is not PydanticUndefined:
2616
+ return_type = serializer.info.return_type
2617
+ else:
2618
+ try:
2619
+ # Do not pass in globals as the function could be defined in a different module.
2620
+ # Instead, let `get_callable_return_type` infer the globals to use, but still pass
2621
+ # in locals that may contain a parent/rebuild namespace:
2622
+ return_type = _decorators.get_callable_return_type(
2623
+ serializer.func, localns=self._types_namespace.locals
2624
+ )
2625
+ except NameError as e:
2626
+ raise PydanticUndefinedAnnotation.from_name_error(e) from e
2627
+
2628
+ if return_type is PydanticUndefined:
2629
+ return_schema = None
2630
+ else:
2631
+ return_schema = self.generate_schema(return_type)
2632
+
2633
+ if serializer.info.mode == 'wrap':
2634
+ ser_schema: core_schema.SerSchema = core_schema.wrap_serializer_function_ser_schema(
2635
+ serializer.func,
2636
+ info_arg=info_arg,
2637
+ return_schema=return_schema,
2638
+ when_used=serializer.info.when_used,
2639
+ )
2640
+ else:
2641
+ # plain
2642
+ ser_schema = core_schema.plain_serializer_function_ser_schema(
2643
+ serializer.func,
2644
+ info_arg=info_arg,
2645
+ return_schema=return_schema,
2646
+ when_used=serializer.info.when_used,
2647
+ )
2648
+ schema['serialization'] = ser_schema
2649
+ if ref:
2650
+ schema['ref'] = ref # type: ignore
2651
+ return schema
2652
+
2653
+
2654
+ _VALIDATOR_F_MATCH: Mapping[
2655
+ tuple[FieldValidatorModes, Literal['no-info', 'with-info']],
2656
+ Callable[[Callable[..., Any], core_schema.CoreSchema], core_schema.CoreSchema],
2657
+ ] = {
2658
+ ('before', 'no-info'): lambda f, schema: core_schema.no_info_before_validator_function(f, schema),
2659
+ ('after', 'no-info'): lambda f, schema: core_schema.no_info_after_validator_function(f, schema),
2660
+ ('plain', 'no-info'): lambda f, _: core_schema.no_info_plain_validator_function(f),
2661
+ ('wrap', 'no-info'): lambda f, schema: core_schema.no_info_wrap_validator_function(f, schema),
2662
+ ('before', 'with-info'): lambda f, schema: core_schema.with_info_before_validator_function(f, schema),
2663
+ ('after', 'with-info'): lambda f, schema: core_schema.with_info_after_validator_function(f, schema),
2664
+ ('plain', 'with-info'): lambda f, _: core_schema.with_info_plain_validator_function(f),
2665
+ ('wrap', 'with-info'): lambda f, schema: core_schema.with_info_wrap_validator_function(f, schema),
2666
+ }
2667
+
2668
+
2669
+ # TODO V3: this function is only used for deprecated decorators. It should
2670
+ # be removed once we drop support for those.
2671
+ def apply_validators(
2672
+ schema: core_schema.CoreSchema,
2673
+ validators: Iterable[Decorator[RootValidatorDecoratorInfo]]
2674
+ | Iterable[Decorator[ValidatorDecoratorInfo]]
2675
+ | Iterable[Decorator[FieldValidatorDecoratorInfo]],
2676
+ ) -> core_schema.CoreSchema:
2677
+ """Apply validators to a schema.
2678
+
2679
+ Args:
2680
+ schema: The schema to apply validators on.
2681
+ validators: An iterable of validators.
2682
+
2683
+ Returns:
2684
+ The updated schema.
2685
+ """
2686
+ for validator in validators:
2687
+ # Actually, type could be 'field' or 'model', but this is only used for deprecated
2688
+ # decorators, so let's not worry about it.
2689
+ info_arg = inspect_validator(validator.func, mode=validator.info.mode, type='field')
2690
+ val_type = 'with-info' if info_arg else 'no-info'
2691
+
2692
+ schema = _VALIDATOR_F_MATCH[(validator.info.mode, val_type)](validator.func, schema)
2693
+ return schema
2694
+
2695
+
2696
+ def _validators_require_validate_default(validators: Iterable[Decorator[ValidatorDecoratorInfo]]) -> bool:
2697
+ """In v1, if any of the validators for a field had `always=True`, the default value would be validated.
2698
+
2699
+ This serves as an auxiliary function for re-implementing that logic, by looping over a provided
2700
+ collection of (v1-style) ValidatorDecoratorInfo's and checking if any of them have `always=True`.
2701
+
2702
+ We should be able to drop this function and the associated logic calling it once we drop support
2703
+ for v1-style validator decorators. (Or we can extend it and keep it if we add something equivalent
2704
+ to the v1-validator `always` kwarg to `field_validator`.)
2705
+ """
2706
+ for validator in validators:
2707
+ if validator.info.always:
2708
+ return True
2709
+ return False
2710
+
2711
+
2712
+ def _convert_to_aliases(
2713
+ alias: str | AliasChoices | AliasPath | None,
2714
+ ) -> str | list[str | int] | list[list[str | int]] | None:
2715
+ if isinstance(alias, (AliasChoices, AliasPath)):
2716
+ return alias.convert_to_aliases()
2717
+ else:
2718
+ return alias
2719
+
2720
+
2721
+ def apply_model_validators(
2722
+ schema: core_schema.CoreSchema,
2723
+ validators: Iterable[Decorator[ModelValidatorDecoratorInfo]],
2724
+ mode: Literal['inner', 'outer', 'all'],
2725
+ ) -> core_schema.CoreSchema:
2726
+ """Apply model validators to a schema.
2727
+
2728
+ If mode == 'inner', only "before" validators are applied
2729
+ If mode == 'outer', validators other than "before" are applied
2730
+ If mode == 'all', all validators are applied
2731
+
2732
+ Args:
2733
+ schema: The schema to apply validators on.
2734
+ validators: An iterable of validators.
2735
+ mode: The validator mode.
2736
+
2737
+ Returns:
2738
+ The updated schema.
2739
+ """
2740
+ ref: str | None = schema.pop('ref', None) # type: ignore
2741
+ for validator in validators:
2742
+ if mode == 'inner' and validator.info.mode != 'before':
2743
+ continue
2744
+ if mode == 'outer' and validator.info.mode == 'before':
2745
+ continue
2746
+ info_arg = inspect_validator(validator.func, mode=validator.info.mode, type='model')
2747
+ if validator.info.mode == 'wrap':
2748
+ if info_arg:
2749
+ schema = core_schema.with_info_wrap_validator_function(function=validator.func, schema=schema)
2750
+ else:
2751
+ schema = core_schema.no_info_wrap_validator_function(function=validator.func, schema=schema)
2752
+ elif validator.info.mode == 'before':
2753
+ if info_arg:
2754
+ schema = core_schema.with_info_before_validator_function(function=validator.func, schema=schema)
2755
+ else:
2756
+ schema = core_schema.no_info_before_validator_function(function=validator.func, schema=schema)
2757
+ else:
2758
+ assert validator.info.mode == 'after'
2759
+ if info_arg:
2760
+ schema = core_schema.with_info_after_validator_function(function=validator.func, schema=schema)
2761
+ else:
2762
+ schema = core_schema.no_info_after_validator_function(function=validator.func, schema=schema)
2763
+ if ref:
2764
+ schema['ref'] = ref # type: ignore
2765
+ return schema
2766
+
2767
+
2768
+ def wrap_default(field_info: FieldInfo, schema: core_schema.CoreSchema) -> core_schema.CoreSchema:
2769
+ """Wrap schema with default schema if default value or `default_factory` are available.
2770
+
2771
+ Args:
2772
+ field_info: The field info object.
2773
+ schema: The schema to apply default on.
2774
+
2775
+ Returns:
2776
+ Updated schema by default value or `default_factory`.
2777
+ """
2778
+ if field_info.default_factory:
2779
+ return core_schema.with_default_schema(
2780
+ schema,
2781
+ default_factory=field_info.default_factory,
2782
+ default_factory_takes_data=takes_validated_data_argument(field_info.default_factory),
2783
+ validate_default=field_info.validate_default,
2784
+ )
2785
+ elif field_info.default is not PydanticUndefined:
2786
+ return core_schema.with_default_schema(
2787
+ schema, default=field_info.default, validate_default=field_info.validate_default
2788
+ )
2789
+ else:
2790
+ return schema
2791
+
2792
+
2793
+ def _extract_get_pydantic_json_schema(tp: Any) -> GetJsonSchemaFunction | None:
2794
+ """Extract `__get_pydantic_json_schema__` from a type, handling the deprecated `__modify_schema__`."""
2795
+ js_modify_function = getattr(tp, '__get_pydantic_json_schema__', None)
2796
+
2797
+ if hasattr(tp, '__modify_schema__'):
2798
+ BaseModel = import_cached_base_model()
2799
+
2800
+ has_custom_v2_modify_js_func = (
2801
+ js_modify_function is not None
2802
+ and BaseModel.__get_pydantic_json_schema__.__func__ # type: ignore
2803
+ not in (js_modify_function, getattr(js_modify_function, '__func__', None))
2804
+ )
2805
+
2806
+ if not has_custom_v2_modify_js_func:
2807
+ cls_name = getattr(tp, '__name__', None)
2808
+ raise PydanticUserError(
2809
+ f'The `__modify_schema__` method is not supported in Pydantic v2. '
2810
+ f'Use `__get_pydantic_json_schema__` instead{f" in class `{cls_name}`" if cls_name else ""}.',
2811
+ code='custom-json-schema',
2812
+ )
2813
+
2814
+ if js_modify_function is None:
2815
+ return None
2816
+
2817
+ return js_modify_function
2818
+
2819
+
2820
+ def resolve_original_schema(schema: CoreSchema, definitions: _Definitions) -> CoreSchema | None:
2821
+ if schema['type'] == 'definition-ref':
2822
+ return definitions.get_schema_from_ref(schema['schema_ref'])
2823
+ elif schema['type'] == 'definitions':
2824
+ return schema['schema']
2825
+ else:
2826
+ return schema
2827
+
2828
+
2829
+ def _inlining_behavior(
2830
+ def_ref: core_schema.DefinitionReferenceSchema,
2831
+ ) -> Literal['inline', 'keep', 'preserve_metadata']:
2832
+ """Determine the inlining behavior of the `'definition-ref'` schema.
2833
+
2834
+ - If no `'serialization'` schema and no metadata is attached, the schema can safely be inlined.
2835
+ - If it has metadata but only related to the deferred discriminator application, it can be inlined
2836
+ provided that such metadata is kept.
2837
+ - Otherwise, the schema should not be inlined. Doing so would remove the `'serialization'` schema or metadata.
2838
+ """
2839
+ if 'serialization' in def_ref:
2840
+ return 'keep'
2841
+ metadata = def_ref.get('metadata')
2842
+ if not metadata:
2843
+ return 'inline'
2844
+ if len(metadata) == 1 and 'pydantic_internal_union_discriminator' in metadata:
2845
+ return 'preserve_metadata'
2846
+ return 'keep'
2847
+
2848
+
2849
+ class _Definitions:
2850
+ """Keeps track of references and definitions."""
2851
+
2852
+ _recursively_seen: set[str]
2853
+ """A set of recursively seen references.
2854
+
2855
+ When a referenceable type is encountered, the `get_schema_or_ref` context manager is
2856
+ entered to compute the reference. If the type references itself by some way (e.g. for
2857
+ a dataclass a Pydantic model, the class can be referenced as a field annotation),
2858
+ entering the context manager again will yield a `'definition-ref'` schema that should
2859
+ short-circuit the normal generation process, as the reference was already in this set.
2860
+ """
2861
+
2862
+ _definitions: dict[str, core_schema.CoreSchema]
2863
+ """A mapping of references to their corresponding schema.
2864
+
2865
+ When a schema for a referenceable type is generated, it is stored in this mapping. If the
2866
+ same type is encountered again, the reference is yielded by the `get_schema_or_ref` context
2867
+ manager.
2868
+ """
2869
+
2870
+ def __init__(self) -> None:
2871
+ self._recursively_seen = set()
2872
+ self._definitions = {}
2873
+
2874
+ @contextmanager
2875
+ def get_definition_ref_schema(self, *, ref: str) -> Generator[core_schema.DefinitionReferenceSchema | None]:
2876
+ """Get a `'definition-ref'` schema for `ref`, if the reference was already encountered (or if we are in a cycle).
2877
+ Get a definition for `tp` if one exists.
2878
+
2879
+ This should be called for any type that can be identified by reference.
2880
+ This includes any recursive types.
2881
+
2882
+ At present the following types can be named/recursive:
2883
+
2884
+ - Pydantic model
2885
+ - Pydantic and stdlib dataclasses
2886
+ - Typed dictionaries
2887
+ - Named tuples
2888
+ - `TypeAliasType` instances
2889
+ - Enums
2890
+ """
2891
+ # return the reference if we're either (1) in a cycle or (2) it the reference was already encountered:
2892
+ if ref in self._recursively_seen or ref in self._definitions:
2893
+ yield core_schema.definition_reference_schema(ref)
2894
+ else:
2895
+ self._recursively_seen.add(ref)
2896
+ try:
2897
+ yield None
2898
+ finally:
2899
+ self._recursively_seen.discard(ref)
2900
+
2901
+ def get_schema_from_ref(self, ref: str) -> CoreSchema | None:
2902
+ """Resolve the schema from the given reference."""
2903
+ return self._definitions.get(ref)
2904
+
2905
+ def create_definition_reference_schema(self, schema: CoreSchema) -> core_schema.DefinitionReferenceSchema:
2906
+ """Store the schema as a definition and return a `'definition-reference'` schema pointing to it.
2907
+
2908
+ The schema must have a reference attached to it.
2909
+ """
2910
+ ref = schema['ref'] # pyright: ignore
2911
+ self._definitions[ref] = schema
2912
+ return core_schema.definition_reference_schema(ref)
2913
+
2914
+ def unpack_definitions(self, schema: core_schema.DefinitionsSchema) -> CoreSchema:
2915
+ """Store the definitions of the `'definitions'` core schema and return the inner core schema."""
2916
+ for def_schema in schema['definitions']:
2917
+ self._definitions[def_schema['ref']] = def_schema # pyright: ignore
2918
+ return schema['schema']
2919
+
2920
+ def finalize_schema(self, schema: CoreSchema) -> CoreSchema:
2921
+ """Finalize the core schema.
2922
+
2923
+ This traverses the core schema and referenced definitions, replaces `'definition-ref'` schemas
2924
+ by the referenced definition if possible, and applies deferred discriminators.
2925
+ """
2926
+ definitions = self._definitions
2927
+ try:
2928
+ gather_result = gather_schemas_for_cleaning(
2929
+ schema,
2930
+ definitions=definitions,
2931
+ )
2932
+ except MissingDefinitionError as e:
2933
+ raise InvalidSchemaError from e
2934
+
2935
+ remaining_defs: dict[str, CoreSchema] = {}
2936
+
2937
+ # References that will be kept as actual definitions (i.e. not inlined). When resolving an
2938
+ # "intermediate" `'definition-ref'` schema (see `_resolve_definition()`), we must not follow
2939
+ # the reference chain through one of these definitions:
2940
+ kept_refs = {
2941
+ ref
2942
+ for ref, inlinable_def_ref in gather_result['collected_references'].items()
2943
+ if inlinable_def_ref is None or _inlining_behavior(inlinable_def_ref) == 'keep'
2944
+ }
2945
+
2946
+ # Note: this logic doesn't play well when core schemas with deferred discriminator metadata
2947
+ # and references are encountered. See the `test_deferred_discriminated_union_and_references()` test.
2948
+ for ref, inlinable_def_ref in gather_result['collected_references'].items():
2949
+ if inlinable_def_ref is not None and (inlining_behavior := _inlining_behavior(inlinable_def_ref)) != 'keep':
2950
+ if inlining_behavior == 'inline':
2951
+ # `ref` was encountered, and only once:
2952
+ # - `inlinable_def_ref` is a `'definition-ref'` schema and is guaranteed to be
2953
+ # the only one. Transform it into the definition it points to.
2954
+ # - Do not store the definition in the `remaining_defs`.
2955
+ inlinable_def_ref.clear() # pyright: ignore[reportAttributeAccessIssue]
2956
+ inlinable_def_ref.update(self._resolve_definition(ref, definitions, kept_refs)) # pyright: ignore
2957
+ elif inlining_behavior == 'preserve_metadata':
2958
+ # `ref` was encountered, and only once, but contains discriminator metadata.
2959
+ # We will do the same thing as if `inlining_behavior` was `'inline'`, but make
2960
+ # sure to keep the metadata for the deferred discriminator application logic below.
2961
+ meta = inlinable_def_ref.pop('metadata')
2962
+ inlinable_def_ref.clear() # pyright: ignore[reportAttributeAccessIssue]
2963
+ inlinable_def_ref.update(self._resolve_definition(ref, definitions, kept_refs)) # pyright: ignore
2964
+ inlinable_def_ref['metadata'] = meta
2965
+ else:
2966
+ # `ref` was encountered, at least two times (or only once, but with metadata or a serialization schema):
2967
+ # - Do not inline the `'definition-ref'` schemas (they are not provided in the gather result anyway).
2968
+ # - Store the definition in the `remaining_defs`
2969
+ remaining_defs[ref] = self._resolve_definition(ref, definitions, kept_refs)
2970
+
2971
+ for cs in gather_result['deferred_discriminator_schemas']:
2972
+ discriminator: str | None = cs['metadata'].pop('pydantic_internal_union_discriminator', None) # pyright: ignore[reportTypedDictNotRequiredAccess]
2973
+ if discriminator is None:
2974
+ # This can happen in rare scenarios, when a deferred schema is present multiple times in the
2975
+ # gather result (e.g. when using the `Sequence` type -- see `test_sequence_discriminated_union()`).
2976
+ # In this case, a previous loop iteration applied the discriminator and so we can just skip it here.
2977
+ continue
2978
+ applied = _discriminated_union.apply_discriminator(cs.copy(), discriminator, remaining_defs)
2979
+ # Mutate the schema directly to have the discriminator applied
2980
+ cs.clear() # pyright: ignore[reportAttributeAccessIssue]
2981
+ cs.update(applied) # pyright: ignore
2982
+
2983
+ if remaining_defs:
2984
+ schema = core_schema.definitions_schema(schema=schema, definitions=[*remaining_defs.values()])
2985
+ return schema
2986
+
2987
+ def _resolve_definition(self, ref: str, definitions: dict[str, CoreSchema], kept_refs: set[str]) -> CoreSchema:
2988
+ definition = definitions[ref]
2989
+ if definition['type'] != 'definition-ref':
2990
+ return definition
2991
+
2992
+ # Some `'definition-ref'` schemas might act as "intermediate" references (e.g. when using
2993
+ # a PEP 695 type alias (which is referenceable) that references another PEP 695 type alias):
2994
+ visited: set[str] = set()
2995
+ while definition['type'] == 'definition-ref' and _inlining_behavior(definition) == 'inline':
2996
+ schema_ref = definition['schema_ref']
2997
+ if schema_ref in kept_refs and schema_ref != ref:
2998
+ # The reference chain leads to a *different* definition that is kept on its own (e.g. a
2999
+ # recursive model referenced through a PEP 695 type alias). Resolve to a reference
3000
+ # pointing to it instead of following the chain and inlining a copy of that definition,
3001
+ # which could otherwise introduce a reference cycle in the resulting schema.
3002
+ # Note: when `schema_ref == ref`, the reference points back to itself, which is a genuine
3003
+ # circular reference and is reported as an error by the `visited` logic below.
3004
+ return {**definition, 'ref': ref}
3005
+ if schema_ref in visited:
3006
+ raise PydanticUserError(
3007
+ f'{ref} contains a circular reference to itself.', code='circular-reference-schema'
3008
+ )
3009
+ visited.add(schema_ref)
3010
+ definition = definitions[schema_ref]
3011
+ return {**definition, 'ref': ref} # pyright: ignore[reportReturnType]
3012
+
3013
+
3014
+ class _FieldNameStack:
3015
+ __slots__ = ('_stack',)
3016
+
3017
+ def __init__(self) -> None:
3018
+ self._stack: list[str] = []
3019
+
3020
+ @contextmanager
3021
+ def push(self, field_name: str) -> Iterator[None]:
3022
+ self._stack.append(field_name)
3023
+ try:
3024
+ yield
3025
+ finally:
3026
+ self._stack.pop()
3027
+
3028
+ def get(self) -> str | None:
3029
+ if self._stack:
3030
+ return self._stack[-1]
3031
+ else:
3032
+ return None
3033
+
3034
+
3035
+ class _ModelTypeStack:
3036
+ __slots__ = ('_stack',)
3037
+
3038
+ def __init__(self) -> None:
3039
+ self._stack: list[type] = []
3040
+
3041
+ @contextmanager
3042
+ def push(self, type_obj: type) -> Iterator[None]:
3043
+ self._stack.append(type_obj)
3044
+ try:
3045
+ yield
3046
+ finally:
3047
+ self._stack.pop()
3048
+
3049
+ def get(self) -> type | None:
3050
+ if self._stack:
3051
+ return self._stack[-1]
3052
+ else:
3053
+ return None