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

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.1.dist-info/INSTALLER +1 -0
  1706. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.1.dist-info/METADATA +13 -0
  1707. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.1.dist-info/RECORD +23 -0
  1708. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_harness-0.9.1.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.1.dist-info/INSTALLER +1 -0
  1712. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.1.dist-info/METADATA +12 -0
  1713. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.1.dist-info/RECORD +11 -0
  1714. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_protocol-0.9.1.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.1.dist-info/INSTALLER +1 -0
  1787. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.1.dist-info/METADATA +72 -0
  1788. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.1.dist-info/RECORD +147 -0
  1789. package/python-runtime/python/lib/python3.12/site-packages/steerable_agent_runtime-0.9.1.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.1.dist-info/INSTALLER +1 -0
  1832. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.dist-info/METADATA +58 -0
  1833. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.dist-info/RECORD +79 -0
  1834. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.dist-info/WHEEL +5 -0
  1835. package/python-runtime/python/lib/python3.12/site-packages/steerable_sidecar-0.9.1.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,3300 @@
1
+ from __future__ import annotations
2
+
3
+ import array
4
+ import asyncio
5
+ import concurrent.futures
6
+ import math
7
+ import os
8
+ import socket
9
+ import sys
10
+ import threading
11
+ import weakref
12
+ from asyncio import (
13
+ AbstractEventLoop,
14
+ CancelledError,
15
+ all_tasks,
16
+ create_task,
17
+ current_task,
18
+ get_running_loop,
19
+ sleep,
20
+ )
21
+ from asyncio.base_events import _run_until_complete_cb # type: ignore[attr-defined]
22
+ from collections import OrderedDict, deque
23
+ from collections.abc import (
24
+ AsyncGenerator,
25
+ AsyncIterator,
26
+ Awaitable,
27
+ Callable,
28
+ Collection,
29
+ Coroutine,
30
+ Iterable,
31
+ Sequence,
32
+ )
33
+ from concurrent.futures import Future
34
+ from contextlib import AbstractContextManager, suppress
35
+ from contextvars import Context, copy_context
36
+ from dataclasses import dataclass, field
37
+ from functools import partial, wraps
38
+ from inspect import (
39
+ CORO_RUNNING,
40
+ CORO_SUSPENDED,
41
+ getcoroutinestate,
42
+ )
43
+ from io import IOBase
44
+ from os import PathLike
45
+ from queue import Queue
46
+ from signal import Signals
47
+ from socket import AddressFamily, SocketKind
48
+ from threading import Thread
49
+ from types import CodeType, TracebackType
50
+ from typing import (
51
+ IO,
52
+ TYPE_CHECKING,
53
+ Any,
54
+ Literal,
55
+ ParamSpec,
56
+ TypeVar,
57
+ cast,
58
+ )
59
+ from weakref import WeakKeyDictionary
60
+
61
+ from .. import (
62
+ CapacityLimiterStatistics,
63
+ EventStatistics,
64
+ LockStatistics,
65
+ TaskInfo,
66
+ abc,
67
+ )
68
+ from .._core._eventloop import (
69
+ claim_worker_thread,
70
+ set_current_async_library,
71
+ threadlocals,
72
+ )
73
+ from .._core._exceptions import (
74
+ BrokenResourceError,
75
+ BusyResourceError,
76
+ ClosedResourceError,
77
+ EndOfStream,
78
+ RunFinishedError,
79
+ WouldBlock,
80
+ )
81
+ from .._core._sockets import convert_ipv6_sockaddr
82
+ from .._core._streams import create_memory_object_stream
83
+ from .._core._synchronization import (
84
+ CapacityLimiter as BaseCapacityLimiter,
85
+ )
86
+ from .._core._synchronization import Event as BaseEvent
87
+ from .._core._synchronization import Lock as BaseLock
88
+ from .._core._synchronization import (
89
+ ResourceGuard,
90
+ SemaphoreStatistics,
91
+ )
92
+ from .._core._synchronization import Semaphore as BaseSemaphore
93
+ from .._core._tasks import CancelScope as BaseCancelScope
94
+ from .._core._tasks import TaskHandle
95
+ from ..abc import (
96
+ AsyncBackend,
97
+ IPSockAddrType,
98
+ SocketListener,
99
+ UDPPacketType,
100
+ UNIXDatagramPacketType,
101
+ )
102
+ from ..abc._tasks import call_for_coroutine, get_callable_name, get_coro_name
103
+ from ..lowlevel import RunVar, _run_vars
104
+
105
+ if TYPE_CHECKING:
106
+ from _typeshed import FileDescriptorLike
107
+
108
+ from ..abc._eventloop import StrOrBytesPath
109
+ from ..streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream
110
+ else:
111
+ FileDescriptorLike = object
112
+
113
+ if sys.version_info >= (3, 11):
114
+ from asyncio import Runner
115
+ from typing import Self, TypeVarTuple, Unpack
116
+ else:
117
+ import contextvars
118
+ import enum
119
+ import signal
120
+ from asyncio import coroutines, events, exceptions, tasks
121
+
122
+ from exceptiongroup import BaseExceptionGroup
123
+ from typing_extensions import Self, TypeVarTuple, Unpack
124
+
125
+ class _State(enum.Enum):
126
+ CREATED = "created"
127
+ INITIALIZED = "initialized"
128
+ CLOSED = "closed"
129
+
130
+ class Runner:
131
+ # Copied from CPython 3.11
132
+ def __init__(
133
+ self,
134
+ *,
135
+ debug: bool | None = None,
136
+ loop_factory: Callable[[], AbstractEventLoop] | None = None,
137
+ ):
138
+ self._state = _State.CREATED
139
+ self._debug = debug
140
+ self._loop_factory = loop_factory
141
+ self._loop: AbstractEventLoop | None = None
142
+ self._context = None
143
+ self._interrupt_count = 0
144
+ self._set_event_loop = False
145
+
146
+ def __enter__(self) -> Self:
147
+ self._lazy_init()
148
+ return self
149
+
150
+ def __exit__(
151
+ self,
152
+ exc_type: type[BaseException] | None,
153
+ exc_val: BaseException | None,
154
+ exc_tb: TracebackType | None,
155
+ ) -> None:
156
+ self.close()
157
+
158
+ def close(self) -> None:
159
+ """Shutdown and close event loop."""
160
+ loop = self._loop
161
+ if self._state is not _State.INITIALIZED or loop is None:
162
+ return
163
+ try:
164
+ _cancel_all_tasks(loop)
165
+ loop.run_until_complete(loop.shutdown_asyncgens())
166
+ if hasattr(loop, "shutdown_default_executor"):
167
+ loop.run_until_complete(loop.shutdown_default_executor())
168
+ else:
169
+ loop.run_until_complete(_shutdown_default_executor(loop))
170
+ finally:
171
+ if self._set_event_loop:
172
+ events.set_event_loop(None)
173
+ loop.close()
174
+ self._loop = None
175
+ self._state = _State.CLOSED
176
+
177
+ def get_loop(self) -> AbstractEventLoop:
178
+ """Return embedded event loop."""
179
+ self._lazy_init()
180
+ return self._loop
181
+
182
+ def run(self, coro: Coroutine[T_Retval], *, context=None) -> T_Retval:
183
+ """Run a coroutine inside the embedded event loop."""
184
+ if not coroutines.iscoroutine(coro):
185
+ raise ValueError(f"a coroutine was expected, got {coro!r}")
186
+
187
+ if events._get_running_loop() is not None:
188
+ # fail fast with short traceback
189
+ raise RuntimeError(
190
+ "Runner.run() cannot be called from a running event loop"
191
+ )
192
+
193
+ self._lazy_init()
194
+
195
+ if context is None:
196
+ context = self._context
197
+ task = context.run(self._loop.create_task, coro)
198
+
199
+ if (
200
+ threading.current_thread() is threading.main_thread()
201
+ and signal.getsignal(signal.SIGINT) is signal.default_int_handler
202
+ ):
203
+ sigint_handler = partial(self._on_sigint, main_task=task)
204
+ try:
205
+ signal.signal(signal.SIGINT, sigint_handler)
206
+ except ValueError:
207
+ # `signal.signal` may throw if `threading.main_thread` does
208
+ # not support signals (e.g. embedded interpreter with signals
209
+ # not registered - see gh-91880)
210
+ sigint_handler = None
211
+ else:
212
+ sigint_handler = None
213
+
214
+ self._interrupt_count = 0
215
+ try:
216
+ return self._loop.run_until_complete(task)
217
+ except exceptions.CancelledError:
218
+ if self._interrupt_count > 0:
219
+ uncancel = getattr(task, "uncancel", None)
220
+ if uncancel is not None and uncancel() == 0:
221
+ raise KeyboardInterrupt # noqa: B904
222
+ raise # CancelledError
223
+ finally:
224
+ if (
225
+ sigint_handler is not None
226
+ and signal.getsignal(signal.SIGINT) is sigint_handler
227
+ ):
228
+ signal.signal(signal.SIGINT, signal.default_int_handler)
229
+
230
+ def _lazy_init(self) -> None:
231
+ if self._state is _State.CLOSED:
232
+ raise RuntimeError("Runner is closed")
233
+ if self._state is _State.INITIALIZED:
234
+ return
235
+ if self._loop_factory is None:
236
+ self._loop = events.new_event_loop()
237
+ if not self._set_event_loop:
238
+ # Call set_event_loop only once to avoid calling
239
+ # attach_loop multiple times on child watchers
240
+ events.set_event_loop(self._loop)
241
+ self._set_event_loop = True
242
+ else:
243
+ self._loop = self._loop_factory()
244
+ if self._debug is not None:
245
+ self._loop.set_debug(self._debug)
246
+ self._context = contextvars.copy_context()
247
+ self._state = _State.INITIALIZED
248
+
249
+ def _on_sigint(self, signum, frame, main_task: asyncio.Task) -> None:
250
+ self._interrupt_count += 1
251
+ if self._interrupt_count == 1 and not main_task.done():
252
+ main_task.cancel()
253
+ # wakeup loop if it is blocked by select() with long timeout
254
+ self._loop.call_soon_threadsafe(lambda: None)
255
+ return
256
+ raise KeyboardInterrupt()
257
+
258
+ def _cancel_all_tasks(loop: AbstractEventLoop) -> None:
259
+ to_cancel = tasks.all_tasks(loop)
260
+ if not to_cancel:
261
+ return
262
+
263
+ for task in to_cancel:
264
+ task.cancel()
265
+
266
+ loop.run_until_complete(tasks.gather(*to_cancel, return_exceptions=True))
267
+
268
+ for task in to_cancel:
269
+ if task.cancelled():
270
+ continue
271
+ if task.exception() is not None:
272
+ loop.call_exception_handler(
273
+ {
274
+ "message": "unhandled exception during asyncio.run() shutdown",
275
+ "exception": task.exception(),
276
+ "task": task,
277
+ }
278
+ )
279
+
280
+ async def _shutdown_default_executor(loop: AbstractEventLoop) -> None:
281
+ """Schedule the shutdown of the default executor."""
282
+
283
+ def _do_shutdown(future: asyncio.futures.Future) -> None:
284
+ try:
285
+ loop._default_executor.shutdown(wait=True) # type: ignore[attr-defined]
286
+ loop.call_soon_threadsafe(future.set_result, None)
287
+ except Exception as ex:
288
+ loop.call_soon_threadsafe(future.set_exception, ex)
289
+
290
+ loop._executor_shutdown_called = True
291
+ if loop._default_executor is None:
292
+ return
293
+ future = loop.create_future()
294
+ thread = threading.Thread(target=_do_shutdown, args=(future,))
295
+ thread.start()
296
+ try:
297
+ await future
298
+ finally:
299
+ thread.join()
300
+
301
+
302
+ T_Retval = TypeVar("T_Retval")
303
+ T_co = TypeVar("T_co", covariant=True)
304
+ T_contra = TypeVar("T_contra", contravariant=True)
305
+ PosArgsT = TypeVarTuple("PosArgsT")
306
+ P = ParamSpec("P")
307
+
308
+ _root_task: RunVar[asyncio.Task[Any] | None] = RunVar("_root_task")
309
+
310
+
311
+ def find_root_task() -> asyncio.Task:
312
+ root_task = _root_task.get(None)
313
+ if root_task is not None and not root_task.done():
314
+ return root_task
315
+
316
+ # Look for a task that has been started via run_until_complete()
317
+ for task in all_tasks():
318
+ if task._callbacks and not task.done():
319
+ for cb, context in task._callbacks:
320
+ if (
321
+ cb is _run_until_complete_cb
322
+ or getattr(cb, "__module__", None) == "uvloop.loop"
323
+ ):
324
+ _root_task.set(task)
325
+
326
+ def _unset(t: asyncio.Task[Any]) -> None:
327
+ if vars := _run_vars.get(t.get_loop()):
328
+ vars.pop(_root_task, None)
329
+
330
+ # Register a callback to break the task -> loop -> _run_var[loop][_root_task] -> task cycle
331
+ # Also run it in its own context to not create another reference.
332
+ # We can't use RunVar.reset() here since these are called synchronously
333
+ # and thus lowlevel.current_token() (which RunVar.reset() depends on) fails.
334
+ task.add_done_callback(_unset, context=context)
335
+ return task
336
+
337
+ # Look up the topmost task in the AnyIO task tree, if possible
338
+ task = cast(asyncio.Task, current_task())
339
+ state = _task_states.get(task)
340
+ if state:
341
+ cancel_scope = state.cancel_scope
342
+ while cancel_scope and cancel_scope._parent_scope is not None:
343
+ cancel_scope = cancel_scope._parent_scope
344
+
345
+ if cancel_scope is not None:
346
+ return cast(asyncio.Task, cancel_scope._host_task)
347
+
348
+ return task
349
+
350
+
351
+ def _task_started(task: asyncio.Task) -> bool:
352
+ """Return ``True`` if the task has been started and has not finished."""
353
+ # The task coro should never be None here, as we never add finished tasks to the
354
+ # task list
355
+ coro = task.get_coro()
356
+ assert coro is not None
357
+ return getcoroutinestate(coro) in (CORO_RUNNING, CORO_SUSPENDED)
358
+
359
+
360
+ #
361
+ # Timeouts and cancellation
362
+ #
363
+
364
+
365
+ def is_anyio_cancellation(exc: CancelledError) -> bool:
366
+ # Sometimes third party frameworks catch a CancelledError and raise a new one, so as
367
+ # a workaround we have to look at the previous ones in __context__ too for a
368
+ # matching cancel message
369
+ while True:
370
+ if (
371
+ exc.args
372
+ and isinstance(exc.args[0], str)
373
+ and exc.args[0].startswith("Cancelled via cancel scope ")
374
+ ):
375
+ return True
376
+
377
+ if isinstance(exc.__context__, CancelledError):
378
+ exc = exc.__context__
379
+ continue
380
+
381
+ return False
382
+
383
+
384
+ class CancelScope(BaseCancelScope):
385
+ __slots__ = (
386
+ "_active",
387
+ "_cancel_called",
388
+ "_cancel_handle",
389
+ "_cancel_reason",
390
+ "_cancelled_caught",
391
+ "_cancelling_at_enter",
392
+ "_child_scopes",
393
+ "_deadline",
394
+ "_host_task",
395
+ "_parent_scope",
396
+ "_pending_uncancellations",
397
+ "_shield",
398
+ "_tasks",
399
+ "_timeout_handle",
400
+ )
401
+
402
+ def __new__(cls, *, deadline: float = math.inf, shield: bool = False) -> Self:
403
+ return object.__new__(cls)
404
+
405
+ def __init__(self, deadline: float = math.inf, shield: bool = False):
406
+ if math.isnan(deadline):
407
+ raise ValueError("deadline must not be NaN")
408
+
409
+ self._deadline = deadline
410
+ self._shield = shield
411
+ self._parent_scope: CancelScope | None = None
412
+ self._child_scopes: set[CancelScope] = set()
413
+ self._cancel_called = False
414
+ self._cancel_reason: str | None = None
415
+ self._cancelled_caught = False
416
+ self._active = False
417
+ self._timeout_handle: asyncio.TimerHandle | None = None
418
+ self._cancel_handle: asyncio.Handle | None = None
419
+ self._tasks: set[asyncio.Task] = set()
420
+ self._host_task: asyncio.Task | None = None
421
+ # Value of Task.cancelling() on the host task when the scope was entered
422
+ self._cancelling_at_enter = 0
423
+ if sys.version_info >= (3, 11):
424
+ self._pending_uncancellations: int | None = 0
425
+ else:
426
+ self._pending_uncancellations = None
427
+
428
+ def __enter__(self) -> Self:
429
+ if self._active:
430
+ raise RuntimeError(
431
+ "Each CancelScope may only be used for a single 'with' block"
432
+ )
433
+
434
+ self._host_task = host_task = cast(asyncio.Task, current_task())
435
+ self._tasks.add(host_task)
436
+ try:
437
+ task_state = _task_states[host_task]
438
+ except KeyError:
439
+ task_state = TaskState(None, self)
440
+ _task_states[host_task] = task_state
441
+ else:
442
+ self._parent_scope = task_state.cancel_scope
443
+ task_state.cancel_scope = self
444
+ if self._parent_scope is not None:
445
+ # If using an eager task factory, the parent scope may not even contain
446
+ # the host task
447
+ self._parent_scope._child_scopes.add(self)
448
+ self._parent_scope._tasks.discard(host_task)
449
+
450
+ self._timeout()
451
+ self._active = True
452
+ if self._pending_uncancellations is not None:
453
+ self._cancelling_at_enter = host_task.cancelling()
454
+
455
+ # Start cancelling the host task if the scope was cancelled before entering
456
+ if self._cancel_called:
457
+ self._deliver_cancellation(self)
458
+
459
+ return self
460
+
461
+ def __exit__(
462
+ self,
463
+ exc_type: type[BaseException] | None,
464
+ exc_val: BaseException | None,
465
+ exc_tb: TracebackType | None,
466
+ ) -> bool:
467
+ del exc_tb
468
+
469
+ if not self._active:
470
+ raise RuntimeError("This cancel scope is not active")
471
+ if current_task() is not self._host_task:
472
+ raise RuntimeError(
473
+ "Attempted to exit cancel scope in a different task than it was "
474
+ "entered in"
475
+ )
476
+
477
+ assert self._host_task is not None
478
+ host_task_state = _task_states.get(self._host_task)
479
+ if host_task_state is None or host_task_state.cancel_scope is not self:
480
+ raise RuntimeError(
481
+ "Attempted to exit a cancel scope that isn't the current tasks's "
482
+ "current cancel scope"
483
+ )
484
+
485
+ try:
486
+ self._active = False
487
+ if self._timeout_handle:
488
+ self._timeout_handle.cancel()
489
+ self._timeout_handle = None
490
+
491
+ self._tasks.remove(self._host_task)
492
+ if self._parent_scope is not None:
493
+ self._parent_scope._child_scopes.remove(self)
494
+ self._parent_scope._tasks.add(self._host_task)
495
+
496
+ host_task_state.cancel_scope = self._parent_scope
497
+
498
+ # Restart the cancellation effort in the closest visible, cancelled parent
499
+ # scope if necessary
500
+ self._restart_cancellation_in_parent()
501
+
502
+ # We only swallow the exception iff it was an AnyIO CancelledError, either
503
+ # directly as exc_val or inside an exception group and there are no cancelled
504
+ # parent cancel scopes visible to us here
505
+ if self._cancel_called and not self._parent_cancellation_is_visible_to_us:
506
+ # For each level-cancel() call made on the host task, call uncancel()
507
+ while self._pending_uncancellations:
508
+ self._host_task.uncancel()
509
+ self._pending_uncancellations -= 1
510
+
511
+ # If the host task still has more cancellation requests pending than it
512
+ # had when this scope was entered, a native Task.cancel() landed while
513
+ # the scope was active. If it arrived in the same event loop iteration
514
+ # as our own cancellation, asyncio folded the two requests into a
515
+ # single CancelledError carrying our cancellation message, so we must
516
+ # not swallow that exception even though it looks like ours (#1214).
517
+ if (
518
+ self._pending_uncancellations is not None
519
+ and self._host_task.cancelling() > self._cancelling_at_enter
520
+ ):
521
+ return False
522
+
523
+ # Update cancelled_caught and check for exceptions we must not swallow
524
+ if isinstance(exc_val, BaseExceptionGroup):
525
+ cancelleds_caught, remaining = exc_val.split(
526
+ lambda exc: (
527
+ isinstance(exc, CancelledError)
528
+ and is_anyio_cancellation(exc)
529
+ )
530
+ )
531
+
532
+ if cancelleds_caught is None:
533
+ return False
534
+
535
+ self._cancelled_caught = True
536
+
537
+ if remaining is None:
538
+ return True
539
+
540
+ context = remaining.__context__
541
+ try:
542
+ # Preserve __cause__ and __suppress_context__ by avoiding `raise
543
+ # ... from ...`
544
+ raise remaining
545
+ finally:
546
+ # Preserve __context__
547
+ remaining.__context__ = context
548
+ del context
549
+ else:
550
+ if isinstance(exc_val, CancelledError) and is_anyio_cancellation(
551
+ exc_val
552
+ ):
553
+ self._cancelled_caught = True
554
+ return True
555
+ else:
556
+ return False
557
+ else:
558
+ if self._pending_uncancellations:
559
+ assert self._parent_scope is not None
560
+ assert self._parent_scope._pending_uncancellations is not None
561
+ self._parent_scope._pending_uncancellations += (
562
+ self._pending_uncancellations
563
+ )
564
+ self._pending_uncancellations = 0
565
+
566
+ return False
567
+ finally:
568
+ self._host_task = None
569
+ del exc_val
570
+
571
+ @property
572
+ def _effectively_cancelled(self) -> bool:
573
+ cancel_scope: CancelScope | None = self
574
+ while cancel_scope is not None:
575
+ if cancel_scope._cancel_called:
576
+ return True
577
+
578
+ if cancel_scope.shield:
579
+ return False
580
+
581
+ cancel_scope = cancel_scope._parent_scope
582
+
583
+ return False
584
+
585
+ @property
586
+ def _parent_cancellation_is_visible_to_us(self) -> bool:
587
+ return (
588
+ self._parent_scope is not None
589
+ and not self.shield
590
+ and self._parent_scope._effectively_cancelled
591
+ )
592
+
593
+ def _timeout(self) -> None:
594
+ if self._deadline != math.inf:
595
+ loop = get_running_loop()
596
+ if loop.time() >= self._deadline:
597
+ self.cancel("deadline exceeded")
598
+ else:
599
+ self._timeout_handle = loop.call_at(self._deadline, self._timeout)
600
+
601
+ def _deliver_cancellation(self, origin: CancelScope) -> bool:
602
+ """
603
+ Deliver cancellation to directly contained tasks and nested cancel scopes.
604
+
605
+ Schedule another run at the end if we still have tasks eligible for
606
+ cancellation.
607
+
608
+ :param origin: the cancel scope that originated the cancellation
609
+ :return: ``True`` if the delivery needs to be retried on the next cycle
610
+
611
+ """
612
+ should_retry = False
613
+ current = current_task()
614
+ for task in self._tasks:
615
+ # Always skip tasks that are already done (see issue #1111)
616
+ if task.done():
617
+ continue
618
+
619
+ should_retry = True
620
+ if task._must_cancel: # type: ignore[attr-defined]
621
+ continue
622
+
623
+ # The task is eligible for cancellation if it has started
624
+ if task is not current and (task is self._host_task or _task_started(task)):
625
+ waiter = task._fut_waiter # type: ignore[attr-defined]
626
+ if not isinstance(waiter, asyncio.Future) or not waiter.done():
627
+ task.cancel(origin._cancel_reason)
628
+ if (
629
+ task is origin._host_task
630
+ and origin._pending_uncancellations is not None
631
+ ):
632
+ origin._pending_uncancellations += 1
633
+
634
+ # Deliver cancellation to child scopes that aren't shielded or running their own
635
+ # cancellation callbacks
636
+ for scope in self._child_scopes:
637
+ if not scope._shield and not scope.cancel_called:
638
+ should_retry = scope._deliver_cancellation(origin) or should_retry
639
+
640
+ # Schedule another callback if there are still tasks left
641
+ if origin is self:
642
+ if should_retry:
643
+ self._cancel_handle = get_running_loop().call_soon(
644
+ self._deliver_cancellation, origin
645
+ )
646
+ else:
647
+ self._cancel_handle = None
648
+
649
+ return should_retry
650
+
651
+ def _restart_cancellation_in_parent(self) -> None:
652
+ """
653
+ Restart the cancellation effort in the closest directly cancelled parent scope.
654
+
655
+ """
656
+ scope = self._parent_scope
657
+ while scope is not None:
658
+ if scope._cancel_called:
659
+ if scope._cancel_handle is None:
660
+ scope._deliver_cancellation(scope)
661
+
662
+ break
663
+
664
+ # No point in looking beyond any shielded scope
665
+ if scope._shield:
666
+ break
667
+
668
+ scope = scope._parent_scope
669
+
670
+ def _reparent(self, new_parent: CancelScope) -> None:
671
+ """
672
+ Move this active scope from its current parent to ``new_parent``.
673
+
674
+ Used by :meth:`TaskGroup.start` to move a task that has just called
675
+ ``task_status.started()`` into the target task group's cancel scope.
676
+ """
677
+ if self._parent_scope is new_parent:
678
+ return
679
+
680
+ if self._parent_scope is not None:
681
+ self._parent_scope._child_scopes.discard(self)
682
+
683
+ self._parent_scope = new_parent
684
+ new_parent._child_scopes.add(self)
685
+
686
+ # If the new parent (or an ancestor) is already cancelled, (re)start the
687
+ # delivery loop to ensure we're cancelled at next checkpoint like Trio.
688
+ self._restart_cancellation_in_parent()
689
+
690
+ def cancel(self, reason: str | None = None) -> None:
691
+ if not self._cancel_called:
692
+ if self._timeout_handle:
693
+ self._timeout_handle.cancel()
694
+ self._timeout_handle = None
695
+
696
+ self._cancel_called = True
697
+ self._cancel_reason = f"Cancelled via cancel scope {id(self):x}"
698
+ if task := current_task():
699
+ self._cancel_reason += f" by {task}"
700
+
701
+ if reason:
702
+ self._cancel_reason += f"; reason: {reason}"
703
+
704
+ if self._host_task is not None:
705
+ self._deliver_cancellation(self)
706
+
707
+ @property
708
+ def deadline(self) -> float:
709
+ return self._deadline
710
+
711
+ @deadline.setter
712
+ def deadline(self, value: float) -> None:
713
+ value = float(value)
714
+ if math.isnan(value):
715
+ raise ValueError("deadline must not be NaN")
716
+
717
+ self._deadline = value
718
+ if self._timeout_handle is not None:
719
+ self._timeout_handle.cancel()
720
+ self._timeout_handle = None
721
+
722
+ if self._active and not self._cancel_called:
723
+ self._timeout()
724
+
725
+ @property
726
+ def cancel_called(self) -> bool:
727
+ return self._cancel_called
728
+
729
+ @property
730
+ def cancelled_caught(self) -> bool:
731
+ return self._cancelled_caught
732
+
733
+ @property
734
+ def shield(self) -> bool:
735
+ return self._shield
736
+
737
+ @shield.setter
738
+ def shield(self, value: bool) -> None:
739
+ if self._shield != value:
740
+ self._shield = value
741
+ if not value:
742
+ self._restart_cancellation_in_parent()
743
+
744
+
745
+ #
746
+ # Task states
747
+ #
748
+
749
+
750
+ class TaskState:
751
+ """
752
+ Encapsulates auxiliary task information that cannot be added to the Task instance
753
+ itself because there are no guarantees about its implementation.
754
+ """
755
+
756
+ __slots__ = "__weakref__", "cancel_scope", "parent_id"
757
+
758
+ def __init__(self, parent_id: int | None, cancel_scope: CancelScope | None):
759
+ self.parent_id = parent_id
760
+ self.cancel_scope = cancel_scope
761
+
762
+
763
+ _task_states: WeakKeyDictionary[asyncio.Task, TaskState] = WeakKeyDictionary()
764
+
765
+
766
+ #
767
+ # Task groups
768
+ #
769
+
770
+
771
+ class _AsyncioTaskStatus(abc.TaskStatus[T_contra]):
772
+ def __init__(
773
+ self,
774
+ future: asyncio.Future,
775
+ parent_id: int,
776
+ target_scope: CancelScope,
777
+ spawn_scope: CancelScope,
778
+ ):
779
+ self._future = future
780
+ self._parent_id = parent_id
781
+ # The eventual parent scope for this spawn_scope
782
+ # (after task_status.started() has been called)
783
+ self._target_scope = target_scope
784
+ # The task's own cancel scope, also held by its TaskHandle
785
+ self._spawn_scope = spawn_scope
786
+
787
+ def started(self, value: T_contra | None = None) -> None:
788
+ task = cast(asyncio.Task, current_task())
789
+ _task_states[task].parent_id = self._parent_id
790
+ if self._future.done():
791
+ if not self._future.cancelled():
792
+ raise RuntimeError("called 'started' twice on the same task status")
793
+ else:
794
+ # Caller of start() was cancelled, nothing to reparent
795
+ return
796
+
797
+ self._future.set_result(value)
798
+ self._spawn_scope._reparent(self._target_scope)
799
+
800
+
801
+ if sys.version_info >= (3, 12):
802
+ _eager_task_factory_code: CodeType | None = asyncio.eager_task_factory.__code__
803
+ else:
804
+ _eager_task_factory_code = None
805
+
806
+
807
+ class TaskGroup(abc.TaskGroup):
808
+ def __init__(self) -> None:
809
+ self.cancel_scope: CancelScope = CancelScope()
810
+ self._entered = False
811
+ self._exceptions: list[BaseException] = []
812
+ self._tasks: set[asyncio.Task] = set()
813
+ self._on_completed_fut: asyncio.Future[None] | None = None
814
+
815
+ async def __aenter__(self) -> Self:
816
+ if self._entered:
817
+ raise RuntimeError("TaskGroup cannot be entered more than once")
818
+
819
+ self._entered = True
820
+
821
+ self.cancel_scope.__enter__()
822
+ return self
823
+
824
+ async def __aexit__(
825
+ self,
826
+ exc_type: type[BaseException] | None,
827
+ exc_val: BaseException | None,
828
+ exc_tb: TracebackType | None,
829
+ ) -> bool:
830
+ try:
831
+ if exc_val is not None:
832
+ self.cancel_scope.cancel()
833
+ if not isinstance(exc_val, CancelledError):
834
+ self._exceptions.append(exc_val)
835
+
836
+ loop = get_running_loop()
837
+ try:
838
+ if self._tasks:
839
+ with CancelScope() as wait_scope:
840
+ while self._tasks:
841
+ self._on_completed_fut = loop.create_future()
842
+
843
+ try:
844
+ await self._on_completed_fut
845
+ except CancelledError as exc:
846
+ # Shield the scope against further cancellation attempts,
847
+ # as they're not productive (#695)
848
+ wait_scope.shield = True
849
+ self.cancel_scope.cancel()
850
+
851
+ # Set exc_val from the cancellation exception if it was
852
+ # previously unset. However, we should not replace a native
853
+ # cancellation exception with one raise by a cancel scope.
854
+ if exc_val is None or (
855
+ isinstance(exc_val, CancelledError)
856
+ and not is_anyio_cancellation(exc)
857
+ ):
858
+ exc_val = exc
859
+
860
+ self._on_completed_fut = None
861
+ else:
862
+ # If there are no child tasks to wait on, run at least one checkpoint
863
+ # anyway
864
+ await AsyncIOBackend.cancel_shielded_checkpoint()
865
+
866
+ if self._exceptions:
867
+ # The exception that got us here should already have been
868
+ # added to self._exceptions so it's ok to break exception
869
+ # chaining and avoid adding a "During handling of above..."
870
+ # for each nesting level.
871
+ raise BaseExceptionGroup(
872
+ "unhandled errors in a TaskGroup", self._exceptions
873
+ ) from None
874
+ elif exc_val:
875
+ raise exc_val
876
+ except BaseException as exc:
877
+ if self.cancel_scope.__exit__(type(exc), exc, exc.__traceback__):
878
+ return True
879
+
880
+ raise
881
+
882
+ return self.cancel_scope.__exit__(exc_type, exc_val, exc_tb)
883
+ finally:
884
+ del exc_val, exc_tb, self._exceptions
885
+
886
+ def _spawn(
887
+ self,
888
+ coro: Coroutine[Any, Any, T_co],
889
+ name: object,
890
+ task_status: _AsyncioTaskStatus | None = None,
891
+ ) -> TaskHandle[T_co]:
892
+ task_status_future = task_status._future if task_status is not None else None
893
+
894
+ def task_done(_task: asyncio.Task) -> None:
895
+ if sys.version_info >= (3, 14) and self.cancel_scope._host_task is not None:
896
+ asyncio.future_discard_from_awaited_by(
897
+ _task, self.cancel_scope._host_task
898
+ )
899
+
900
+ task_state = _task_states[_task]
901
+ assert task_state.cancel_scope is not None
902
+ assert _task in task_state.cancel_scope._tasks
903
+ task_state.cancel_scope._tasks.remove(_task)
904
+ self._tasks.remove(task)
905
+ del _task_states[_task]
906
+
907
+ if self._on_completed_fut is not None and not self._tasks:
908
+ try:
909
+ self._on_completed_fut.set_result(None)
910
+ except asyncio.InvalidStateError:
911
+ pass
912
+
913
+ try:
914
+ exc = _task.exception()
915
+ except CancelledError as e:
916
+ while isinstance(e.__context__, CancelledError):
917
+ e = e.__context__
918
+
919
+ exc = e
920
+
921
+ if exc is not None:
922
+ # The future can only be in the cancelled state if the host task was
923
+ # cancelled, so return immediately instead of adding one more
924
+ # CancelledError to the exceptions list
925
+ if task_status_future is not None and task_status_future.cancelled():
926
+ return
927
+
928
+ if task_status_future is None or task_status_future.done():
929
+ if not isinstance(exc, CancelledError):
930
+ self._exceptions.append(exc)
931
+
932
+ if not self.cancel_scope._effectively_cancelled:
933
+ self.cancel_scope.cancel()
934
+ else:
935
+ task_status_future.set_exception(exc)
936
+ elif task_status_future is not None and not task_status_future.done():
937
+ task_status_future.set_exception(
938
+ RuntimeError("Child exited without calling task_status.started()")
939
+ )
940
+
941
+ if task_status_future is not None:
942
+ parent_id = id(current_task())
943
+ caller_state = _task_states.get(cast(asyncio.Task, current_task()))
944
+ if caller_state is not None and caller_state.cancel_scope is not None:
945
+ initial_scope = caller_state.cancel_scope
946
+ else:
947
+ # The caller is an unmanaged task (no task state)
948
+ initial_scope = self.cancel_scope
949
+ else:
950
+ parent_id = id(self.cancel_scope._host_task)
951
+ initial_scope = self.cancel_scope
952
+
953
+ spawn_scope = task_status._spawn_scope if task_status is not None else None
954
+ handle = TaskHandle(coro, name, cancel_scope=spawn_scope)
955
+ loop = asyncio.get_running_loop()
956
+ wrapper_coro = handle._run_coro()
957
+ try:
958
+ if (
959
+ (factory := loop.get_task_factory())
960
+ and getattr(factory, "__code__", None) is _eager_task_factory_code
961
+ and (closure := getattr(factory, "__closure__", None))
962
+ ):
963
+ custom_task_constructor = closure[0].cell_contents
964
+ task = custom_task_constructor(
965
+ wrapper_coro, loop=loop, name=handle.name
966
+ )
967
+ else:
968
+ task = loop.create_task(wrapper_coro, name=handle.name)
969
+ except BaseException:
970
+ with suppress(BaseException):
971
+ wrapper_coro.close()
972
+
973
+ with suppress(BaseException):
974
+ coro.close()
975
+
976
+ raise
977
+
978
+ # Make the spawned task inherit the initial cancel scope
979
+ _task_states[task] = TaskState(parent_id=parent_id, cancel_scope=initial_scope)
980
+ initial_scope._tasks.add(task)
981
+ self._tasks.add(task)
982
+ if sys.version_info >= (3, 14) and self.cancel_scope._host_task is not None:
983
+ asyncio.future_add_to_awaited_by(task, self.cancel_scope._host_task)
984
+
985
+ task.add_done_callback(task_done)
986
+ return handle
987
+
988
+ def create_task(
989
+ self,
990
+ coro: Coroutine[Any, Any, T_co],
991
+ *,
992
+ name: object = None,
993
+ context: Context | None = None,
994
+ ) -> TaskHandle[T_co]:
995
+ if not isinstance(coro, Coroutine):
996
+ raise TypeError(f"expected a coroutine, got {coro.__class__.__qualname__}")
997
+
998
+ if not self._entered or not self.cancel_scope._active:
999
+ coro.close()
1000
+ raise RuntimeError(
1001
+ "This task group is not active; no new tasks can be started."
1002
+ )
1003
+
1004
+ final_name = get_coro_name(coro, name)
1005
+
1006
+ if context is not None:
1007
+ return context.run(self._spawn, coro, name=final_name)
1008
+ else:
1009
+ return self._spawn(coro, name=final_name)
1010
+
1011
+ async def start(
1012
+ self,
1013
+ func: Callable[[Unpack[PosArgsT]], Coroutine[Any, Any, T_co]],
1014
+ *args: Unpack[PosArgsT],
1015
+ name: object = None,
1016
+ return_handle: Literal[False, True] = False,
1017
+ ) -> Any:
1018
+ if not self._entered or not self.cancel_scope._active:
1019
+ raise RuntimeError(
1020
+ "This task group is not active; no new tasks can be started."
1021
+ )
1022
+
1023
+ # Until task_status.started() is called, a task spawned via start() belongs to
1024
+ # the *caller's* cancel scope, not the target group's, so cancelling the group
1025
+ # does not cancel a task that hasn't reported startup yet. The
1026
+ # task_status.started() call moves the task's cancel scope to this task group's
1027
+ # cancel scope.
1028
+ #
1029
+ # The caller may be an unmanaged task (no _task_states entry), in which case
1030
+ # fall back to the group's own scope.
1031
+ future: asyncio.Future = asyncio.Future()
1032
+ final_name = get_callable_name(func, name)
1033
+ task_status: _AsyncioTaskStatus[Any] = _AsyncioTaskStatus(
1034
+ future, id(self.cancel_scope._host_task), self.cancel_scope, CancelScope()
1035
+ )
1036
+ coro = call_for_coroutine(func, args, task_status=task_status)
1037
+ handle = self._spawn(coro, final_name, task_status)
1038
+
1039
+ # If the task raises an exception after sending a start value without a switch
1040
+ # point between, the task group is cancelled and this method never proceeds to
1041
+ # process the completed future. That's why we have to have a shielded cancel
1042
+ # scope here.
1043
+ try:
1044
+ await future
1045
+ except BaseException:
1046
+ if handle.status is TaskHandle.Status.PENDING:
1047
+ # Cancel the task and wait for it to exit before returning
1048
+ handle.cancel()
1049
+ with CancelScope(shield=True):
1050
+ await handle.wait()
1051
+
1052
+ raise
1053
+
1054
+ if return_handle:
1055
+ handle._start_value = future.result()
1056
+ return handle
1057
+ else:
1058
+ return future.result()
1059
+
1060
+
1061
+ #
1062
+ # Threads
1063
+ #
1064
+
1065
+ _Retval_Queue_Type = tuple[T_Retval | None, BaseException | None]
1066
+
1067
+
1068
+ class WorkerThread(Thread):
1069
+ MAX_IDLE_TIME = 10 # seconds
1070
+
1071
+ def __init__(
1072
+ self,
1073
+ root_task: asyncio.Task,
1074
+ workers: set[WorkerThread],
1075
+ idle_workers: deque[WorkerThread],
1076
+ ):
1077
+ kwargs: dict[str, Any] = {}
1078
+ if sys.version_info >= (3, 14):
1079
+ kwargs["context"] = Context()
1080
+
1081
+ super().__init__(name="AnyIO worker thread", **kwargs)
1082
+ self.root_task = root_task
1083
+ self.workers = workers
1084
+ self.idle_workers = idle_workers
1085
+ self.loop = root_task._loop
1086
+ self.queue: Queue[
1087
+ tuple[Context, Callable, tuple, asyncio.Future, CancelScope] | None
1088
+ ] = Queue(2)
1089
+ self.idle_since = AsyncIOBackend.current_time()
1090
+ self.stopping = False
1091
+
1092
+ def _report_result(
1093
+ self, future: asyncio.Future, result: Any, exc: BaseException | None
1094
+ ) -> None:
1095
+ self.idle_since = AsyncIOBackend.current_time()
1096
+ if not self.stopping:
1097
+ self.idle_workers.append(self)
1098
+
1099
+ if not future.cancelled():
1100
+ if exc is not None:
1101
+ if isinstance(exc, StopIteration):
1102
+ new_exc = RuntimeError("coroutine raised StopIteration")
1103
+ new_exc.__cause__ = exc
1104
+ exc = new_exc
1105
+
1106
+ future.set_exception(exc)
1107
+ else:
1108
+ future.set_result(result)
1109
+
1110
+ def run(self) -> None:
1111
+ with claim_worker_thread(AsyncIOBackend, self.loop):
1112
+ while True:
1113
+ item = self.queue.get()
1114
+ if item is None:
1115
+ # Shutdown command received
1116
+ return
1117
+
1118
+ context, func, args, future, cancel_scope = item
1119
+ result = None
1120
+ exception: BaseException | None = None
1121
+ if not future.cancelled():
1122
+ threadlocals.current_cancel_scope = cancel_scope
1123
+ try:
1124
+ result = context.run(func, *args)
1125
+ except BaseException as exc:
1126
+ exception = exc
1127
+ finally:
1128
+ del threadlocals.current_cancel_scope
1129
+
1130
+ # Report the result even if the future was cancelled before the call
1131
+ # was started, so that the worker is put back on the idle list
1132
+ try:
1133
+ self.loop.call_soon_threadsafe(
1134
+ self._report_result, future, result, exception
1135
+ )
1136
+ except RuntimeError:
1137
+ if not self.loop.is_closed():
1138
+ raise
1139
+
1140
+ del result, exception
1141
+ self.queue.task_done()
1142
+ del item, context, func, args, future, cancel_scope
1143
+
1144
+ def stop(self, f: asyncio.Task | None = None) -> None:
1145
+ self.stopping = True
1146
+ self.queue.put_nowait(None)
1147
+ self.workers.discard(self)
1148
+ try:
1149
+ self.idle_workers.remove(self)
1150
+ except ValueError:
1151
+ pass
1152
+
1153
+
1154
+ _threadpool_idle_workers: RunVar[deque[WorkerThread]] = RunVar(
1155
+ "_threadpool_idle_workers"
1156
+ )
1157
+ _threadpool_workers: RunVar[set[WorkerThread]] = RunVar("_threadpool_workers")
1158
+
1159
+
1160
+ #
1161
+ # Subprocesses
1162
+ #
1163
+
1164
+
1165
+ @dataclass(eq=False)
1166
+ class StreamReaderWrapper(abc.ByteReceiveStream):
1167
+ _stream: asyncio.StreamReader
1168
+
1169
+ async def receive(self, max_bytes: int = 65536) -> bytes:
1170
+ if max_bytes < 1:
1171
+ raise ValueError("max_bytes must be a positive integer")
1172
+
1173
+ data = await self._stream.read(max_bytes)
1174
+ if data:
1175
+ return data
1176
+ else:
1177
+ raise EndOfStream
1178
+
1179
+ async def aclose(self) -> None:
1180
+ self._stream.set_exception(ClosedResourceError())
1181
+ await AsyncIOBackend.checkpoint()
1182
+
1183
+
1184
+ @dataclass(eq=False)
1185
+ class StreamWriterWrapper(abc.ByteSendStream):
1186
+ _stream: asyncio.StreamWriter
1187
+ _closed: bool = field(init=False, default=False)
1188
+
1189
+ async def send(self, item: bytes) -> None:
1190
+ await AsyncIOBackend.checkpoint_if_cancelled()
1191
+ stream_paused = self._stream._protocol._paused # type: ignore[attr-defined]
1192
+ try:
1193
+ self._stream.write(item)
1194
+ await self._stream.drain()
1195
+ except (ConnectionResetError, BrokenPipeError, RuntimeError) as exc:
1196
+ # If closed by us and/or the peer:
1197
+ # * on stdlib, drain() raises ConnectionResetError or BrokenPipeError
1198
+ # * on uvloop and Winloop, write() eventually starts raising RuntimeError
1199
+ if self._closed:
1200
+ raise ClosedResourceError from exc
1201
+ elif self._stream.is_closing():
1202
+ raise BrokenResourceError from exc
1203
+
1204
+ raise
1205
+
1206
+ if not stream_paused:
1207
+ await AsyncIOBackend.cancel_shielded_checkpoint()
1208
+
1209
+ async def aclose(self) -> None:
1210
+ self._closed = True
1211
+ self._stream.close()
1212
+ await AsyncIOBackend.checkpoint()
1213
+
1214
+
1215
+ @dataclass(eq=False)
1216
+ class Process(abc.Process):
1217
+ _process: asyncio.subprocess.Process
1218
+ _stdin: StreamWriterWrapper | None
1219
+ _stdout: StreamReaderWrapper | None
1220
+ _stderr: StreamReaderWrapper | None
1221
+ _exited: asyncio.Event
1222
+ _transport: asyncio.SubprocessTransport
1223
+
1224
+ async def aclose(self) -> None:
1225
+ with CancelScope(shield=True) as scope:
1226
+ # We need to close the underlying pipe_transports as well to allow a
1227
+ # process blocking on full buffers to receive SIGPIPE and exit.
1228
+ if self._stdin:
1229
+ await self._stdin.aclose()
1230
+ if pipe := self._transport.get_pipe_transport(0):
1231
+ pipe.close()
1232
+ if self._stdout:
1233
+ await self._stdout.aclose()
1234
+ if pipe := self._transport.get_pipe_transport(1):
1235
+ pipe.close()
1236
+ if self._stderr:
1237
+ await self._stderr.aclose()
1238
+ if pipe := self._transport.get_pipe_transport(2):
1239
+ pipe.close()
1240
+
1241
+ scope.shield = False
1242
+ try:
1243
+ await self.wait()
1244
+ except BaseException:
1245
+ scope.shield = True
1246
+ # Closing the transport on asyncio also handles sending kill
1247
+ self._transport.close()
1248
+ await self.wait()
1249
+ raise
1250
+
1251
+ async def wait(self) -> int:
1252
+ await self._exited.wait()
1253
+ assert self._process.returncode is not None
1254
+ return self._process.returncode
1255
+
1256
+ def terminate(self) -> None:
1257
+ self._process.terminate()
1258
+
1259
+ def kill(self) -> None:
1260
+ self._process.kill()
1261
+
1262
+ def send_signal(self, signal: int) -> None:
1263
+ self._process.send_signal(signal)
1264
+
1265
+ @property
1266
+ def pid(self) -> int:
1267
+ return self._process.pid
1268
+
1269
+ @property
1270
+ def returncode(self) -> int | None:
1271
+ return self._process.returncode
1272
+
1273
+ @property
1274
+ def stdin(self) -> abc.ByteSendStream | None:
1275
+ return self._stdin
1276
+
1277
+ @property
1278
+ def stdout(self) -> abc.ByteReceiveStream | None:
1279
+ return self._stdout
1280
+
1281
+ @property
1282
+ def stderr(self) -> abc.ByteReceiveStream | None:
1283
+ return self._stderr
1284
+
1285
+
1286
+ def _forcibly_shutdown_process_pool_on_exit(
1287
+ workers: set[Process], _task: object
1288
+ ) -> None:
1289
+ """
1290
+ Forcibly shuts down worker processes belonging to this event loop."""
1291
+ child_watcher: asyncio.AbstractChildWatcher | None = None # type: ignore[name-defined]
1292
+ if sys.version_info < (3, 12):
1293
+ try:
1294
+ child_watcher = asyncio.get_event_loop_policy().get_child_watcher()
1295
+ except NotImplementedError:
1296
+ pass
1297
+
1298
+ # Close as much as possible (w/o async/await) to avoid warnings
1299
+ for process in workers.copy():
1300
+ if process.returncode is not None:
1301
+ continue
1302
+
1303
+ process._stdin._stream._transport.close() # type: ignore[union-attr]
1304
+ process._stdout._stream._transport.close() # type: ignore[union-attr]
1305
+ process._stderr._stream._transport.close() # type: ignore[union-attr]
1306
+ process.kill()
1307
+ if child_watcher:
1308
+ child_watcher.remove_child_handler(process.pid)
1309
+
1310
+
1311
+ async def _shutdown_process_pool_on_exit(workers: set[abc.Process]) -> None:
1312
+ """
1313
+ Shuts down worker processes belonging to this event loop.
1314
+
1315
+ NOTE: this only works when the event loop was started using asyncio.run() or
1316
+ anyio.run().
1317
+
1318
+ """
1319
+ process: abc.Process
1320
+ try:
1321
+ await sleep(math.inf)
1322
+ except asyncio.CancelledError:
1323
+ workers = workers.copy()
1324
+ for process in workers:
1325
+ if process.returncode is None:
1326
+ process.kill()
1327
+
1328
+ for process in workers:
1329
+ await process.aclose()
1330
+
1331
+
1332
+ #
1333
+ # Sockets and networking
1334
+ #
1335
+
1336
+
1337
+ class StreamProtocol(asyncio.Protocol):
1338
+ read_queue: deque[bytes]
1339
+ read_event: asyncio.Event
1340
+ write_event: asyncio.Event
1341
+ exception: Exception | None = None
1342
+ is_at_eof: bool = False
1343
+
1344
+ def connection_made(self, transport: asyncio.BaseTransport) -> None:
1345
+ self.read_queue = deque()
1346
+ self.read_event = asyncio.Event()
1347
+ self.write_event = asyncio.Event()
1348
+ self.write_event.set()
1349
+ cast(asyncio.Transport, transport).set_write_buffer_limits(0)
1350
+
1351
+ def connection_lost(self, exc: Exception | None) -> None:
1352
+ if exc:
1353
+ self.exception = exc
1354
+
1355
+ self.read_event.set()
1356
+ self.write_event.set()
1357
+
1358
+ def data_received(self, data: bytes) -> None:
1359
+ # ProactorEventloop sometimes sends bytearray instead of bytes
1360
+ self.read_queue.append(bytes(data))
1361
+ self.read_event.set()
1362
+
1363
+ def eof_received(self) -> bool | None:
1364
+ self.is_at_eof = True
1365
+ self.read_event.set()
1366
+ return True
1367
+
1368
+ def pause_writing(self) -> None:
1369
+ self.write_event = asyncio.Event()
1370
+
1371
+ def resume_writing(self) -> None:
1372
+ self.write_event.set()
1373
+
1374
+
1375
+ class DatagramProtocol(asyncio.DatagramProtocol):
1376
+ read_queue: deque[tuple[bytes, IPSockAddrType]]
1377
+ read_event: asyncio.Event
1378
+ write_event: asyncio.Event
1379
+ exception: Exception | None = None
1380
+
1381
+ def connection_made(self, transport: asyncio.BaseTransport) -> None:
1382
+ self.read_queue = deque(maxlen=100) # arbitrary value
1383
+ self.read_event = asyncio.Event()
1384
+ self.write_event = asyncio.Event()
1385
+ self.write_event.set()
1386
+ cast(asyncio.WriteTransport, transport).set_write_buffer_limits(0)
1387
+
1388
+ def connection_lost(self, exc: Exception | None) -> None:
1389
+ self.read_event.set()
1390
+ self.write_event.set()
1391
+
1392
+ def datagram_received(self, data: bytes, addr: IPSockAddrType) -> None:
1393
+ addr = convert_ipv6_sockaddr(addr)
1394
+ self.read_queue.append((data, addr))
1395
+ self.read_event.set()
1396
+
1397
+ def error_received(self, exc: Exception) -> None:
1398
+ self.exception = exc
1399
+
1400
+ def pause_writing(self) -> None:
1401
+ self.write_event.clear()
1402
+
1403
+ def resume_writing(self) -> None:
1404
+ self.write_event.set()
1405
+
1406
+
1407
+ class SocketStream(abc.SocketStream):
1408
+ def __init__(self, transport: asyncio.Transport, protocol: StreamProtocol):
1409
+ self._transport = transport
1410
+ self._protocol = protocol
1411
+ self._receive_guard = ResourceGuard("reading from")
1412
+ self._send_guard = ResourceGuard("writing to")
1413
+ self._closed = False
1414
+
1415
+ @property
1416
+ def _raw_socket(self) -> socket.socket:
1417
+ return self._transport.get_extra_info("socket")
1418
+
1419
+ async def receive(self, max_bytes: int = 65536) -> bytes:
1420
+ if max_bytes < 1:
1421
+ raise ValueError("max_bytes must be a positive integer")
1422
+
1423
+ with self._receive_guard:
1424
+ if (
1425
+ not self._protocol.read_event.is_set()
1426
+ and not self._transport.is_closing()
1427
+ and not self._protocol.is_at_eof
1428
+ ):
1429
+ self._transport.resume_reading()
1430
+ try:
1431
+ await self._protocol.read_event.wait()
1432
+ finally:
1433
+ self._transport.pause_reading()
1434
+ else:
1435
+ await AsyncIOBackend.checkpoint()
1436
+
1437
+ try:
1438
+ chunk = self._protocol.read_queue.popleft()
1439
+ except IndexError:
1440
+ if self._closed:
1441
+ raise ClosedResourceError from None
1442
+ elif self._protocol.exception:
1443
+ raise BrokenResourceError from self._protocol.exception
1444
+ else:
1445
+ raise EndOfStream from None
1446
+
1447
+ if len(chunk) > max_bytes:
1448
+ # Split the oversized chunk
1449
+ chunk, leftover = chunk[:max_bytes], chunk[max_bytes:]
1450
+ self._protocol.read_queue.appendleft(leftover)
1451
+
1452
+ # If the read queue is empty, clear the flag so that the next call will
1453
+ # block until data is available
1454
+ if not self._protocol.read_queue:
1455
+ self._protocol.read_event.clear()
1456
+
1457
+ return chunk
1458
+
1459
+ async def send(self, item: bytes) -> None:
1460
+ with self._send_guard:
1461
+ await AsyncIOBackend.checkpoint_if_cancelled()
1462
+ yielded = False
1463
+
1464
+ if not self._protocol.write_event.is_set():
1465
+ yielded = True
1466
+ await self._protocol.write_event.wait()
1467
+
1468
+ if self._closed:
1469
+ raise ClosedResourceError
1470
+ elif self._protocol.exception is not None:
1471
+ raise BrokenResourceError from self._protocol.exception
1472
+
1473
+ try:
1474
+ self._transport.write(item)
1475
+ except RuntimeError as exc:
1476
+ if self._transport.is_closing():
1477
+ raise BrokenResourceError from exc
1478
+ else:
1479
+ raise
1480
+
1481
+ if not self._protocol.write_event.is_set():
1482
+ await self._protocol.write_event.wait()
1483
+ if self._closed:
1484
+ # aclose() aborted the transport, discarding the unsent data
1485
+ raise ClosedResourceError
1486
+ elif self._protocol.exception is not None:
1487
+ raise BrokenResourceError from self._protocol.exception
1488
+ elif not yielded:
1489
+ await AsyncIOBackend.cancel_shielded_checkpoint()
1490
+
1491
+ async def send_eof(self) -> None:
1492
+ try:
1493
+ self._transport.write_eof()
1494
+ except OSError:
1495
+ pass
1496
+
1497
+ async def aclose(self) -> None:
1498
+ self._closed = True
1499
+ self._transport.abort()
1500
+ await AsyncIOBackend.checkpoint()
1501
+
1502
+
1503
+ class _RawSocketMixin:
1504
+ _receive_future: asyncio.Future | None = None
1505
+ _send_future: asyncio.Future | None = None
1506
+ _closing = False
1507
+
1508
+ def __init__(self, raw_socket: socket.socket):
1509
+ self.__raw_socket = raw_socket
1510
+ self._receive_guard = ResourceGuard("reading from")
1511
+ self._send_guard = ResourceGuard("writing to")
1512
+
1513
+ @property
1514
+ def _raw_socket(self) -> socket.socket:
1515
+ return self.__raw_socket
1516
+
1517
+ def _wait_until_readable(self, loop: asyncio.AbstractEventLoop) -> asyncio.Future:
1518
+ def callback(f: object) -> None:
1519
+ del self._receive_future
1520
+ loop.remove_reader(self.__raw_socket)
1521
+
1522
+ f = self._receive_future = asyncio.Future()
1523
+ loop.add_reader(self.__raw_socket, f.set_result, None)
1524
+ f.add_done_callback(callback)
1525
+ return f
1526
+
1527
+ def _wait_until_writable(self, loop: asyncio.AbstractEventLoop) -> asyncio.Future:
1528
+ def callback(f: object) -> None:
1529
+ del self._send_future
1530
+ loop.remove_writer(self.__raw_socket)
1531
+
1532
+ f = self._send_future = asyncio.Future()
1533
+ loop.add_writer(self.__raw_socket, f.set_result, None)
1534
+ f.add_done_callback(callback)
1535
+ return f
1536
+
1537
+ async def aclose(self) -> None:
1538
+ closing = self._closing
1539
+ self._closing = True
1540
+ self.__raw_socket.close()
1541
+ if not closing:
1542
+ if self._receive_future and not self._receive_future.done():
1543
+ self._receive_future.set_result(None)
1544
+ if self._send_future and not self._send_future.done():
1545
+ self._send_future.set_result(None)
1546
+
1547
+ await AsyncIOBackend.checkpoint()
1548
+
1549
+
1550
+ class UNIXSocketStream(_RawSocketMixin, abc.UNIXSocketStream):
1551
+ async def send_eof(self) -> None:
1552
+ with self._send_guard:
1553
+ self._raw_socket.shutdown(socket.SHUT_WR)
1554
+
1555
+ async def receive(self, max_bytes: int = 65536) -> bytes:
1556
+ if max_bytes < 1:
1557
+ raise ValueError("max_bytes must be a positive integer")
1558
+
1559
+ loop = get_running_loop()
1560
+ await AsyncIOBackend.checkpoint()
1561
+ with self._receive_guard:
1562
+ while True:
1563
+ try:
1564
+ data = self._raw_socket.recv(max_bytes)
1565
+ except BlockingIOError:
1566
+ await self._wait_until_readable(loop)
1567
+ except OSError as exc:
1568
+ if self._closing:
1569
+ raise ClosedResourceError from None
1570
+ else:
1571
+ raise BrokenResourceError from exc
1572
+ else:
1573
+ if not data:
1574
+ raise EndOfStream
1575
+
1576
+ return data
1577
+
1578
+ async def send(self, item: bytes) -> None:
1579
+ loop = get_running_loop()
1580
+ await AsyncIOBackend.checkpoint()
1581
+ with self._send_guard:
1582
+ view = memoryview(item)
1583
+ while view:
1584
+ try:
1585
+ bytes_sent = self._raw_socket.send(view)
1586
+ except BlockingIOError:
1587
+ await self._wait_until_writable(loop)
1588
+ except OSError as exc:
1589
+ if self._closing:
1590
+ raise ClosedResourceError from None
1591
+ else:
1592
+ raise BrokenResourceError from exc
1593
+ else:
1594
+ view = view[bytes_sent:]
1595
+
1596
+ async def receive_fds(self, msglen: int, maxfds: int) -> tuple[bytes, list[int]]:
1597
+ if not isinstance(msglen, int) or msglen < 0:
1598
+ raise ValueError("msglen must be a non-negative integer")
1599
+ if not isinstance(maxfds, int) or maxfds < 1:
1600
+ raise ValueError("maxfds must be a positive integer")
1601
+
1602
+ loop = get_running_loop()
1603
+ fds = array.array("i")
1604
+ await AsyncIOBackend.checkpoint()
1605
+ with self._receive_guard:
1606
+ while True:
1607
+ try:
1608
+ message, ancdata, _flags, _addr = self._raw_socket.recvmsg(
1609
+ msglen, socket.CMSG_LEN(maxfds * fds.itemsize)
1610
+ )
1611
+ except BlockingIOError:
1612
+ await self._wait_until_readable(loop)
1613
+ except OSError as exc:
1614
+ if self._closing:
1615
+ raise ClosedResourceError from None
1616
+ else:
1617
+ raise BrokenResourceError from exc
1618
+ else:
1619
+ if not message and not ancdata:
1620
+ raise EndOfStream
1621
+
1622
+ break
1623
+
1624
+ for cmsg_level, cmsg_type, cmsg_data in ancdata:
1625
+ if cmsg_level != socket.SOL_SOCKET or cmsg_type != socket.SCM_RIGHTS:
1626
+ raise RuntimeError(
1627
+ f"Received unexpected ancillary data; message = {message!r}, "
1628
+ f"cmsg_level = {cmsg_level}, cmsg_type = {cmsg_type}"
1629
+ )
1630
+
1631
+ fds.frombytes(cmsg_data[: len(cmsg_data) - (len(cmsg_data) % fds.itemsize)])
1632
+
1633
+ return message, list(fds)
1634
+
1635
+ async def send_fds(self, message: bytes, fds: Collection[int | IOBase]) -> None:
1636
+ if not message:
1637
+ raise ValueError("message must not be empty")
1638
+ if not fds:
1639
+ raise ValueError("fds must not be empty")
1640
+
1641
+ loop = get_running_loop()
1642
+ filenos: list[int] = []
1643
+ for fd in fds:
1644
+ if isinstance(fd, int):
1645
+ filenos.append(fd)
1646
+ elif isinstance(fd, IOBase):
1647
+ filenos.append(fd.fileno())
1648
+
1649
+ fdarray = array.array("i", filenos)
1650
+ ancdata = [(socket.SOL_SOCKET, socket.SCM_RIGHTS, fdarray)]
1651
+ view = memoryview(message)
1652
+ await AsyncIOBackend.checkpoint()
1653
+ with self._send_guard:
1654
+ while view:
1655
+ try:
1656
+ bytes_sent = self._raw_socket.sendmsg([view], ancdata)
1657
+ except BlockingIOError:
1658
+ await self._wait_until_writable(loop)
1659
+ except OSError as exc:
1660
+ if self._closing:
1661
+ raise ClosedResourceError from None
1662
+ else:
1663
+ raise BrokenResourceError from exc
1664
+ else:
1665
+ view = view[bytes_sent:]
1666
+ # The descriptors were sent with the first successful write.
1667
+ ancdata = []
1668
+
1669
+
1670
+ class TCPSocketListener(abc.SocketListener):
1671
+ _accept_scope: CancelScope | None = None
1672
+ _closed = False
1673
+
1674
+ def __init__(self, raw_socket: socket.socket):
1675
+ self.__raw_socket = raw_socket
1676
+ self._loop = cast(asyncio.BaseEventLoop, get_running_loop())
1677
+ self._accept_guard = ResourceGuard("accepting connections from")
1678
+
1679
+ @property
1680
+ def _raw_socket(self) -> socket.socket:
1681
+ return self.__raw_socket
1682
+
1683
+ async def accept(self) -> abc.SocketStream:
1684
+ if self._closed:
1685
+ raise ClosedResourceError
1686
+
1687
+ with self._accept_guard:
1688
+ await AsyncIOBackend.checkpoint()
1689
+ with CancelScope() as self._accept_scope:
1690
+ try:
1691
+ client_sock, _addr = await self._loop.sock_accept(self._raw_socket)
1692
+ except asyncio.CancelledError:
1693
+ # Workaround for https://bugs.python.org/issue41317
1694
+ try:
1695
+ self._loop.remove_reader(self._raw_socket)
1696
+ except (ValueError, NotImplementedError):
1697
+ pass
1698
+
1699
+ if self._closed:
1700
+ raise ClosedResourceError from None
1701
+
1702
+ raise
1703
+ finally:
1704
+ self._accept_scope = None
1705
+
1706
+ client_sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
1707
+ transport, protocol = await self._loop.connect_accepted_socket(
1708
+ StreamProtocol, client_sock
1709
+ )
1710
+ return SocketStream(transport, protocol)
1711
+
1712
+ async def aclose(self) -> None:
1713
+ self._closed = True
1714
+ if self._accept_scope:
1715
+ # Workaround for https://bugs.python.org/issue41317
1716
+ try:
1717
+ self._loop.remove_reader(self._raw_socket)
1718
+ except (ValueError, NotImplementedError):
1719
+ pass
1720
+
1721
+ self._accept_scope.cancel()
1722
+
1723
+ try:
1724
+ # Lets a cancelled accept() unwind before the socket is closed
1725
+ await AsyncIOBackend.checkpoint()
1726
+ finally:
1727
+ self._raw_socket.close()
1728
+
1729
+
1730
+ class UNIXSocketListener(abc.SocketListener):
1731
+ _accept_future: asyncio.Future | None = None
1732
+
1733
+ def __init__(self, raw_socket: socket.socket):
1734
+ self.__raw_socket = raw_socket
1735
+ self._loop = get_running_loop()
1736
+ self._accept_guard = ResourceGuard("accepting connections from")
1737
+ self._closed = False
1738
+
1739
+ async def accept(self) -> abc.SocketStream:
1740
+ await AsyncIOBackend.checkpoint()
1741
+ with self._accept_guard:
1742
+ while True:
1743
+ try:
1744
+ client_sock, _ = self.__raw_socket.accept()
1745
+ client_sock.setblocking(False)
1746
+ return UNIXSocketStream(client_sock)
1747
+ except BlockingIOError:
1748
+ f = self._accept_future = self._loop.create_future()
1749
+ self._loop.add_reader(self.__raw_socket, f.set_result, None)
1750
+ try:
1751
+ await f
1752
+ finally:
1753
+ if self._accept_future is f:
1754
+ self._accept_future = None
1755
+ self._loop.remove_reader(self.__raw_socket)
1756
+ except OSError as exc:
1757
+ if self._closed:
1758
+ raise ClosedResourceError from None
1759
+ else:
1760
+ raise BrokenResourceError from exc
1761
+
1762
+ async def aclose(self) -> None:
1763
+ self._closed = True
1764
+ if f := self._accept_future:
1765
+ # Deregister the reader before closing the socket so the selector isn't
1766
+ # left holding a closed fd, then wake accept() so it raises
1767
+ # ClosedResourceError
1768
+ self._accept_future = None
1769
+ self._loop.remove_reader(self.__raw_socket)
1770
+ if not f.done():
1771
+ f.set_result(None)
1772
+
1773
+ self.__raw_socket.close()
1774
+ await AsyncIOBackend.checkpoint()
1775
+
1776
+ @property
1777
+ def _raw_socket(self) -> socket.socket:
1778
+ return self.__raw_socket
1779
+
1780
+
1781
+ class UDPSocket(abc.UDPSocket):
1782
+ def __init__(
1783
+ self, transport: asyncio.DatagramTransport, protocol: DatagramProtocol
1784
+ ):
1785
+ self._transport = transport
1786
+ self._protocol = protocol
1787
+ self._receive_guard = ResourceGuard("reading from")
1788
+ self._send_guard = ResourceGuard("writing to")
1789
+ self._closed = False
1790
+
1791
+ @property
1792
+ def _raw_socket(self) -> socket.socket:
1793
+ return self._transport.get_extra_info("socket")
1794
+
1795
+ async def aclose(self) -> None:
1796
+ self._closed = True
1797
+ self._transport.abort()
1798
+ await AsyncIOBackend.checkpoint()
1799
+
1800
+ async def receive(self) -> tuple[bytes, IPSockAddrType]:
1801
+ with self._receive_guard:
1802
+ await AsyncIOBackend.checkpoint()
1803
+
1804
+ # If the buffer is empty, ask for more data
1805
+ if not self._protocol.read_queue and not self._transport.is_closing():
1806
+ self._protocol.read_event.clear()
1807
+ await self._protocol.read_event.wait()
1808
+
1809
+ try:
1810
+ return self._protocol.read_queue.popleft()
1811
+ except IndexError:
1812
+ if self._closed:
1813
+ raise ClosedResourceError from None
1814
+ else:
1815
+ raise BrokenResourceError from None
1816
+
1817
+ async def send(self, item: UDPPacketType) -> None:
1818
+ with self._send_guard:
1819
+ await AsyncIOBackend.checkpoint_if_cancelled()
1820
+ yielded = False
1821
+
1822
+ # Wait out any datagram the transport had to buffer
1823
+ if not self._protocol.write_event.is_set():
1824
+ yielded = True
1825
+ await self._protocol.write_event.wait()
1826
+
1827
+ if self._closed:
1828
+ raise ClosedResourceError
1829
+ elif self._transport.is_closing():
1830
+ raise BrokenResourceError
1831
+
1832
+ self._transport.sendto(*item)
1833
+
1834
+ # The high water mark is 0, so the event is clear if the OS refused it
1835
+ if not self._protocol.write_event.is_set():
1836
+ await self._protocol.write_event.wait()
1837
+ if self._closed:
1838
+ # aclose() aborted the transport, discarding the unsent data
1839
+ raise ClosedResourceError
1840
+ elif not yielded:
1841
+ await AsyncIOBackend.cancel_shielded_checkpoint()
1842
+
1843
+
1844
+ class ConnectedUDPSocket(abc.ConnectedUDPSocket):
1845
+ def __init__(
1846
+ self, transport: asyncio.DatagramTransport, protocol: DatagramProtocol
1847
+ ):
1848
+ self._transport = transport
1849
+ self._protocol = protocol
1850
+ self._receive_guard = ResourceGuard("reading from")
1851
+ self._send_guard = ResourceGuard("writing to")
1852
+ self._closed = False
1853
+
1854
+ @property
1855
+ def _raw_socket(self) -> socket.socket:
1856
+ return self._transport.get_extra_info("socket")
1857
+
1858
+ async def aclose(self) -> None:
1859
+ self._closed = True
1860
+ self._transport.abort()
1861
+ await AsyncIOBackend.checkpoint()
1862
+
1863
+ async def receive(self) -> bytes:
1864
+ with self._receive_guard:
1865
+ await AsyncIOBackend.checkpoint()
1866
+
1867
+ # If the buffer is empty, ask for more data
1868
+ if not self._protocol.read_queue and not self._transport.is_closing():
1869
+ self._protocol.read_event.clear()
1870
+ await self._protocol.read_event.wait()
1871
+
1872
+ try:
1873
+ packet = self._protocol.read_queue.popleft()
1874
+ except IndexError:
1875
+ if self._closed:
1876
+ raise ClosedResourceError from None
1877
+ else:
1878
+ raise BrokenResourceError from None
1879
+
1880
+ return packet[0]
1881
+
1882
+ async def send(self, item: bytes) -> None:
1883
+ with self._send_guard:
1884
+ await AsyncIOBackend.checkpoint_if_cancelled()
1885
+ yielded = False
1886
+
1887
+ # Wait out any datagram the transport had to buffer
1888
+ if not self._protocol.write_event.is_set():
1889
+ yielded = True
1890
+ await self._protocol.write_event.wait()
1891
+
1892
+ if self._closed:
1893
+ raise ClosedResourceError
1894
+ elif self._transport.is_closing():
1895
+ raise BrokenResourceError
1896
+
1897
+ self._transport.sendto(item)
1898
+
1899
+ # The high water mark is 0, so the event is clear if the OS refused it
1900
+ if not self._protocol.write_event.is_set():
1901
+ await self._protocol.write_event.wait()
1902
+ if self._closed:
1903
+ # aclose() aborted the transport, discarding the unsent data
1904
+ raise ClosedResourceError
1905
+ elif not yielded:
1906
+ await AsyncIOBackend.cancel_shielded_checkpoint()
1907
+
1908
+
1909
+ class UNIXDatagramSocket(_RawSocketMixin, abc.UNIXDatagramSocket):
1910
+ async def receive(self) -> UNIXDatagramPacketType:
1911
+ loop = get_running_loop()
1912
+ await AsyncIOBackend.checkpoint()
1913
+ with self._receive_guard:
1914
+ while True:
1915
+ try:
1916
+ data = self._raw_socket.recvfrom(65536)
1917
+ except BlockingIOError:
1918
+ await self._wait_until_readable(loop)
1919
+ except OSError as exc:
1920
+ if self._closing:
1921
+ raise ClosedResourceError from None
1922
+ else:
1923
+ raise BrokenResourceError from exc
1924
+ else:
1925
+ return data
1926
+
1927
+ async def send(self, item: UNIXDatagramPacketType) -> None:
1928
+ loop = get_running_loop()
1929
+ await AsyncIOBackend.checkpoint()
1930
+ with self._send_guard:
1931
+ while True:
1932
+ try:
1933
+ self._raw_socket.sendto(*item)
1934
+ except BlockingIOError:
1935
+ await self._wait_until_writable(loop)
1936
+ except OSError as exc:
1937
+ if self._closing:
1938
+ raise ClosedResourceError from None
1939
+ else:
1940
+ raise BrokenResourceError from exc
1941
+ else:
1942
+ return
1943
+
1944
+
1945
+ class ConnectedUNIXDatagramSocket(_RawSocketMixin, abc.ConnectedUNIXDatagramSocket):
1946
+ async def receive(self) -> bytes:
1947
+ loop = get_running_loop()
1948
+ await AsyncIOBackend.checkpoint()
1949
+ with self._receive_guard:
1950
+ while True:
1951
+ try:
1952
+ data = self._raw_socket.recv(65536)
1953
+ except BlockingIOError:
1954
+ await self._wait_until_readable(loop)
1955
+ except OSError as exc:
1956
+ if self._closing:
1957
+ raise ClosedResourceError from None
1958
+ else:
1959
+ raise BrokenResourceError from exc
1960
+ else:
1961
+ return data
1962
+
1963
+ async def send(self, item: bytes) -> None:
1964
+ loop = get_running_loop()
1965
+ await AsyncIOBackend.checkpoint()
1966
+ with self._send_guard:
1967
+ while True:
1968
+ try:
1969
+ self._raw_socket.send(item)
1970
+ except BlockingIOError:
1971
+ await self._wait_until_writable(loop)
1972
+ except OSError as exc:
1973
+ if self._closing:
1974
+ raise ClosedResourceError from None
1975
+ else:
1976
+ raise BrokenResourceError from exc
1977
+ else:
1978
+ return
1979
+
1980
+
1981
+ _read_events: RunVar[dict[int, asyncio.Future[bool]]] = RunVar("read_events")
1982
+ _write_events: RunVar[dict[int, asyncio.Future[bool]]] = RunVar("write_events")
1983
+
1984
+
1985
+ #
1986
+ # Synchronization
1987
+ #
1988
+
1989
+
1990
+ class Event(BaseEvent):
1991
+ __slots__ = ("_event",)
1992
+
1993
+ def __new__(cls) -> Self:
1994
+ return object.__new__(cls)
1995
+
1996
+ def __init__(self) -> None:
1997
+ self._event = asyncio.Event()
1998
+
1999
+ def set(self) -> None:
2000
+ self._event.set()
2001
+
2002
+ def is_set(self) -> bool:
2003
+ return self._event.is_set()
2004
+
2005
+ async def wait(self) -> None:
2006
+ if self.is_set():
2007
+ await AsyncIOBackend.checkpoint()
2008
+ else:
2009
+ await self._event.wait()
2010
+
2011
+ def statistics(self) -> EventStatistics:
2012
+ return EventStatistics(len(self._event._waiters))
2013
+
2014
+
2015
+ class Lock(BaseLock):
2016
+ __slots__ = "_fast_acquire", "_owner_task", "_waiters"
2017
+
2018
+ def __new__(cls, *, fast_acquire: bool = False) -> Self:
2019
+ return object.__new__(cls)
2020
+
2021
+ def __init__(self, *, fast_acquire: bool = False) -> None:
2022
+ self._fast_acquire = fast_acquire
2023
+ self._owner_task: asyncio.Task | None = None
2024
+ self._waiters: deque[tuple[asyncio.Task, asyncio.Future]] = deque()
2025
+
2026
+ async def acquire(self) -> None:
2027
+ task = cast(asyncio.Task, current_task())
2028
+ if self._owner_task is None and not self._waiters:
2029
+ await AsyncIOBackend.checkpoint_if_cancelled()
2030
+ self._owner_task = task
2031
+
2032
+ # Unless on the "fast path", yield control of the event loop so that other
2033
+ # tasks can run too
2034
+ if not self._fast_acquire:
2035
+ try:
2036
+ await AsyncIOBackend.cancel_shielded_checkpoint()
2037
+ except CancelledError:
2038
+ self.release()
2039
+ raise
2040
+
2041
+ return
2042
+
2043
+ if self._owner_task == task:
2044
+ raise RuntimeError("Attempted to acquire an already held Lock")
2045
+
2046
+ fut: asyncio.Future[None] = asyncio.Future()
2047
+ item = task, fut
2048
+ self._waiters.append(item)
2049
+ try:
2050
+ await fut
2051
+ except CancelledError:
2052
+ if fut.cancelled():
2053
+ try:
2054
+ self._waiters.remove(item)
2055
+ except ValueError:
2056
+ pass
2057
+ else:
2058
+ self.release()
2059
+
2060
+ raise
2061
+
2062
+ def acquire_nowait(self) -> None:
2063
+ task = cast(asyncio.Task, current_task())
2064
+ if self._owner_task is None and not self._waiters:
2065
+ self._owner_task = task
2066
+ return
2067
+
2068
+ if self._owner_task is task:
2069
+ raise RuntimeError("Attempted to acquire an already held Lock")
2070
+
2071
+ raise WouldBlock
2072
+
2073
+ def locked(self) -> bool:
2074
+ return self._owner_task is not None
2075
+
2076
+ def release(self) -> None:
2077
+ if self._owner_task != current_task():
2078
+ raise RuntimeError("The current task is not holding this lock")
2079
+
2080
+ # A cancelled waiter that already received ownership removes itself from
2081
+ # _waiters before calling release(); any cancelled waiter still queued here
2082
+ # was cancelled before being woken, so drop it.
2083
+ while self._waiters:
2084
+ task, fut = self._waiters.popleft()
2085
+ if fut.cancelled():
2086
+ continue
2087
+
2088
+ self._owner_task = task
2089
+ fut.set_result(None)
2090
+ return
2091
+
2092
+ self._owner_task = None
2093
+
2094
+ def statistics(self) -> LockStatistics:
2095
+ task_info = AsyncIOTaskInfo(self._owner_task) if self._owner_task else None
2096
+ return LockStatistics(self.locked(), task_info, len(self._waiters))
2097
+
2098
+
2099
+ class Semaphore(BaseSemaphore):
2100
+ __slots__ = "_fast_acquire", "_max_value", "_value", "_waiters"
2101
+
2102
+ def __new__(
2103
+ cls,
2104
+ initial_value: int,
2105
+ *,
2106
+ max_value: int | None = None,
2107
+ fast_acquire: bool = False,
2108
+ ) -> Self:
2109
+ return object.__new__(cls)
2110
+
2111
+ def __init__(
2112
+ self,
2113
+ initial_value: int,
2114
+ *,
2115
+ max_value: int | None = None,
2116
+ fast_acquire: bool = False,
2117
+ ):
2118
+ super().__init__(initial_value, max_value=max_value)
2119
+ self._value = initial_value
2120
+ self._max_value = max_value
2121
+ self._fast_acquire = fast_acquire
2122
+ self._waiters: deque[asyncio.Future[None]] = deque()
2123
+
2124
+ async def acquire(self) -> None:
2125
+ if self._value > 0 and not self._waiters:
2126
+ await AsyncIOBackend.checkpoint_if_cancelled()
2127
+ self._value -= 1
2128
+
2129
+ # Unless on the "fast path", yield control of the event loop so that other
2130
+ # tasks can run too
2131
+ if not self._fast_acquire:
2132
+ try:
2133
+ await AsyncIOBackend.cancel_shielded_checkpoint()
2134
+ except CancelledError:
2135
+ self.release()
2136
+ raise
2137
+
2138
+ return
2139
+
2140
+ fut: asyncio.Future[None] = asyncio.Future()
2141
+ self._waiters.append(fut)
2142
+ try:
2143
+ await fut
2144
+ except CancelledError:
2145
+ if fut.cancelled():
2146
+ try:
2147
+ self._waiters.remove(fut)
2148
+ except ValueError:
2149
+ pass
2150
+ else:
2151
+ self.release()
2152
+
2153
+ raise
2154
+
2155
+ def acquire_nowait(self) -> None:
2156
+ if self._value == 0:
2157
+ raise WouldBlock
2158
+
2159
+ self._value -= 1
2160
+
2161
+ def release(self) -> None:
2162
+ if self._max_value is not None and self._value == self._max_value:
2163
+ raise ValueError("semaphore released too many times")
2164
+
2165
+ while self._waiters:
2166
+ fut = self._waiters.popleft()
2167
+ if fut.cancelled():
2168
+ continue
2169
+
2170
+ fut.set_result(None)
2171
+ return
2172
+
2173
+ self._value += 1
2174
+
2175
+ @property
2176
+ def value(self) -> int:
2177
+ return self._value
2178
+
2179
+ @property
2180
+ def max_value(self) -> int | None:
2181
+ return self._max_value
2182
+
2183
+ def statistics(self) -> SemaphoreStatistics:
2184
+ return SemaphoreStatistics(len(self._waiters))
2185
+
2186
+
2187
+ class CapacityLimiter(BaseCapacityLimiter):
2188
+ __slots__ = "_borrowers", "_total_tokens", "_wait_queue"
2189
+
2190
+ def __new__(cls, total_tokens: float) -> Self:
2191
+ return object.__new__(cls)
2192
+
2193
+ def __init__(self, total_tokens: float):
2194
+ self._total_tokens: float = 0
2195
+ self._borrowers: set[Any] = set()
2196
+ self._wait_queue: OrderedDict[Any, asyncio.Event] = OrderedDict()
2197
+ self.total_tokens = total_tokens
2198
+
2199
+ async def __aenter__(self) -> None:
2200
+ await self.acquire()
2201
+
2202
+ async def __aexit__(
2203
+ self,
2204
+ exc_type: type[BaseException] | None,
2205
+ exc_val: BaseException | None,
2206
+ exc_tb: TracebackType | None,
2207
+ ) -> None:
2208
+ self.release()
2209
+
2210
+ @property
2211
+ def total_tokens(self) -> float:
2212
+ return self._total_tokens
2213
+
2214
+ @total_tokens.setter
2215
+ def total_tokens(self, value: float) -> None:
2216
+ if not isinstance(value, int) and not math.isinf(value):
2217
+ raise TypeError("total_tokens must be an int or math.inf")
2218
+
2219
+ if value < 0:
2220
+ raise ValueError("total_tokens must be >= 0")
2221
+
2222
+ self._total_tokens = value
2223
+
2224
+ # Notify waiting tasks that they have acquired the limiter while
2225
+ # there is spare capacity.
2226
+ while self._wait_queue and len(self._borrowers) < self._total_tokens:
2227
+ borrower, event = self._wait_queue.popitem(last=False)
2228
+ self._borrowers.add(borrower)
2229
+ event.set()
2230
+
2231
+ @property
2232
+ def borrowed_tokens(self) -> int:
2233
+ return len(self._borrowers)
2234
+
2235
+ @property
2236
+ def available_tokens(self) -> float:
2237
+ return self._total_tokens - len(self._borrowers)
2238
+
2239
+ def _notify_next_waiter(self) -> None:
2240
+ """Hand a free token to the next task in line, if any."""
2241
+ if self._wait_queue and len(self._borrowers) < self._total_tokens:
2242
+ borrower, event = self._wait_queue.popitem(last=False)
2243
+ self._borrowers.add(borrower)
2244
+ event.set()
2245
+
2246
+ def acquire_nowait(self) -> None:
2247
+ self.acquire_on_behalf_of_nowait(current_task())
2248
+
2249
+ def acquire_on_behalf_of_nowait(self, borrower: object) -> None:
2250
+ if borrower in self._borrowers:
2251
+ raise RuntimeError(
2252
+ "this borrower is already holding one of this CapacityLimiter's tokens"
2253
+ )
2254
+
2255
+ if self._wait_queue or len(self._borrowers) >= self._total_tokens:
2256
+ raise WouldBlock
2257
+
2258
+ self._borrowers.add(borrower)
2259
+
2260
+ async def acquire(self) -> None:
2261
+ return await self.acquire_on_behalf_of(current_task())
2262
+
2263
+ async def acquire_on_behalf_of(self, borrower: object) -> None:
2264
+ await AsyncIOBackend.checkpoint_if_cancelled()
2265
+ try:
2266
+ self.acquire_on_behalf_of_nowait(borrower)
2267
+ except WouldBlock:
2268
+ event = asyncio.Event()
2269
+ self._wait_queue[borrower] = event
2270
+ try:
2271
+ await event.wait()
2272
+ except BaseException:
2273
+ self._wait_queue.pop(borrower, None)
2274
+ if event.is_set():
2275
+ self._borrowers.discard(borrower)
2276
+ self._notify_next_waiter()
2277
+
2278
+ raise
2279
+ else:
2280
+ try:
2281
+ await AsyncIOBackend.cancel_shielded_checkpoint()
2282
+ except BaseException:
2283
+ self.release_on_behalf_of(borrower)
2284
+ raise
2285
+
2286
+ def release(self) -> None:
2287
+ self.release_on_behalf_of(current_task())
2288
+
2289
+ def release_on_behalf_of(self, borrower: object) -> None:
2290
+ try:
2291
+ self._borrowers.remove(borrower)
2292
+ except KeyError:
2293
+ raise RuntimeError(
2294
+ "this borrower isn't holding any of this CapacityLimiter's tokens"
2295
+ ) from None
2296
+
2297
+ self._notify_next_waiter()
2298
+
2299
+ def statistics(self) -> CapacityLimiterStatistics:
2300
+ return CapacityLimiterStatistics(
2301
+ self.borrowed_tokens,
2302
+ self.total_tokens,
2303
+ tuple(self._borrowers),
2304
+ len(self._wait_queue),
2305
+ )
2306
+
2307
+
2308
+ _default_thread_limiter: RunVar[CapacityLimiter] = RunVar("_default_thread_limiter")
2309
+
2310
+
2311
+ #
2312
+ # Operating system signals
2313
+ #
2314
+
2315
+
2316
+ class _SignalReceiver:
2317
+ def __init__(self, signals: tuple[Signals, ...]):
2318
+ self._signals = signals
2319
+ self._loop = get_running_loop()
2320
+ self._signal_queue: deque[Signals] = deque()
2321
+ self._future: asyncio.Future = asyncio.Future()
2322
+ self._handled_signals: set[Signals] = set()
2323
+
2324
+ def _deliver(self, signum: Signals) -> None:
2325
+ self._signal_queue.append(signum)
2326
+ if not self._future.done():
2327
+ self._future.set_result(None)
2328
+
2329
+ def __enter__(self) -> Self:
2330
+ for sig in set(self._signals):
2331
+ self._loop.add_signal_handler(sig, self._deliver, sig)
2332
+ self._handled_signals.add(sig)
2333
+
2334
+ return self
2335
+
2336
+ def __exit__(
2337
+ self,
2338
+ exc_type: type[BaseException] | None,
2339
+ exc_val: BaseException | None,
2340
+ exc_tb: TracebackType | None,
2341
+ ) -> None:
2342
+ for sig in self._handled_signals:
2343
+ self._loop.remove_signal_handler(sig)
2344
+
2345
+ def __aiter__(self) -> _SignalReceiver:
2346
+ return self
2347
+
2348
+ async def __anext__(self) -> Signals:
2349
+ await AsyncIOBackend.checkpoint()
2350
+ if not self._signal_queue:
2351
+ self._future = asyncio.Future()
2352
+ await self._future
2353
+
2354
+ return self._signal_queue.popleft()
2355
+
2356
+
2357
+ #
2358
+ # Testing and debugging
2359
+ #
2360
+
2361
+
2362
+ class AsyncIOTaskInfo(TaskInfo):
2363
+ def __init__(self, task: asyncio.Task):
2364
+ task_state = _task_states.get(task)
2365
+ if task_state is None:
2366
+ parent_id = None
2367
+ else:
2368
+ parent_id = task_state.parent_id
2369
+
2370
+ coro = task.get_coro()
2371
+ assert coro is not None, "created TaskInfo from a completed Task"
2372
+ super().__init__(id(task), parent_id, task.get_name(), coro)
2373
+ self._task = weakref.ref(task)
2374
+
2375
+ def has_pending_cancellation(self) -> bool:
2376
+ if not (task := self._task()):
2377
+ # If the task isn't around anymore, it won't have a pending cancellation
2378
+ return False
2379
+
2380
+ if task._must_cancel or ( # type: ignore[attr-defined]
2381
+ isinstance(task._fut_waiter, asyncio.Future) # type: ignore[attr-defined]
2382
+ and task._fut_waiter.cancelled() # type: ignore[attr-defined]
2383
+ ):
2384
+ return True
2385
+
2386
+ if task_state := _task_states.get(task):
2387
+ if cancel_scope := task_state.cancel_scope:
2388
+ return cancel_scope._effectively_cancelled
2389
+
2390
+ return False
2391
+
2392
+
2393
+ class TestRunner(abc.TestRunner):
2394
+ _send_stream: MemoryObjectSendStream[tuple[Awaitable[Any], asyncio.Future[Any]]]
2395
+
2396
+ def __init__(
2397
+ self,
2398
+ *,
2399
+ debug: bool | None = None,
2400
+ use_uvloop: bool = False,
2401
+ loop_factory: Callable[[], AbstractEventLoop] | None = None,
2402
+ ) -> None:
2403
+ if use_uvloop and loop_factory is None:
2404
+ if sys.platform != "win32":
2405
+ import uvloop
2406
+
2407
+ loop_factory = uvloop.new_event_loop
2408
+ else:
2409
+ import winloop
2410
+
2411
+ loop_factory = winloop.new_event_loop
2412
+
2413
+ self._runner = Runner(debug=debug, loop_factory=loop_factory)
2414
+ self._exceptions: list[BaseException] = []
2415
+ self._runner_task: asyncio.Task | None = None
2416
+
2417
+ def __enter__(self) -> Self:
2418
+ self._runner.__enter__()
2419
+ self.get_loop().set_exception_handler(self._exception_handler)
2420
+ return self
2421
+
2422
+ def __exit__(
2423
+ self,
2424
+ exc_type: type[BaseException] | None,
2425
+ exc_val: BaseException | None,
2426
+ exc_tb: TracebackType | None,
2427
+ ) -> None:
2428
+ self._runner.__exit__(exc_type, exc_val, exc_tb)
2429
+
2430
+ def get_loop(self) -> AbstractEventLoop:
2431
+ return self._runner.get_loop()
2432
+
2433
+ def is_running(self) -> bool:
2434
+ try:
2435
+ asyncio.get_running_loop()
2436
+ return True
2437
+ except RuntimeError:
2438
+ return False
2439
+
2440
+ def _exception_handler(
2441
+ self, loop: asyncio.AbstractEventLoop, context: dict[str, Any]
2442
+ ) -> None:
2443
+ if isinstance(context.get("exception"), Exception):
2444
+ self._exceptions.append(context["exception"])
2445
+ else:
2446
+ loop.default_exception_handler(context)
2447
+
2448
+ def _raise_async_exceptions(self) -> None:
2449
+ # Re-raise any exceptions raised in asynchronous callbacks
2450
+ if self._exceptions:
2451
+ exceptions, self._exceptions = self._exceptions, []
2452
+ if len(exceptions) == 1:
2453
+ raise exceptions[0]
2454
+ elif exceptions:
2455
+ raise BaseExceptionGroup(
2456
+ "Multiple exceptions occurred in asynchronous callbacks", exceptions
2457
+ )
2458
+
2459
+ async def _run_tests_and_fixtures(
2460
+ self,
2461
+ receive_stream: MemoryObjectReceiveStream[
2462
+ tuple[Awaitable[T_Retval], asyncio.Future[T_Retval]]
2463
+ ],
2464
+ ) -> None:
2465
+ from _pytest.outcomes import OutcomeException
2466
+
2467
+ with receive_stream, self._send_stream:
2468
+ async for coro, future in receive_stream:
2469
+ try:
2470
+ retval = await coro
2471
+ except CancelledError as exc:
2472
+ if not future.cancelled():
2473
+ future.cancel(*exc.args)
2474
+
2475
+ raise
2476
+ except BaseException as exc:
2477
+ if not future.cancelled():
2478
+ future.set_exception(exc)
2479
+
2480
+ if not isinstance(exc, (Exception, OutcomeException)):
2481
+ raise
2482
+ else:
2483
+ if not future.cancelled():
2484
+ future.set_result(retval)
2485
+
2486
+ async def _call_in_runner_task(
2487
+ self,
2488
+ func: Callable[P, Awaitable[T_Retval]],
2489
+ /,
2490
+ *args: P.args,
2491
+ **kwargs: P.kwargs,
2492
+ ) -> T_Retval:
2493
+ if not self._runner_task:
2494
+ self._send_stream, receive_stream = create_memory_object_stream[
2495
+ tuple[Awaitable[Any], asyncio.Future]
2496
+ ](1)
2497
+ self._runner_task = self.get_loop().create_task(
2498
+ self._run_tests_and_fixtures(receive_stream)
2499
+ )
2500
+
2501
+ coro = func(*args, **kwargs)
2502
+ future: asyncio.Future[T_Retval] = self.get_loop().create_future()
2503
+ self._send_stream.send_nowait((coro, future))
2504
+ return await future
2505
+
2506
+ def run_asyncgen_fixture(
2507
+ self,
2508
+ fixture_func: Callable[..., AsyncGenerator[T_Retval, Any]],
2509
+ kwargs: dict[str, Any],
2510
+ ) -> Iterable[T_Retval]:
2511
+ asyncgen = fixture_func(**kwargs)
2512
+ fixturevalue: T_Retval = self.get_loop().run_until_complete(
2513
+ self._call_in_runner_task(asyncgen.asend, None)
2514
+ )
2515
+ self._raise_async_exceptions()
2516
+
2517
+ yield fixturevalue
2518
+
2519
+ try:
2520
+ self.get_loop().run_until_complete(
2521
+ self._call_in_runner_task(asyncgen.asend, None)
2522
+ )
2523
+ except StopAsyncIteration:
2524
+ self._raise_async_exceptions()
2525
+ else:
2526
+ self.get_loop().run_until_complete(asyncgen.aclose())
2527
+ raise RuntimeError("Async generator fixture did not stop")
2528
+
2529
+ def run_fixture(
2530
+ self,
2531
+ fixture_func: Callable[..., Coroutine[Any, Any, T_Retval]],
2532
+ kwargs: dict[str, Any],
2533
+ ) -> T_Retval:
2534
+ retval = self.get_loop().run_until_complete(
2535
+ self._call_in_runner_task(fixture_func, **kwargs)
2536
+ )
2537
+ self._raise_async_exceptions()
2538
+ return retval
2539
+
2540
+ def run_test(
2541
+ self, test_func: Callable[..., Coroutine[Any, Any, Any]], kwargs: dict[str, Any]
2542
+ ) -> None:
2543
+ from _pytest.outcomes import OutcomeException
2544
+
2545
+ try:
2546
+ self.get_loop().run_until_complete(
2547
+ self._call_in_runner_task(test_func, **kwargs)
2548
+ )
2549
+ except Exception as exc:
2550
+ self._exceptions.append(exc)
2551
+ except OutcomeException:
2552
+ raise
2553
+ except BaseException:
2554
+ # A BaseException (e.g. KeyboardInterrupt, SystemExit) interrupted the event loop before
2555
+ # the test completed. Cancel _runner_task so it does not resume when the event
2556
+ # loop is re-entered during async generator fixture teardown.
2557
+ if self._runner_task is not None and not self._runner_task.done():
2558
+ self._runner_task.cancel()
2559
+ self._send_stream.close()
2560
+ try:
2561
+ self.get_loop().run_until_complete(self._runner_task)
2562
+ except CancelledError:
2563
+ pass
2564
+ finally:
2565
+ self._runner_task = None
2566
+ raise
2567
+ self._raise_async_exceptions()
2568
+
2569
+
2570
+ class _ProcessStreamProtocol(asyncio.subprocess.SubprocessStreamProtocol):
2571
+ """
2572
+ A subprocess protocol that allows us to be notified of ``process_exited``
2573
+
2574
+ asyncio's own ``Process.wait()`` only resolves once every pipe transport has
2575
+ disconnected so to get same semantics as on trio and uvloop we need this.
2576
+ """
2577
+
2578
+ def __init__(self) -> None:
2579
+ # Match the standard factory for asyncio.create_process
2580
+ super().__init__(limit=2**16, loop=asyncio.get_running_loop())
2581
+ self.exited = asyncio.Event()
2582
+
2583
+ def process_exited(self) -> None:
2584
+ super().process_exited()
2585
+ self.exited.set()
2586
+
2587
+
2588
+ class AsyncIOBackend(AsyncBackend):
2589
+ @classmethod
2590
+ def run(
2591
+ cls,
2592
+ func: Callable[[Unpack[PosArgsT]], Awaitable[T_Retval]],
2593
+ args: tuple[Unpack[PosArgsT]],
2594
+ kwargs: dict[str, Any],
2595
+ options: dict[str, Any],
2596
+ ) -> T_Retval:
2597
+ @wraps(func)
2598
+ async def wrapper() -> T_Retval:
2599
+ task = cast(asyncio.Task, current_task())
2600
+ task.set_name(get_callable_name(func))
2601
+ _task_states[task] = TaskState(None, None)
2602
+
2603
+ try:
2604
+ return await func(*args)
2605
+ finally:
2606
+ del _task_states[task]
2607
+
2608
+ debug = options.get("debug", None)
2609
+ loop_factory = options.get("loop_factory", None)
2610
+ if loop_factory is None and options.get("use_uvloop", False):
2611
+ if sys.platform != "win32":
2612
+ import uvloop
2613
+
2614
+ loop_factory = uvloop.new_event_loop
2615
+ else:
2616
+ import winloop
2617
+
2618
+ loop_factory = winloop.new_event_loop
2619
+
2620
+ with Runner(debug=debug, loop_factory=loop_factory) as runner:
2621
+ return runner.run(wrapper())
2622
+
2623
+ @classmethod
2624
+ def current_token(cls) -> object:
2625
+ return get_running_loop()
2626
+
2627
+ @classmethod
2628
+ def current_time(cls) -> float:
2629
+ return get_running_loop().time()
2630
+
2631
+ @classmethod
2632
+ def cancelled_exception_class(cls) -> type[BaseException]:
2633
+ return CancelledError
2634
+
2635
+ @classmethod
2636
+ async def checkpoint(cls) -> None:
2637
+ await sleep(0)
2638
+
2639
+ @classmethod
2640
+ async def checkpoint_if_cancelled(cls) -> None:
2641
+ task = current_task()
2642
+ if task is None:
2643
+ return
2644
+
2645
+ try:
2646
+ cancel_scope = _task_states[task].cancel_scope
2647
+ except KeyError:
2648
+ return
2649
+
2650
+ while cancel_scope:
2651
+ if cancel_scope.cancel_called:
2652
+ await sleep(0)
2653
+ elif cancel_scope.shield:
2654
+ break
2655
+ else:
2656
+ cancel_scope = cancel_scope._parent_scope
2657
+
2658
+ @classmethod
2659
+ async def cancel_shielded_checkpoint(cls) -> None:
2660
+ with CancelScope(shield=True):
2661
+ await sleep(0)
2662
+
2663
+ @classmethod
2664
+ async def sleep(cls, delay: float) -> None:
2665
+ await sleep(delay)
2666
+
2667
+ @classmethod
2668
+ def create_cancel_scope(
2669
+ cls, *, deadline: float = math.inf, shield: bool = False
2670
+ ) -> CancelScope:
2671
+ return CancelScope(deadline=deadline, shield=shield)
2672
+
2673
+ @classmethod
2674
+ def current_effective_deadline(cls) -> float:
2675
+ if (task := current_task()) is None:
2676
+ return math.inf
2677
+
2678
+ try:
2679
+ cancel_scope = _task_states[task].cancel_scope
2680
+ except KeyError:
2681
+ return math.inf
2682
+
2683
+ deadline = math.inf
2684
+ while cancel_scope:
2685
+ deadline = min(deadline, cancel_scope.deadline)
2686
+ if cancel_scope._cancel_called:
2687
+ deadline = -math.inf
2688
+ break
2689
+ elif cancel_scope.shield:
2690
+ break
2691
+ else:
2692
+ cancel_scope = cancel_scope._parent_scope
2693
+
2694
+ return deadline
2695
+
2696
+ @classmethod
2697
+ def create_task_group(cls) -> abc.TaskGroup:
2698
+ return TaskGroup()
2699
+
2700
+ @classmethod
2701
+ def create_event(cls) -> BaseEvent:
2702
+ return Event()
2703
+
2704
+ @classmethod
2705
+ def create_lock(cls, *, fast_acquire: bool) -> BaseLock:
2706
+ return Lock(fast_acquire=fast_acquire)
2707
+
2708
+ @classmethod
2709
+ def create_semaphore(
2710
+ cls,
2711
+ initial_value: int,
2712
+ *,
2713
+ max_value: int | None = None,
2714
+ fast_acquire: bool = False,
2715
+ ) -> BaseSemaphore:
2716
+ return Semaphore(initial_value, max_value=max_value, fast_acquire=fast_acquire)
2717
+
2718
+ @classmethod
2719
+ def create_capacity_limiter(cls, total_tokens: float) -> BaseCapacityLimiter:
2720
+ return CapacityLimiter(total_tokens)
2721
+
2722
+ @classmethod
2723
+ async def run_sync_in_worker_thread( # type: ignore[return]
2724
+ cls,
2725
+ func: Callable[[Unpack[PosArgsT]], T_Retval],
2726
+ args: tuple[Unpack[PosArgsT]],
2727
+ abandon_on_cancel: bool = False,
2728
+ limiter: BaseCapacityLimiter | None = None,
2729
+ ) -> T_Retval:
2730
+ await cls.checkpoint()
2731
+
2732
+ # If this is the first run in this event loop thread, set up the necessary
2733
+ # variables
2734
+ try:
2735
+ idle_workers = _threadpool_idle_workers.get()
2736
+ workers = _threadpool_workers.get()
2737
+ except LookupError:
2738
+ idle_workers = deque()
2739
+ workers = set()
2740
+ _threadpool_idle_workers.set(idle_workers)
2741
+ _threadpool_workers.set(workers)
2742
+
2743
+ async with limiter or cls.current_default_thread_limiter():
2744
+ with CancelScope(shield=not abandon_on_cancel) as scope:
2745
+ future = asyncio.Future[T_Retval]()
2746
+ root_task = find_root_task()
2747
+ if not idle_workers:
2748
+ worker = WorkerThread(root_task, workers, idle_workers)
2749
+ worker.start()
2750
+ workers.add(worker)
2751
+ root_task.add_done_callback(worker.stop, context=Context())
2752
+ else:
2753
+ worker = idle_workers.pop()
2754
+
2755
+ # Prune any other workers that have been idle for MAX_IDLE_TIME
2756
+ # seconds or longer
2757
+ now = cls.current_time()
2758
+ while idle_workers:
2759
+ if (
2760
+ now - idle_workers[0].idle_since
2761
+ < WorkerThread.MAX_IDLE_TIME
2762
+ ):
2763
+ break
2764
+
2765
+ expired_worker = idle_workers.popleft()
2766
+ expired_worker.root_task.remove_done_callback(
2767
+ expired_worker.stop
2768
+ )
2769
+ expired_worker.stop()
2770
+
2771
+ context = copy_context()
2772
+ context.run(set_current_async_library, None)
2773
+ if abandon_on_cancel or scope._parent_scope is None:
2774
+ worker_scope = scope
2775
+ else:
2776
+ worker_scope = scope._parent_scope
2777
+
2778
+ worker.queue.put_nowait((context, func, args, future, worker_scope))
2779
+ return await future
2780
+
2781
+ @classmethod
2782
+ def check_cancelled(cls) -> None:
2783
+ scope: CancelScope | None = threadlocals.current_cancel_scope
2784
+ while scope is not None:
2785
+ if scope.cancel_called:
2786
+ raise CancelledError(f"Cancelled via cancel scope {id(scope):x}")
2787
+
2788
+ if scope.shield:
2789
+ return
2790
+
2791
+ scope = scope._parent_scope
2792
+
2793
+ @classmethod
2794
+ def run_async_from_thread(
2795
+ cls,
2796
+ func: Callable[[Unpack[PosArgsT]], Coroutine[Any, Any, T_co]],
2797
+ args: tuple[Unpack[PosArgsT]],
2798
+ token: object,
2799
+ ) -> T_co:
2800
+ async def task_wrapper() -> T_co:
2801
+ __tracebackhide__ = True
2802
+ if scope is not None:
2803
+ task = cast(asyncio.Task, current_task())
2804
+ _task_states[task] = TaskState(None, scope)
2805
+ scope._tasks.add(task)
2806
+ try:
2807
+ return await func(*args)
2808
+ except CancelledError as exc:
2809
+ raise concurrent.futures.CancelledError(str(exc)) from None
2810
+ finally:
2811
+ if scope is not None:
2812
+ scope._tasks.discard(task)
2813
+
2814
+ loop = cast(
2815
+ "AbstractEventLoop", token or threadlocals.current_token.native_token
2816
+ )
2817
+ if loop.is_closed():
2818
+ raise RunFinishedError
2819
+
2820
+ context = copy_context()
2821
+ context.run(set_current_async_library, "asyncio")
2822
+ scope = getattr(threadlocals, "current_cancel_scope", None)
2823
+ f: concurrent.futures.Future[T_co] = context.run(
2824
+ asyncio.run_coroutine_threadsafe, task_wrapper(), loop=loop
2825
+ )
2826
+ return f.result()
2827
+
2828
+ @classmethod
2829
+ def run_sync_from_thread(
2830
+ cls,
2831
+ func: Callable[[Unpack[PosArgsT]], T_Retval],
2832
+ args: tuple[Unpack[PosArgsT]],
2833
+ token: object,
2834
+ ) -> T_Retval:
2835
+ @wraps(func)
2836
+ def wrapper() -> None:
2837
+ try:
2838
+ set_current_async_library("asyncio")
2839
+ f.set_result(func(*args))
2840
+ except BaseException as exc:
2841
+ f.set_exception(exc)
2842
+ if not isinstance(exc, Exception):
2843
+ raise
2844
+
2845
+ loop = cast(
2846
+ "AbstractEventLoop", token or threadlocals.current_token.native_token
2847
+ )
2848
+ if loop.is_closed():
2849
+ raise RunFinishedError
2850
+
2851
+ f: concurrent.futures.Future[T_Retval] = Future()
2852
+ loop.call_soon_threadsafe(wrapper)
2853
+ return f.result()
2854
+
2855
+ @classmethod
2856
+ def run_sync_soon(
2857
+ cls,
2858
+ func: Callable[[Unpack[PosArgsT]], object],
2859
+ args: tuple[Unpack[PosArgsT]],
2860
+ token: object,
2861
+ ) -> None:
2862
+ loop = cast("AbstractEventLoop", token)
2863
+ context = copy_context()
2864
+ context.run(set_current_async_library, "asyncio")
2865
+ try:
2866
+ loop.call_soon_threadsafe(context.run, func, *args)
2867
+ except RuntimeError:
2868
+ if loop.is_closed():
2869
+ raise RunFinishedError from None
2870
+
2871
+ raise
2872
+
2873
+ @classmethod
2874
+ async def open_process(
2875
+ cls,
2876
+ command: StrOrBytesPath | Sequence[StrOrBytesPath],
2877
+ *,
2878
+ stdin: int | IO[Any] | None,
2879
+ stdout: int | IO[Any] | None,
2880
+ stderr: int | IO[Any] | None,
2881
+ **kwargs: Any,
2882
+ ) -> Process:
2883
+ await cls.checkpoint()
2884
+ if isinstance(command, PathLike):
2885
+ command = os.fspath(command)
2886
+
2887
+ # Use loop.subprocess_shell()/subprocess_exec() rather than their
2888
+ # asyncio.create_subprocess_*() counterparts to get access to
2889
+ # transport/protocol.
2890
+ loop = asyncio.get_running_loop()
2891
+ if isinstance(command, (str, bytes)):
2892
+ transport, protocol = await loop.subprocess_shell(
2893
+ _ProcessStreamProtocol,
2894
+ command,
2895
+ stdin=stdin,
2896
+ stdout=stdout,
2897
+ stderr=stderr,
2898
+ **kwargs,
2899
+ )
2900
+ else:
2901
+ transport, protocol = await loop.subprocess_exec(
2902
+ _ProcessStreamProtocol,
2903
+ *command,
2904
+ stdin=stdin,
2905
+ stdout=stdout,
2906
+ stderr=stderr,
2907
+ **kwargs,
2908
+ )
2909
+
2910
+ process = asyncio.subprocess.Process(transport, protocol, loop)
2911
+ stdin_stream = StreamWriterWrapper(process.stdin) if process.stdin else None
2912
+ stdout_stream = StreamReaderWrapper(process.stdout) if process.stdout else None
2913
+ stderr_stream = StreamReaderWrapper(process.stderr) if process.stderr else None
2914
+ return Process(
2915
+ process,
2916
+ stdin_stream,
2917
+ stdout_stream,
2918
+ stderr_stream,
2919
+ protocol.exited,
2920
+ transport,
2921
+ )
2922
+
2923
+ @classmethod
2924
+ def setup_process_pool_exit_at_shutdown(cls, workers: set[abc.Process]) -> None:
2925
+ create_task(
2926
+ _shutdown_process_pool_on_exit(workers),
2927
+ name="AnyIO process pool shutdown task",
2928
+ )
2929
+ find_root_task().add_done_callback(
2930
+ partial(_forcibly_shutdown_process_pool_on_exit, workers) # type:ignore[arg-type]
2931
+ )
2932
+
2933
+ @classmethod
2934
+ async def connect_tcp(
2935
+ cls, host: str, port: int, local_address: IPSockAddrType | None = None
2936
+ ) -> abc.SocketStream:
2937
+ transport, protocol = cast(
2938
+ tuple[asyncio.Transport, StreamProtocol],
2939
+ await get_running_loop().create_connection(
2940
+ StreamProtocol, host, port, local_addr=local_address
2941
+ ),
2942
+ )
2943
+ transport.pause_reading()
2944
+ return SocketStream(transport, protocol)
2945
+
2946
+ @classmethod
2947
+ async def connect_unix(
2948
+ cls,
2949
+ path: str | bytes,
2950
+ kind: Literal[SocketKind.SOCK_STREAM, SocketKind.SOCK_SEQPACKET],
2951
+ ) -> abc.UNIXSocketStream:
2952
+ await cls.checkpoint()
2953
+ loop = get_running_loop()
2954
+ raw_socket = socket.socket(socket.AF_UNIX, kind)
2955
+ raw_socket.setblocking(False)
2956
+ while True:
2957
+ try:
2958
+ raw_socket.connect(path)
2959
+ except BlockingIOError:
2960
+ f: asyncio.Future = asyncio.Future()
2961
+ loop.add_writer(raw_socket, f.set_result, None)
2962
+ f.add_done_callback(lambda _: loop.remove_writer(raw_socket))
2963
+ await f
2964
+ except BaseException:
2965
+ raw_socket.close()
2966
+ raise
2967
+ else:
2968
+ return UNIXSocketStream(raw_socket)
2969
+
2970
+ @classmethod
2971
+ def create_tcp_listener(cls, sock: socket.socket) -> SocketListener:
2972
+ return TCPSocketListener(sock)
2973
+
2974
+ @classmethod
2975
+ def create_unix_listener(cls, sock: socket.socket) -> SocketListener:
2976
+ return UNIXSocketListener(sock)
2977
+
2978
+ @classmethod
2979
+ async def create_udp_socket(
2980
+ cls,
2981
+ family: AddressFamily,
2982
+ local_address: IPSockAddrType | None,
2983
+ remote_address: IPSockAddrType | None,
2984
+ reuse_port: bool,
2985
+ ) -> UDPSocket | ConnectedUDPSocket:
2986
+ transport, protocol = await get_running_loop().create_datagram_endpoint(
2987
+ DatagramProtocol,
2988
+ local_addr=local_address,
2989
+ remote_addr=remote_address,
2990
+ family=family,
2991
+ reuse_port=reuse_port,
2992
+ )
2993
+ if protocol.exception:
2994
+ transport.close()
2995
+ raise protocol.exception
2996
+
2997
+ if not remote_address:
2998
+ return UDPSocket(transport, protocol)
2999
+ else:
3000
+ return ConnectedUDPSocket(transport, protocol)
3001
+
3002
+ @classmethod
3003
+ async def create_unix_datagram_socket( # type: ignore[override]
3004
+ cls, raw_socket: socket.socket, remote_path: str | bytes | None
3005
+ ) -> abc.UNIXDatagramSocket | abc.ConnectedUNIXDatagramSocket:
3006
+ await cls.checkpoint()
3007
+ loop = get_running_loop()
3008
+
3009
+ if remote_path:
3010
+ while True:
3011
+ try:
3012
+ raw_socket.connect(remote_path)
3013
+ except BlockingIOError:
3014
+ f: asyncio.Future = asyncio.Future()
3015
+ loop.add_writer(raw_socket, f.set_result, None)
3016
+ f.add_done_callback(lambda _: loop.remove_writer(raw_socket))
3017
+ await f
3018
+ except BaseException:
3019
+ raw_socket.close()
3020
+ raise
3021
+ else:
3022
+ return ConnectedUNIXDatagramSocket(raw_socket)
3023
+ else:
3024
+ return UNIXDatagramSocket(raw_socket)
3025
+
3026
+ @classmethod
3027
+ async def getaddrinfo(
3028
+ cls,
3029
+ host: bytes | str | None,
3030
+ port: str | int | None,
3031
+ *,
3032
+ family: int | AddressFamily = 0,
3033
+ type: int | SocketKind = 0,
3034
+ proto: int = 0,
3035
+ flags: int = 0,
3036
+ ) -> Sequence[
3037
+ tuple[
3038
+ AddressFamily,
3039
+ SocketKind,
3040
+ int,
3041
+ str,
3042
+ tuple[str, int] | tuple[str, int, int, int] | tuple[int, bytes],
3043
+ ]
3044
+ ]:
3045
+ return await get_running_loop().getaddrinfo(
3046
+ host, port, family=family, type=type, proto=proto, flags=flags
3047
+ )
3048
+
3049
+ @classmethod
3050
+ async def getnameinfo(
3051
+ cls, sockaddr: IPSockAddrType, flags: int = 0
3052
+ ) -> tuple[str, str]:
3053
+ return await get_running_loop().getnameinfo(sockaddr, flags)
3054
+
3055
+ @classmethod
3056
+ async def wait_readable(cls, obj: FileDescriptorLike) -> None:
3057
+ try:
3058
+ read_events = _read_events.get()
3059
+ except LookupError:
3060
+ read_events = {}
3061
+ _read_events.set(read_events)
3062
+
3063
+ fd = obj if isinstance(obj, int) else obj.fileno()
3064
+ if read_events.get(fd):
3065
+ raise BusyResourceError("reading from")
3066
+
3067
+ loop = get_running_loop()
3068
+ fut: asyncio.Future[bool] = loop.create_future()
3069
+
3070
+ def cb() -> None:
3071
+ try:
3072
+ del read_events[fd]
3073
+ except KeyError:
3074
+ pass
3075
+ else:
3076
+ remove_reader(fd)
3077
+
3078
+ try:
3079
+ fut.set_result(True)
3080
+ except asyncio.InvalidStateError:
3081
+ pass
3082
+
3083
+ try:
3084
+ loop.add_reader(fd, cb)
3085
+ except NotImplementedError:
3086
+ from anyio._core._asyncio_selector_thread import get_selector
3087
+
3088
+ selector = get_selector()
3089
+ selector.add_reader(fd, cb)
3090
+ remove_reader = selector.remove_reader
3091
+ else:
3092
+ remove_reader = loop.remove_reader
3093
+
3094
+ read_events[fd] = fut
3095
+ try:
3096
+ success = await fut
3097
+ finally:
3098
+ try:
3099
+ del read_events[fd]
3100
+ except KeyError:
3101
+ pass
3102
+ else:
3103
+ remove_reader(fd)
3104
+
3105
+ if not success:
3106
+ raise ClosedResourceError
3107
+
3108
+ @classmethod
3109
+ async def wait_writable(cls, obj: FileDescriptorLike) -> None:
3110
+ try:
3111
+ write_events = _write_events.get()
3112
+ except LookupError:
3113
+ write_events = {}
3114
+ _write_events.set(write_events)
3115
+
3116
+ fd = obj if isinstance(obj, int) else obj.fileno()
3117
+ if write_events.get(fd):
3118
+ raise BusyResourceError("writing to")
3119
+
3120
+ loop = get_running_loop()
3121
+ fut: asyncio.Future[bool] = loop.create_future()
3122
+
3123
+ def cb() -> None:
3124
+ try:
3125
+ del write_events[fd]
3126
+ except KeyError:
3127
+ pass
3128
+ else:
3129
+ remove_writer(fd)
3130
+
3131
+ try:
3132
+ fut.set_result(True)
3133
+ except asyncio.InvalidStateError:
3134
+ pass
3135
+
3136
+ try:
3137
+ loop.add_writer(fd, cb)
3138
+ except NotImplementedError:
3139
+ from anyio._core._asyncio_selector_thread import get_selector
3140
+
3141
+ selector = get_selector()
3142
+ selector.add_writer(fd, cb)
3143
+ remove_writer = selector.remove_writer
3144
+ else:
3145
+ remove_writer = loop.remove_writer
3146
+
3147
+ write_events[fd] = fut
3148
+ try:
3149
+ success = await fut
3150
+ finally:
3151
+ try:
3152
+ del write_events[fd]
3153
+ except KeyError:
3154
+ pass
3155
+ else:
3156
+ remove_writer(fd)
3157
+
3158
+ if not success:
3159
+ raise ClosedResourceError
3160
+
3161
+ @classmethod
3162
+ def notify_closing(cls, obj: FileDescriptorLike) -> None:
3163
+ fd = obj if isinstance(obj, int) else obj.fileno()
3164
+ loop = get_running_loop()
3165
+
3166
+ try:
3167
+ write_events = _write_events.get()
3168
+ except LookupError:
3169
+ pass
3170
+ else:
3171
+ try:
3172
+ fut = write_events.pop(fd)
3173
+ except KeyError:
3174
+ pass
3175
+ else:
3176
+ try:
3177
+ fut.set_result(False)
3178
+ except asyncio.InvalidStateError:
3179
+ pass
3180
+
3181
+ try:
3182
+ loop.remove_writer(fd)
3183
+ except NotImplementedError:
3184
+ from anyio._core._asyncio_selector_thread import get_selector
3185
+
3186
+ get_selector().remove_writer(fd)
3187
+
3188
+ try:
3189
+ read_events = _read_events.get()
3190
+ except LookupError:
3191
+ pass
3192
+ else:
3193
+ try:
3194
+ fut = read_events.pop(fd)
3195
+ except KeyError:
3196
+ pass
3197
+ else:
3198
+ try:
3199
+ fut.set_result(False)
3200
+ except asyncio.InvalidStateError:
3201
+ pass
3202
+
3203
+ try:
3204
+ loop.remove_reader(fd)
3205
+ except NotImplementedError:
3206
+ from anyio._core._asyncio_selector_thread import get_selector
3207
+
3208
+ get_selector().remove_reader(fd)
3209
+
3210
+ @classmethod
3211
+ async def wrap_listener_socket(cls, sock: socket.socket) -> SocketListener:
3212
+ if hasattr(socket, "AF_UNIX") and sock.family == socket.AF_UNIX:
3213
+ return UNIXSocketListener(sock)
3214
+
3215
+ return TCPSocketListener(sock)
3216
+
3217
+ @classmethod
3218
+ async def wrap_stream_socket(cls, sock: socket.socket) -> SocketStream:
3219
+ transport, protocol = await get_running_loop().create_connection(
3220
+ StreamProtocol, sock=sock
3221
+ )
3222
+ return SocketStream(transport, protocol)
3223
+
3224
+ @classmethod
3225
+ async def wrap_unix_stream_socket(cls, sock: socket.socket) -> UNIXSocketStream:
3226
+ return UNIXSocketStream(sock)
3227
+
3228
+ @classmethod
3229
+ async def wrap_udp_socket(cls, sock: socket.socket) -> UDPSocket:
3230
+ transport, protocol = await get_running_loop().create_datagram_endpoint(
3231
+ DatagramProtocol, sock=sock
3232
+ )
3233
+ return UDPSocket(transport, protocol)
3234
+
3235
+ @classmethod
3236
+ async def wrap_connected_udp_socket(cls, sock: socket.socket) -> ConnectedUDPSocket:
3237
+ transport, protocol = await get_running_loop().create_datagram_endpoint(
3238
+ DatagramProtocol, sock=sock
3239
+ )
3240
+ return ConnectedUDPSocket(transport, protocol)
3241
+
3242
+ @classmethod
3243
+ async def wrap_unix_datagram_socket(cls, sock: socket.socket) -> UNIXDatagramSocket:
3244
+ return UNIXDatagramSocket(sock)
3245
+
3246
+ @classmethod
3247
+ async def wrap_connected_unix_datagram_socket(
3248
+ cls, sock: socket.socket
3249
+ ) -> ConnectedUNIXDatagramSocket:
3250
+ return ConnectedUNIXDatagramSocket(sock)
3251
+
3252
+ @classmethod
3253
+ def current_default_thread_limiter(cls) -> CapacityLimiter:
3254
+ try:
3255
+ return _default_thread_limiter.get()
3256
+ except LookupError:
3257
+ limiter = CapacityLimiter(40)
3258
+ _default_thread_limiter.set(limiter)
3259
+ return limiter
3260
+
3261
+ @classmethod
3262
+ def open_signal_receiver(
3263
+ cls, *signals: Signals
3264
+ ) -> AbstractContextManager[AsyncIterator[Signals]]:
3265
+ return _SignalReceiver(signals)
3266
+
3267
+ @classmethod
3268
+ def get_current_task(cls) -> TaskInfo:
3269
+ task = current_task()
3270
+ if task is None:
3271
+ raise RuntimeError("There is no task currently running")
3272
+
3273
+ return AsyncIOTaskInfo(task)
3274
+
3275
+ @classmethod
3276
+ def get_running_tasks(cls) -> Sequence[TaskInfo]:
3277
+ return [AsyncIOTaskInfo(task) for task in all_tasks() if not task.done()]
3278
+
3279
+ @classmethod
3280
+ async def wait_all_tasks_blocked(cls) -> None:
3281
+ await cls.checkpoint()
3282
+ this_task = current_task()
3283
+ while True:
3284
+ for task in all_tasks():
3285
+ if task is this_task:
3286
+ continue
3287
+
3288
+ waiter = task._fut_waiter # type: ignore[attr-defined]
3289
+ if waiter is None or waiter.done():
3290
+ await sleep(0.1)
3291
+ break
3292
+ else:
3293
+ return
3294
+
3295
+ @classmethod
3296
+ def create_test_runner(cls, options: dict[str, Any]) -> TestRunner:
3297
+ return TestRunner(**options)
3298
+
3299
+
3300
+ backend_class = AsyncIOBackend