@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,2410 @@
1
+ #
2
+ # The Python Imaging Library.
3
+ # $Id$
4
+ #
5
+ # TIFF file handling
6
+ #
7
+ # TIFF is a flexible, if somewhat aged, image file format originally
8
+ # defined by Aldus. Although TIFF supports a wide variety of pixel
9
+ # layouts and compression methods, the name doesn't really stand for
10
+ # "thousands of incompatible file formats," it just feels that way.
11
+ #
12
+ # To read TIFF data from a stream, the stream must be seekable. For
13
+ # progressive decoding, make sure to use TIFF files where the tag
14
+ # directory is placed first in the file.
15
+ #
16
+ # History:
17
+ # 1995-09-01 fl Created
18
+ # 1996-05-04 fl Handle JPEGTABLES tag
19
+ # 1996-05-18 fl Fixed COLORMAP support
20
+ # 1997-01-05 fl Fixed PREDICTOR support
21
+ # 1997-08-27 fl Added support for rational tags (from Perry Stoll)
22
+ # 1998-01-10 fl Fixed seek/tell (from Jan Blom)
23
+ # 1998-07-15 fl Use private names for internal variables
24
+ # 1999-06-13 fl Rewritten for PIL 1.0 (1.0)
25
+ # 2000-10-11 fl Additional fixes for Python 2.0 (1.1)
26
+ # 2001-04-17 fl Fixed rewind support (seek to frame 0) (1.2)
27
+ # 2001-05-12 fl Added write support for more tags (from Greg Couch) (1.3)
28
+ # 2001-12-18 fl Added workaround for broken Matrox library
29
+ # 2002-01-18 fl Don't mess up if photometric tag is missing (D. Alan Stewart)
30
+ # 2003-05-19 fl Check FILLORDER tag
31
+ # 2003-09-26 fl Added RGBa support
32
+ # 2004-02-24 fl Added DPI support; fixed rational write support
33
+ # 2005-02-07 fl Added workaround for broken Corel Draw 10 files
34
+ # 2006-01-09 fl Added support for float/double tags (from Russell Nelson)
35
+ #
36
+ # Copyright (c) 1997-2006 by Secret Labs AB. All rights reserved.
37
+ # Copyright (c) 1995-1997 by Fredrik Lundh
38
+ #
39
+ # See the README file for information on usage and redistribution.
40
+ #
41
+ from __future__ import annotations
42
+
43
+ __lazy_modules__ = {
44
+ "PIL._binary",
45
+ "PIL._util",
46
+ "fractions",
47
+ "itertools",
48
+ "math",
49
+ "struct",
50
+ "warnings",
51
+ }
52
+
53
+ import io
54
+ import itertools
55
+ import logging
56
+ import math
57
+ import os
58
+ import struct
59
+ import warnings
60
+ from collections.abc import Callable, MutableMapping
61
+ from fractions import Fraction
62
+ from numbers import Number, Rational
63
+ from typing import IO, Any, cast
64
+
65
+ from . import ExifTags, Image, ImageFile, ImageOps, ImagePalette, TiffTags
66
+ from ._binary import i16be as i16
67
+ from ._binary import i32be as i32
68
+ from ._util import DeferredError, is_path
69
+ from .TiffTags import TYPES
70
+
71
+ TYPE_CHECKING = False
72
+ if TYPE_CHECKING:
73
+ from collections.abc import Iterator
74
+ from typing import NoReturn, Self
75
+
76
+ from ._typing import Buffer, IntegralLike, StrOrBytesPath
77
+
78
+ logger = logging.getLogger(__name__)
79
+
80
+ # Set these to true to force use of libtiff for reading or writing.
81
+ READ_LIBTIFF = False
82
+ WRITE_LIBTIFF = False
83
+ STRIP_SIZE = 65536
84
+
85
+ II = b"II" # little-endian (Intel style)
86
+ MM = b"MM" # big-endian (Motorola style)
87
+
88
+ #
89
+ # --------------------------------------------------------------------
90
+ # Read TIFF files
91
+
92
+ # a few tag names, just to make the code below a bit more readable
93
+ OSUBFILETYPE = 255
94
+ IMAGEWIDTH = 256
95
+ IMAGELENGTH = 257
96
+ BITSPERSAMPLE = 258
97
+ COMPRESSION = 259
98
+ PHOTOMETRIC_INTERPRETATION = 262
99
+ FILLORDER = 266
100
+ IMAGEDESCRIPTION = 270
101
+ STRIPOFFSETS = 273
102
+ SAMPLESPERPIXEL = 277
103
+ ROWSPERSTRIP = 278
104
+ STRIPBYTECOUNTS = 279
105
+ X_RESOLUTION = 282
106
+ Y_RESOLUTION = 283
107
+ PLANAR_CONFIGURATION = 284
108
+ RESOLUTION_UNIT = 296
109
+ TRANSFERFUNCTION = 301
110
+ SOFTWARE = 305
111
+ DATE_TIME = 306
112
+ ARTIST = 315
113
+ PREDICTOR = 317
114
+ COLORMAP = 320
115
+ TILEWIDTH = 322
116
+ TILELENGTH = 323
117
+ TILEOFFSETS = 324
118
+ TILEBYTECOUNTS = 325
119
+ SUBIFD = 330
120
+ EXTRASAMPLES = 338
121
+ SAMPLEFORMAT = 339
122
+ JPEGTABLES = 347
123
+ YCBCRSUBSAMPLING = 530
124
+ REFERENCEBLACKWHITE = 532
125
+ COPYRIGHT = 33432
126
+ IPTC_NAA_CHUNK = 33723 # newsphoto properties
127
+ PHOTOSHOP_CHUNK = 34377 # photoshop properties
128
+ ICCPROFILE = 34675
129
+ EXIFIFD = 34665
130
+ XMP = 700
131
+ JPEGQUALITY = 65537 # pseudo-tag by libtiff
132
+
133
+ # https://github.com/imagej/ImageJA/blob/master/src/main/java/ij/io/TiffDecoder.java
134
+ IMAGEJ_META_DATA_BYTE_COUNTS = 50838
135
+ IMAGEJ_META_DATA = 50839
136
+
137
+ COMPRESSION_INFO = {
138
+ # Compression => pil compression name
139
+ 1: "raw",
140
+ 2: "tiff_ccitt",
141
+ 3: "group3",
142
+ 4: "group4",
143
+ 5: "tiff_lzw",
144
+ 6: "tiff_jpeg", # obsolete
145
+ 7: "jpeg",
146
+ 8: "tiff_adobe_deflate",
147
+ 32771: "tiff_raw_16", # 16-bit padding
148
+ 32773: "packbits",
149
+ 32809: "tiff_thunderscan",
150
+ 32946: "tiff_deflate",
151
+ 34676: "tiff_sgilog",
152
+ 34677: "tiff_sgilog24",
153
+ 34925: "lzma",
154
+ 50000: "zstd",
155
+ 50001: "webp",
156
+ }
157
+
158
+ COMPRESSION_INFO_REV = {v: k for k, v in COMPRESSION_INFO.items()}
159
+
160
+ OPEN_INFO = {
161
+ # (ByteOrder, PhotoInterpretation, SampleFormat, FillOrder, BitsPerSample,
162
+ # ExtraSamples) => mode, rawmode
163
+ (II, 0, (1,), 1, (1,), ()): ("1", "1;I"),
164
+ (MM, 0, (1,), 1, (1,), ()): ("1", "1;I"),
165
+ (II, 0, (1,), 2, (1,), ()): ("1", "1;IR"),
166
+ (MM, 0, (1,), 2, (1,), ()): ("1", "1;IR"),
167
+ (II, 1, (1,), 1, (1,), ()): ("1", "1"),
168
+ (MM, 1, (1,), 1, (1,), ()): ("1", "1"),
169
+ (II, 1, (1,), 2, (1,), ()): ("1", "1;R"),
170
+ (MM, 1, (1,), 2, (1,), ()): ("1", "1;R"),
171
+ (II, 0, (1,), 1, (2,), ()): ("L", "L;2I"),
172
+ (MM, 0, (1,), 1, (2,), ()): ("L", "L;2I"),
173
+ (II, 0, (1,), 2, (2,), ()): ("L", "L;2IR"),
174
+ (MM, 0, (1,), 2, (2,), ()): ("L", "L;2IR"),
175
+ (II, 1, (1,), 1, (2,), ()): ("L", "L;2"),
176
+ (MM, 1, (1,), 1, (2,), ()): ("L", "L;2"),
177
+ (II, 1, (1,), 2, (2,), ()): ("L", "L;2R"),
178
+ (MM, 1, (1,), 2, (2,), ()): ("L", "L;2R"),
179
+ (II, 0, (1,), 1, (4,), ()): ("L", "L;4I"),
180
+ (MM, 0, (1,), 1, (4,), ()): ("L", "L;4I"),
181
+ (II, 0, (1,), 2, (4,), ()): ("L", "L;4IR"),
182
+ (MM, 0, (1,), 2, (4,), ()): ("L", "L;4IR"),
183
+ (II, 1, (1,), 1, (4,), ()): ("L", "L;4"),
184
+ (MM, 1, (1,), 1, (4,), ()): ("L", "L;4"),
185
+ (II, 1, (1,), 2, (4,), ()): ("L", "L;4R"),
186
+ (MM, 1, (1,), 2, (4,), ()): ("L", "L;4R"),
187
+ (II, 0, (1,), 1, (8,), ()): ("L", "L;I"),
188
+ (MM, 0, (1,), 1, (8,), ()): ("L", "L;I"),
189
+ (II, 0, (1,), 2, (8,), ()): ("L", "L;IR"),
190
+ (MM, 0, (1,), 2, (8,), ()): ("L", "L;IR"),
191
+ (II, 1, (1,), 1, (8,), ()): ("L", "L"),
192
+ (MM, 1, (1,), 1, (8,), ()): ("L", "L"),
193
+ (II, 1, (2,), 1, (8,), ()): ("L", "L"),
194
+ (MM, 1, (2,), 1, (8,), ()): ("L", "L"),
195
+ (II, 1, (1,), 2, (8,), ()): ("L", "L;R"),
196
+ (MM, 1, (1,), 2, (8,), ()): ("L", "L;R"),
197
+ (II, 1, (1,), 1, (12,), ()): ("I;16", "I;12"),
198
+ (II, 0, (1,), 1, (16,), ()): ("I;16", "I;16"),
199
+ (II, 1, (1,), 1, (16,), ()): ("I;16", "I;16"),
200
+ (MM, 1, (1,), 1, (16,), ()): ("I;16B", "I;16B"),
201
+ (II, 1, (1,), 2, (16,), ()): ("I;16", "I;16R"),
202
+ (II, 1, (2,), 1, (16,), ()): ("I", "I;16S"),
203
+ (MM, 1, (2,), 1, (16,), ()): ("I", "I;16BS"),
204
+ (II, 0, (3,), 1, (32,), ()): ("F", "F;32F"),
205
+ (MM, 0, (3,), 1, (32,), ()): ("F", "F;32BF"),
206
+ (II, 1, (1,), 1, (32,), ()): ("I", "I;32N"),
207
+ (II, 1, (2,), 1, (32,), ()): ("I", "I;32S"),
208
+ (MM, 1, (2,), 1, (32,), ()): ("I", "I;32BS"),
209
+ (II, 1, (3,), 1, (32,), ()): ("F", "F;32F"),
210
+ (MM, 1, (3,), 1, (32,), ()): ("F", "F;32BF"),
211
+ (II, 1, (1,), 1, (8, 8), (0,)): ("L", "LX"),
212
+ (MM, 1, (1,), 1, (8, 8), (0,)): ("L", "LX"),
213
+ (II, 1, (1,), 1, (8, 8), (1,)): ("La", "La"),
214
+ (MM, 1, (1,), 1, (8, 8), (1,)): ("La", "La"),
215
+ (II, 1, (1,), 1, (8, 8), (2,)): ("LA", "LA"),
216
+ (MM, 1, (1,), 1, (8, 8), (2,)): ("LA", "LA"),
217
+ (II, 2, (1,), 1, (8, 8, 8), ()): ("RGB", "RGB"),
218
+ (MM, 2, (1,), 1, (8, 8, 8), ()): ("RGB", "RGB"),
219
+ (II, 2, (1,), 2, (8, 8, 8), ()): ("RGB", "RGB;R"),
220
+ (MM, 2, (1,), 2, (8, 8, 8), ()): ("RGB", "RGB;R"),
221
+ (II, 2, (1,), 1, (8, 8, 8, 8), ()): ("RGBA", "RGBA"), # missing ExtraSamples
222
+ (MM, 2, (1,), 1, (8, 8, 8, 8), ()): ("RGBA", "RGBA"), # missing ExtraSamples
223
+ (II, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGBX"),
224
+ (MM, 2, (1,), 1, (8, 8, 8, 8), (0,)): ("RGB", "RGBX"),
225
+ (II, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGBXX"),
226
+ (MM, 2, (1,), 1, (8, 8, 8, 8, 8), (0, 0)): ("RGB", "RGBXX"),
227
+ (II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGBXXX"),
228
+ (MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0, 0)): ("RGB", "RGBXXX"),
229
+ (II, 2, (1,), 1, (8, 8, 8, 8), (1,)): ("RGBA", "RGBa"),
230
+ (MM, 2, (1,), 1, (8, 8, 8, 8), (1,)): ("RGBA", "RGBa"),
231
+ (II, 2, (1,), 1, (8, 8, 8, 8, 8), (1, 0)): ("RGBA", "RGBaX"),
232
+ (MM, 2, (1,), 1, (8, 8, 8, 8, 8), (1, 0)): ("RGBA", "RGBaX"),
233
+ (II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (1, 0, 0)): ("RGBA", "RGBaXX"),
234
+ (MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (1, 0, 0)): ("RGBA", "RGBaXX"),
235
+ (II, 2, (1,), 1, (8, 8, 8, 8), (2,)): ("RGBA", "RGBA"),
236
+ (MM, 2, (1,), 1, (8, 8, 8, 8), (2,)): ("RGBA", "RGBA"),
237
+ (II, 2, (1,), 1, (8, 8, 8, 8, 8), (2, 0)): ("RGBA", "RGBAX"),
238
+ (MM, 2, (1,), 1, (8, 8, 8, 8, 8), (2, 0)): ("RGBA", "RGBAX"),
239
+ (II, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (2, 0, 0)): ("RGBA", "RGBAXX"),
240
+ (MM, 2, (1,), 1, (8, 8, 8, 8, 8, 8), (2, 0, 0)): ("RGBA", "RGBAXX"),
241
+ (II, 2, (1,), 1, (8, 8, 8, 8), (999,)): ("RGBA", "RGBA"), # Corel Draw 10
242
+ (MM, 2, (1,), 1, (8, 8, 8, 8), (999,)): ("RGBA", "RGBA"), # Corel Draw 10
243
+ (II, 2, (1,), 1, (16, 16, 16), ()): ("RGB", "RGB;16L"),
244
+ (MM, 2, (1,), 1, (16, 16, 16), ()): ("RGB", "RGB;16B"),
245
+ (II, 2, (1,), 1, (16, 16, 16, 16), ()): ("RGBA", "RGBA;16L"),
246
+ (MM, 2, (1,), 1, (16, 16, 16, 16), ()): ("RGBA", "RGBA;16B"),
247
+ (II, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGB", "RGBX;16L"),
248
+ (MM, 2, (1,), 1, (16, 16, 16, 16), (0,)): ("RGB", "RGBX;16B"),
249
+ (II, 2, (1,), 1, (16, 16, 16, 16), (1,)): ("RGBA", "RGBa;16L"),
250
+ (MM, 2, (1,), 1, (16, 16, 16, 16), (1,)): ("RGBA", "RGBa;16B"),
251
+ (II, 2, (1,), 1, (16, 16, 16, 16), (2,)): ("RGBA", "RGBA;16L"),
252
+ (MM, 2, (1,), 1, (16, 16, 16, 16), (2,)): ("RGBA", "RGBA;16B"),
253
+ (II, 3, (1,), 1, (1,), ()): ("P", "P;1"),
254
+ (MM, 3, (1,), 1, (1,), ()): ("P", "P;1"),
255
+ (II, 3, (1,), 2, (1,), ()): ("P", "P;1R"),
256
+ (MM, 3, (1,), 2, (1,), ()): ("P", "P;1R"),
257
+ (II, 3, (1,), 1, (2,), ()): ("P", "P;2"),
258
+ (MM, 3, (1,), 1, (2,), ()): ("P", "P;2"),
259
+ (II, 3, (1,), 2, (2,), ()): ("P", "P;2R"),
260
+ (MM, 3, (1,), 2, (2,), ()): ("P", "P;2R"),
261
+ (II, 3, (1,), 1, (4,), ()): ("P", "P;4"),
262
+ (MM, 3, (1,), 1, (4,), ()): ("P", "P;4"),
263
+ (II, 3, (1,), 2, (4,), ()): ("P", "P;4R"),
264
+ (MM, 3, (1,), 2, (4,), ()): ("P", "P;4R"),
265
+ (II, 3, (1,), 1, (8,), ()): ("P", "P"),
266
+ (MM, 3, (1,), 1, (8,), ()): ("P", "P"),
267
+ (II, 3, (1,), 1, (8, 8), (0,)): ("P", "PX"),
268
+ (MM, 3, (1,), 1, (8, 8), (0,)): ("P", "PX"),
269
+ (II, 3, (1,), 1, (8, 8), (2,)): ("PA", "PA"),
270
+ (MM, 3, (1,), 1, (8, 8), (2,)): ("PA", "PA"),
271
+ (II, 3, (1,), 2, (8,), ()): ("P", "P;R"),
272
+ (MM, 3, (1,), 2, (8,), ()): ("P", "P;R"),
273
+ (II, 5, (1,), 1, (8, 8, 8, 8), ()): ("CMYK", "CMYK"),
274
+ (MM, 5, (1,), 1, (8, 8, 8, 8), ()): ("CMYK", "CMYK"),
275
+ (II, 5, (1,), 1, (8, 8, 8, 8, 8), (0,)): ("CMYK", "CMYKX"),
276
+ (MM, 5, (1,), 1, (8, 8, 8, 8, 8), (0,)): ("CMYK", "CMYKX"),
277
+ (II, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
278
+ (MM, 5, (1,), 1, (8, 8, 8, 8, 8, 8), (0, 0)): ("CMYK", "CMYKXX"),
279
+ (II, 5, (1,), 1, (16, 16, 16, 16), ()): ("CMYK", "CMYK;16L"),
280
+ (MM, 5, (1,), 1, (16, 16, 16, 16), ()): ("CMYK", "CMYK;16B"),
281
+ (II, 6, (1,), 1, (8,), ()): ("L", "L"),
282
+ (MM, 6, (1,), 1, (8,), ()): ("L", "L"),
283
+ (II, 6, (1,), 1, (8, 8, 8), ()): ("YCbCr", "YCbCr"),
284
+ (MM, 6, (1,), 1, (8, 8, 8), ()): ("YCbCr", "YCbCr"),
285
+ (II, 8, (1,), 1, (8, 8, 8), ()): ("LAB", "LAB"),
286
+ (MM, 8, (1,), 1, (8, 8, 8), ()): ("LAB", "LAB"),
287
+ }
288
+
289
+ MAX_SAMPLESPERPIXEL = max(len(key_tp[4]) for key_tp in OPEN_INFO)
290
+
291
+ PREFIXES = [
292
+ b"MM\x00\x2a", # Valid TIFF header with big-endian byte order
293
+ b"II\x2a\x00", # Valid TIFF header with little-endian byte order
294
+ b"MM\x2a\x00", # Invalid TIFF header, assume big-endian
295
+ b"II\x00\x2a", # Invalid TIFF header, assume little-endian
296
+ b"MM\x00\x2b", # BigTIFF with big-endian byte order
297
+ b"II\x2b\x00", # BigTIFF with little-endian byte order
298
+ ]
299
+
300
+
301
+ def _accept(prefix: bytes) -> bool:
302
+ return prefix.startswith(tuple(PREFIXES))
303
+
304
+
305
+ def _limit_rational(
306
+ val: float | Fraction | IFDRational, max_val: int
307
+ ) -> tuple[IntegralLike, IntegralLike]:
308
+ inv = abs(val) > 1
309
+ n_d = IFDRational(1 / val if inv else val).limit_rational(max_val)
310
+ return n_d[::-1] if inv else n_d
311
+
312
+
313
+ def _limit_signed_rational(
314
+ val: IFDRational, max_val: int, min_val: int
315
+ ) -> tuple[IntegralLike, IntegralLike]:
316
+ frac = Fraction(val)
317
+ n_d: tuple[IntegralLike, IntegralLike] = frac.numerator, frac.denominator
318
+
319
+ if min(float(i) for i in n_d) < min_val:
320
+ n_d = _limit_rational(val, abs(min_val))
321
+
322
+ n_d_float = tuple(float(i) for i in n_d)
323
+ if max(n_d_float) > max_val:
324
+ n_d = _limit_rational(n_d_float[0] / n_d_float[1], max_val)
325
+
326
+ return n_d
327
+
328
+
329
+ ##
330
+ # Wrapper for TIFF IFDs.
331
+
332
+ _load_dispatch: dict[int, tuple[int, _LoaderFunc]] = {}
333
+ _write_dispatch: dict[int, Callable[..., Any]] = {}
334
+
335
+
336
+ def _delegate(op: str) -> Any:
337
+ def delegate(
338
+ self: IFDRational, *args: tuple[float, ...]
339
+ ) -> bool | float | Fraction:
340
+ return getattr(self._val, op)(*args)
341
+
342
+ return delegate
343
+
344
+
345
+ class IFDRational(Rational):
346
+ """Implements a rational class where 0/0 is a legal value to match
347
+ the in the wild use of exif rationals.
348
+
349
+ e.g., DigitalZoomRatio - 0.00/0.00 indicates that no digital zoom was used
350
+ """
351
+
352
+ """ If the denominator is 0, store this as a float('nan'), otherwise store
353
+ as a fractions.Fraction(). Delegate as appropriate
354
+
355
+ """
356
+
357
+ __slots__ = ("_numerator", "_denominator", "_val")
358
+
359
+ def __init__(
360
+ self, value: float | Fraction | IFDRational, denominator: int = 1
361
+ ) -> None:
362
+ """
363
+ :param value: either an integer numerator, a
364
+ float/rational/other number, or an IFDRational
365
+ :param denominator: Optional integer denominator
366
+ """
367
+ self._val: Fraction | float
368
+ if isinstance(value, IFDRational):
369
+ self._numerator = value.numerator
370
+ self._denominator = value.denominator
371
+ self._val = value._val
372
+ return
373
+
374
+ if isinstance(value, Fraction):
375
+ self._numerator = value.numerator
376
+ self._denominator = value.denominator
377
+ else:
378
+ if TYPE_CHECKING:
379
+ self._numerator = cast("IntegralLike", value)
380
+ else:
381
+ self._numerator = value
382
+ self._denominator = denominator
383
+
384
+ if denominator == 0:
385
+ self._val = float("nan")
386
+ elif denominator == 1:
387
+ self._val = Fraction(value)
388
+ elif int(value) == value:
389
+ self._val = Fraction(int(value), denominator)
390
+ else:
391
+ self._val = Fraction(value / denominator)
392
+
393
+ @property
394
+ def numerator(self) -> IntegralLike:
395
+ return self._numerator
396
+
397
+ @property
398
+ def denominator(self) -> int:
399
+ return self._denominator
400
+
401
+ def limit_rational(self, max_denominator: int) -> tuple[IntegralLike, int]:
402
+ """
403
+
404
+ :param max_denominator: Integer, the maximum denominator value
405
+ :returns: Tuple of (numerator, denominator)
406
+ """
407
+
408
+ if self.denominator == 0:
409
+ return self.numerator, self.denominator
410
+
411
+ assert isinstance(self._val, Fraction)
412
+ f = self._val.limit_denominator(max_denominator)
413
+ return f.numerator, f.denominator
414
+
415
+ def __repr__(self) -> str:
416
+ return str(float(self._val))
417
+
418
+ def __hash__(self) -> int: # type: ignore[override]
419
+ return self._val.__hash__()
420
+
421
+ def __eq__(self, other: object) -> bool:
422
+ val = self._val
423
+ if isinstance(other, IFDRational):
424
+ other = other._val
425
+ if isinstance(other, float):
426
+ val = float(val)
427
+ return val == other
428
+
429
+ def __getstate__(self) -> list[float | Fraction | IntegralLike]:
430
+ return [self._val, self._numerator, self._denominator]
431
+
432
+ def __setstate__(self, state: list[float | Fraction | IntegralLike]) -> None:
433
+ IFDRational.__init__(self, 0)
434
+ _val, _numerator, _denominator = state
435
+ assert isinstance(_val, (float, Fraction))
436
+ self._val = _val
437
+ if TYPE_CHECKING:
438
+ self._numerator = cast("IntegralLike", _numerator)
439
+ else:
440
+ self._numerator = _numerator
441
+ assert isinstance(_denominator, int)
442
+ self._denominator = _denominator
443
+
444
+ """ a = ['add','radd', 'sub', 'rsub', 'mul', 'rmul',
445
+ 'truediv', 'rtruediv', 'floordiv', 'rfloordiv',
446
+ 'mod','rmod', 'pow','rpow', 'pos', 'neg',
447
+ 'abs', 'trunc', 'lt', 'gt', 'le', 'ge', 'bool',
448
+ 'ceil', 'floor', 'round']
449
+ print("\n".join("__%s__ = _delegate('__%s__')" % (s,s) for s in a))
450
+ """
451
+
452
+ __add__ = _delegate("__add__")
453
+ __radd__ = _delegate("__radd__")
454
+ __sub__ = _delegate("__sub__")
455
+ __rsub__ = _delegate("__rsub__")
456
+ __mul__ = _delegate("__mul__")
457
+ __rmul__ = _delegate("__rmul__")
458
+ __truediv__ = _delegate("__truediv__")
459
+ __rtruediv__ = _delegate("__rtruediv__")
460
+ __floordiv__ = _delegate("__floordiv__")
461
+ __rfloordiv__ = _delegate("__rfloordiv__")
462
+ __mod__ = _delegate("__mod__")
463
+ __rmod__ = _delegate("__rmod__")
464
+ __pow__ = _delegate("__pow__")
465
+ __rpow__ = _delegate("__rpow__")
466
+ __pos__ = _delegate("__pos__")
467
+ __neg__ = _delegate("__neg__")
468
+ __abs__ = _delegate("__abs__")
469
+ __trunc__ = _delegate("__trunc__")
470
+ __lt__ = _delegate("__lt__")
471
+ __gt__ = _delegate("__gt__")
472
+ __le__ = _delegate("__le__")
473
+ __ge__ = _delegate("__ge__")
474
+ __bool__ = _delegate("__bool__")
475
+ __ceil__ = _delegate("__ceil__")
476
+ __floor__ = _delegate("__floor__")
477
+ __round__ = _delegate("__round__")
478
+ __float__ = _delegate("__float__")
479
+ __int__ = _delegate("__int__")
480
+
481
+
482
+ _LoaderFunc = Callable[["ImageFileDirectory_v2", bytes, bool], Any]
483
+
484
+
485
+ def _register_loader(idx: int, size: int) -> Callable[[_LoaderFunc], _LoaderFunc]:
486
+ def decorator(func: _LoaderFunc) -> _LoaderFunc:
487
+ from .TiffTags import TYPES
488
+
489
+ if func.__name__.startswith("load_"):
490
+ TYPES[idx] = func.__name__[5:].replace("_", " ")
491
+ _load_dispatch[idx] = size, func # noqa: F821
492
+ return func
493
+
494
+ return decorator
495
+
496
+
497
+ def _register_writer(idx: int) -> Callable[[Callable[..., Any]], Callable[..., Any]]:
498
+ def decorator(func: Callable[..., Any]) -> Callable[..., Any]:
499
+ _write_dispatch[idx] = func # noqa: F821
500
+ return func
501
+
502
+ return decorator
503
+
504
+
505
+ def _register_basic(idx_fmt_name: tuple[int, str, str]) -> None:
506
+ from .TiffTags import TYPES
507
+
508
+ idx, fmt, name = idx_fmt_name
509
+ TYPES[idx] = name
510
+ size = struct.calcsize(f"={fmt}")
511
+
512
+ def basic_handler(
513
+ self: ImageFileDirectory_v2, data: bytes, legacy_api: bool = True
514
+ ) -> tuple[Any, ...]:
515
+ return self._unpack(f"{len(data) // size}{fmt}", data)
516
+
517
+ _load_dispatch[idx] = size, basic_handler # noqa: F821
518
+ _write_dispatch[idx] = lambda self, *values: ( # noqa: F821
519
+ b"".join(self._pack(fmt, value) for value in values)
520
+ )
521
+
522
+
523
+ if TYPE_CHECKING:
524
+ _IFDv2Base = MutableMapping[int, Any]
525
+ else:
526
+ _IFDv2Base = MutableMapping
527
+
528
+
529
+ class ImageFileDirectory_v2(_IFDv2Base):
530
+ """This class represents a TIFF tag directory. To speed things up, we
531
+ don't decode tags unless they're asked for.
532
+
533
+ Exposes a dictionary interface of the tags in the directory::
534
+
535
+ ifd = ImageFileDirectory_v2()
536
+ ifd[key] = 'Some Data'
537
+ ifd.tagtype[key] = TiffTags.ASCII
538
+ print(ifd[key])
539
+ 'Some Data'
540
+
541
+ Individual values are returned as the strings or numbers, sequences are
542
+ returned as tuples of the values.
543
+
544
+ The tiff metadata type of each item is stored in a dictionary of
545
+ tag types in
546
+ :attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype`. The types
547
+ are read from a tiff file, guessed from the type added, or added
548
+ manually.
549
+
550
+ Data Structures:
551
+
552
+ * ``self.tagtype = {}``
553
+
554
+ * Key: numerical TIFF tag number
555
+ * Value: integer corresponding to the data type from
556
+ :py:data:`.TiffTags.TYPES`
557
+
558
+ .. versionadded:: 3.0.0
559
+
560
+ 'Internal' data structures:
561
+
562
+ * ``self._tags_v2 = {}``
563
+
564
+ * Key: numerical TIFF tag number
565
+ * Value: decoded data, as tuple for multiple values
566
+
567
+ * ``self._tagdata = {}``
568
+
569
+ * Key: numerical TIFF tag number
570
+ * Value: undecoded byte string from file
571
+
572
+ * ``self._tags_v1 = {}``
573
+
574
+ * Key: numerical TIFF tag number
575
+ * Value: decoded data in the v1 format
576
+
577
+ Tags will be found in the private attributes ``self._tagdata``, and in
578
+ ``self._tags_v2`` once decoded.
579
+
580
+ ``self.legacy_api`` is a value for internal use, and shouldn't be changed
581
+ from outside code. In cooperation with
582
+ :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`, if ``legacy_api``
583
+ is true, then decoded tags will be populated into both ``_tags_v1`` and
584
+ ``_tags_v2``. ``_tags_v2`` will be used if this IFD is used in the TIFF
585
+ save routine. Tags should be read from ``_tags_v1`` if
586
+ ``legacy_api == true``.
587
+
588
+ """
589
+
590
+ _load_dispatch: dict[int, tuple[int, _LoaderFunc]] = {}
591
+ _write_dispatch: dict[int, Callable[..., Any]] = {}
592
+
593
+ def __init__(
594
+ self,
595
+ ifh: bytes = b"II\x2a\x00\x00\x00\x00\x00",
596
+ prefix: bytes | None = None,
597
+ group: int | None = None,
598
+ ) -> None:
599
+ """Initialize an ImageFileDirectory.
600
+
601
+ To construct an ImageFileDirectory from a real file, pass the 8-byte
602
+ magic header to the constructor. To only set the endianness, pass it
603
+ as the 'prefix' keyword argument.
604
+
605
+ :param ifh: One of the accepted magic headers (cf. PREFIXES); also sets
606
+ endianness.
607
+ :param prefix: Override the endianness of the file.
608
+ """
609
+ if not _accept(ifh):
610
+ msg = f"not a TIFF file (header {repr(ifh)} not valid)"
611
+ raise SyntaxError(msg)
612
+ self._prefix = prefix if prefix is not None else ifh[:2]
613
+ if self._prefix == MM:
614
+ self._endian = ">"
615
+ elif self._prefix == II:
616
+ self._endian = "<"
617
+ else:
618
+ msg = "not a TIFF IFD"
619
+ raise SyntaxError(msg)
620
+ self._bigtiff = ifh[2] == 43
621
+ self.group = group
622
+ self.tagtype: dict[int, int] = {}
623
+ """ Dictionary of tag types """
624
+ self.reset()
625
+ # Maximum total out-of-line tag data that load() may read, as well
626
+ # as the size of the stream. Set by TiffImageFile so that
627
+ # all frames of a file share one budget.
628
+ self._tag_data_limit: int | None = None
629
+ self.next = (
630
+ self._unpack("Q", ifh[8:])[0]
631
+ if self._bigtiff
632
+ else self._unpack("L", ifh[4:])[0]
633
+ )
634
+ self._legacy_api = False
635
+
636
+ prefix = property(lambda self: self._prefix)
637
+ offset = property(lambda self: self._offset)
638
+
639
+ @property
640
+ def legacy_api(self) -> bool:
641
+ return self._legacy_api
642
+
643
+ @legacy_api.setter
644
+ def legacy_api(self, value: bool) -> NoReturn:
645
+ msg = "Not allowing setting of legacy api"
646
+ raise Exception(msg)
647
+
648
+ def reset(self) -> None:
649
+ self._tags_v1: dict[int, Any] = {} # will remain empty if legacy_api is false
650
+ self._tags_v2: dict[int, Any] = {} # main tag storage
651
+ self._tagdata: dict[int, bytes] = {}
652
+ self.tagtype = {} # added 2008-06-05 by Florian Hoech
653
+ self._next = None
654
+ self._offset: int | None = None
655
+
656
+ def __str__(self) -> str:
657
+ return str(dict(self))
658
+
659
+ def named(self) -> dict[str, Any]:
660
+ """
661
+ :returns: dict of name|key: value
662
+
663
+ Returns the complete tag dictionary, with named tags where possible.
664
+ """
665
+ return {
666
+ TiffTags.lookup(code, self.group).name: value
667
+ for code, value in self.items()
668
+ }
669
+
670
+ def __len__(self) -> int:
671
+ return len(set(self._tagdata) | set(self._tags_v2))
672
+
673
+ def __getitem__(self, tag: int) -> Any:
674
+ if tag not in self._tags_v2: # unpack on the fly
675
+ data = self._tagdata[tag]
676
+ typ = self.tagtype[tag]
677
+ size, handler = self._load_dispatch[typ]
678
+ self[tag] = handler(self, data, self.legacy_api) # check type
679
+ val = self._tags_v2[tag]
680
+ if self.legacy_api and not isinstance(val, (tuple, bytes)):
681
+ val = (val,)
682
+ return val
683
+
684
+ def __contains__(self, tag: object) -> bool:
685
+ return tag in self._tags_v2 or tag in self._tagdata
686
+
687
+ def __setitem__(self, tag: int, value: Any) -> None:
688
+ self._setitem(tag, value, self.legacy_api)
689
+
690
+ def _setitem(self, tag: int, value: Any, legacy_api: bool) -> None:
691
+ basetypes = (Number, bytes, str)
692
+
693
+ info = TiffTags.lookup(tag, self.group)
694
+ values = [value] if isinstance(value, basetypes) else value
695
+
696
+ if tag not in self.tagtype:
697
+ if info.type:
698
+ self.tagtype[tag] = info.type
699
+ else:
700
+ self.tagtype[tag] = TiffTags.UNDEFINED
701
+ if all(isinstance(v, IFDRational) for v in values):
702
+ for v in values:
703
+ if v < IFDRational(0):
704
+ self.tagtype[tag] = TiffTags.SIGNED_RATIONAL
705
+ break
706
+ else:
707
+ self.tagtype[tag] = TiffTags.RATIONAL
708
+ elif all(isinstance(v, int) for v in values):
709
+ short = True
710
+ signed_short = True
711
+ long = True
712
+ for v in values:
713
+ assert isinstance(v, int)
714
+ if short and not (0 <= v < 2**16):
715
+ short = False
716
+ if signed_short and not (-(2**15) < v < 2**15):
717
+ signed_short = False
718
+ if long and v < 0:
719
+ long = False
720
+ if short:
721
+ self.tagtype[tag] = TiffTags.SHORT
722
+ elif signed_short:
723
+ self.tagtype[tag] = TiffTags.SIGNED_SHORT
724
+ elif long:
725
+ self.tagtype[tag] = TiffTags.LONG
726
+ else:
727
+ self.tagtype[tag] = TiffTags.SIGNED_LONG
728
+ elif all(isinstance(v, float) for v in values):
729
+ self.tagtype[tag] = TiffTags.DOUBLE
730
+ elif all(isinstance(v, str) for v in values):
731
+ self.tagtype[tag] = TiffTags.ASCII
732
+ elif all(isinstance(v, bytes) for v in values):
733
+ self.tagtype[tag] = TiffTags.BYTE
734
+
735
+ if self.tagtype[tag] == TiffTags.UNDEFINED:
736
+ values = [
737
+ v.encode("ascii", "replace") if isinstance(v, str) else v
738
+ for v in values
739
+ ]
740
+ elif self.tagtype[tag] == TiffTags.RATIONAL:
741
+ values = [float(v) if isinstance(v, int) else v for v in values]
742
+
743
+ is_ifd = self.tagtype[tag] == TiffTags.LONG and isinstance(values, dict)
744
+ if not is_ifd:
745
+ values = tuple(
746
+ info.cvt_enum(value) if isinstance(value, str) else value
747
+ for value in values
748
+ )
749
+
750
+ dest = self._tags_v1 if legacy_api else self._tags_v2
751
+
752
+ # Three branches:
753
+ # Spec'd length == 1, Actual length 1, store as element
754
+ # Spec'd length == 1, Actual > 1, Warn and truncate. Formerly barfed.
755
+ # No Spec, Actual length 1, Formerly (<4.2) returned a 1 element tuple.
756
+ # Don't mess with the legacy api, since it's frozen.
757
+ if not is_ifd and (
758
+ (info.length == 1)
759
+ or self.tagtype[tag] == TiffTags.BYTE
760
+ or (info.length is None and len(values) == 1 and not legacy_api)
761
+ ):
762
+ # Don't mess with the legacy api, since it's frozen.
763
+ if legacy_api and self.tagtype[tag] in [
764
+ TiffTags.RATIONAL,
765
+ TiffTags.SIGNED_RATIONAL,
766
+ ]: # rationals
767
+ values = (values,)
768
+ try:
769
+ (dest[tag],) = values
770
+ except ValueError:
771
+ # We've got a builtin tag with 1 expected entry
772
+ if tag != PHOTOMETRIC_INTERPRETATION:
773
+ warnings.warn(
774
+ f"Metadata Warning, tag {tag} had too many entries: "
775
+ f"{len(values)}, expected 1"
776
+ )
777
+ dest[tag] = values[0]
778
+
779
+ else:
780
+ # Spec'd length > 1 or undefined
781
+ # Unspec'd, and length > 1
782
+ dest[tag] = values
783
+
784
+ def __delitem__(self, tag: int) -> None:
785
+ self._tags_v2.pop(tag, None)
786
+ self._tags_v1.pop(tag, None)
787
+ self._tagdata.pop(tag, None)
788
+
789
+ def __iter__(self) -> Iterator[int]:
790
+ return iter(set(self._tagdata) | set(self._tags_v2))
791
+
792
+ def _unpack(self, fmt: str, data: bytes) -> tuple[Any, ...]:
793
+ return struct.unpack(self._endian + fmt, data)
794
+
795
+ def _pack(self, fmt: str, *values: Any) -> bytes:
796
+ return struct.pack(self._endian + fmt, *values)
797
+
798
+ list(
799
+ map(
800
+ _register_basic,
801
+ [
802
+ (TiffTags.SHORT, "H", "short"),
803
+ (TiffTags.LONG, "L", "long"),
804
+ (TiffTags.SIGNED_BYTE, "b", "signed byte"),
805
+ (TiffTags.SIGNED_SHORT, "h", "signed short"),
806
+ (TiffTags.SIGNED_LONG, "l", "signed long"),
807
+ (TiffTags.FLOAT, "f", "float"),
808
+ (TiffTags.DOUBLE, "d", "double"),
809
+ (TiffTags.IFD, "L", "long"),
810
+ (TiffTags.LONG8, "Q", "long8"),
811
+ ],
812
+ )
813
+ )
814
+
815
+ @_register_loader(1, 1) # Basic type, except for the legacy API.
816
+ def load_byte(self, data: bytes, legacy_api: bool = True) -> bytes:
817
+ return data
818
+
819
+ @_register_writer(1) # Basic type, except for the legacy API.
820
+ def write_byte(self, data: bytes | int | IFDRational) -> bytes:
821
+ if isinstance(data, IFDRational):
822
+ data = int(data)
823
+ if isinstance(data, int):
824
+ data = bytes((data,))
825
+ return data
826
+
827
+ @_register_loader(2, 1)
828
+ def load_string(self, data: bytes, legacy_api: bool = True) -> str:
829
+ if data.endswith(b"\0"):
830
+ data = data[:-1]
831
+ return data.decode("latin-1", "replace")
832
+
833
+ @_register_writer(2)
834
+ def write_string(self, value: str | bytes | int) -> bytes:
835
+ # remerge of https://github.com/python-pillow/Pillow/pull/1416
836
+ if isinstance(value, int):
837
+ value = str(value)
838
+ if not isinstance(value, bytes):
839
+ value = value.encode("ascii", "replace")
840
+ return value + b"\0"
841
+
842
+ @_register_loader(5, 8)
843
+ def load_rational(
844
+ self, data: bytes, legacy_api: bool = True
845
+ ) -> tuple[tuple[int, int] | IFDRational, ...]:
846
+ vals = self._unpack(f"{len(data) // 4}L", data)
847
+
848
+ def combine(a: int, b: int) -> tuple[int, int] | IFDRational:
849
+ return (a, b) if legacy_api else IFDRational(a, b)
850
+
851
+ return tuple(combine(num, denom) for num, denom in zip(vals[::2], vals[1::2]))
852
+
853
+ @_register_writer(5)
854
+ def write_rational(self, *values: IFDRational) -> bytes:
855
+ return b"".join(
856
+ self._pack("2L", *_limit_rational(frac, 2**32 - 1)) for frac in values
857
+ )
858
+
859
+ @_register_loader(7, 1)
860
+ def load_undefined(self, data: bytes, legacy_api: bool = True) -> bytes:
861
+ return data
862
+
863
+ @_register_writer(7)
864
+ def write_undefined(self, value: bytes | int | IFDRational) -> bytes:
865
+ if isinstance(value, IFDRational):
866
+ value = int(value)
867
+ if isinstance(value, int):
868
+ value = str(value).encode("ascii", "replace")
869
+ return value
870
+
871
+ @_register_loader(10, 8)
872
+ def load_signed_rational(
873
+ self, data: bytes, legacy_api: bool = True
874
+ ) -> tuple[tuple[int, int] | IFDRational, ...]:
875
+ vals = self._unpack(f"{len(data) // 4}l", data)
876
+
877
+ def combine(a: int, b: int) -> tuple[int, int] | IFDRational:
878
+ return (a, b) if legacy_api else IFDRational(a, b)
879
+
880
+ return tuple(combine(num, denom) for num, denom in zip(vals[::2], vals[1::2]))
881
+
882
+ @_register_writer(10)
883
+ def write_signed_rational(self, *values: IFDRational) -> bytes:
884
+ return b"".join(
885
+ self._pack("2l", *_limit_signed_rational(frac, 2**31 - 1, -(2**31)))
886
+ for frac in values
887
+ )
888
+
889
+ def _ensure_read(self, fp: IO[bytes], size: int) -> bytes:
890
+ ret = fp.read(size)
891
+ if len(ret) != size:
892
+ msg = (
893
+ "Corrupt EXIF data. "
894
+ f"Expecting to read {size} bytes but only got {len(ret)}. "
895
+ )
896
+ raise OSError(msg)
897
+ return ret
898
+
899
+ def load(self, fp: IO[bytes]) -> None:
900
+ self.reset()
901
+ self._offset = fp.tell()
902
+ fp.seek(0, io.SEEK_END)
903
+ limit = fp.tell()
904
+ fp.seek(self._offset)
905
+ if self._tag_data_limit is not None:
906
+ limit = min(limit, self._tag_data_limit)
907
+ self._tag_data_size = 0
908
+
909
+ try:
910
+ tag_count = (
911
+ self._unpack("Q", self._ensure_read(fp, 8))
912
+ if self._bigtiff
913
+ else self._unpack("H", self._ensure_read(fp, 2))
914
+ )[0]
915
+ total_size = 0
916
+ for i in range(tag_count):
917
+ tag, typ, count, data = (
918
+ self._unpack("HHQ8s", self._ensure_read(fp, 20))
919
+ if self._bigtiff
920
+ else self._unpack("HHL4s", self._ensure_read(fp, 12))
921
+ )
922
+ if tag in self._tagdata:
923
+ continue
924
+
925
+ tagname = TiffTags.lookup(tag, self.group).name
926
+ typname = TYPES.get(typ, "unknown")
927
+ msg = f"tag: {tagname} ({tag}) - type: {typname} ({typ})"
928
+
929
+ try:
930
+ unit_size, handler = self._load_dispatch[typ]
931
+ except KeyError:
932
+ logger.debug("%s - unsupported type %s", msg, typ)
933
+ continue # ignore unsupported type
934
+ size = count * unit_size
935
+ if size > (8 if self._bigtiff else 4):
936
+ here = fp.tell()
937
+ (offset,) = self._unpack("Q" if self._bigtiff else "L", data)
938
+ msg += f" Tag Location: {here} - Data Location: {offset}"
939
+ if offset >= 2**63:
940
+ warnings.warn("Tag offset too large")
941
+ continue
942
+ # Well-formed IFD values should fit within the stream they
943
+ # are read from, even before accounting for overlaps.
944
+ total_size += size
945
+ if total_size > limit:
946
+ warnings.warn(f"Tag data larger than file. Skipping tag {tag}")
947
+ continue
948
+ self._tag_data_size += size
949
+ fp.seek(offset)
950
+ data = ImageFile._safe_read(fp, size)
951
+ fp.seek(here)
952
+ else:
953
+ data = data[:size]
954
+
955
+ if len(data) != size:
956
+ warnings.warn(
957
+ "Possibly corrupt EXIF data. "
958
+ f"Expecting to read {size} bytes but only got {len(data)}."
959
+ f" Skipping tag {tag}"
960
+ )
961
+ logger.debug(msg)
962
+ continue
963
+
964
+ if not data:
965
+ logger.debug(msg)
966
+ continue
967
+
968
+ self._tagdata[tag] = data
969
+ self.tagtype[tag] = typ
970
+
971
+ msg += " - value: "
972
+ msg += f"<table: {size} bytes>" if size > 32 else repr(data)
973
+
974
+ logger.debug(msg)
975
+
976
+ (self.next,) = (
977
+ self._unpack("Q", self._ensure_read(fp, 8))
978
+ if self._bigtiff
979
+ else self._unpack("L", self._ensure_read(fp, 4))
980
+ )
981
+ except OSError as msg:
982
+ warnings.warn(str(msg))
983
+ return
984
+
985
+ def _get_ifh(self) -> bytes:
986
+ ifh = self._prefix + self._pack("H", 43 if self._bigtiff else 42)
987
+ if self._bigtiff:
988
+ ifh += self._pack("HH", 8, 0)
989
+ ifh += self._pack("Q", 16) if self._bigtiff else self._pack("L", 8)
990
+
991
+ return ifh
992
+
993
+ def tobytes(self, offset: int = 0) -> bytes:
994
+ # FIXME What about tagdata?
995
+ result = self._pack("Q" if self._bigtiff else "H", len(self._tags_v2))
996
+
997
+ entries: list[tuple[int, int, int, bytes, bytes]] = []
998
+
999
+ fmt = "Q" if self._bigtiff else "L"
1000
+ fmt_size = 8 if self._bigtiff else 4
1001
+ offset += (
1002
+ len(result) + len(self._tags_v2) * (20 if self._bigtiff else 12) + fmt_size
1003
+ )
1004
+ stripoffsets = None
1005
+
1006
+ # pass 1: convert tags to binary format
1007
+ # always write tags in ascending order
1008
+ for tag, value in sorted(self._tags_v2.items()):
1009
+ if tag == STRIPOFFSETS:
1010
+ stripoffsets = len(entries)
1011
+ typ = self.tagtype[tag]
1012
+ logger.debug("Tag %s, Type: %s, Value: %s", tag, typ, repr(value))
1013
+ is_ifd = typ == TiffTags.LONG and isinstance(value, dict)
1014
+ if is_ifd:
1015
+ ifd = ImageFileDirectory_v2(self._get_ifh(), group=tag)
1016
+ values = self._tags_v2[tag]
1017
+ for ifd_tag, ifd_value in values.items():
1018
+ ifd[ifd_tag] = ifd_value
1019
+ data = ifd.tobytes(offset)
1020
+ else:
1021
+ values = value if isinstance(value, tuple) else (value,)
1022
+ data = self._write_dispatch[typ](self, *values)
1023
+
1024
+ tagname = TiffTags.lookup(tag, self.group).name
1025
+ typname = "ifd" if is_ifd else TYPES.get(typ, "unknown")
1026
+ msg = f"save: {tagname} ({tag}) - type: {typname} ({typ}) - value: "
1027
+ msg += f"<table: {len(data)} bytes>" if len(data) >= 16 else str(values)
1028
+ logger.debug(msg)
1029
+
1030
+ # count is sum of lengths for string and arbitrary data
1031
+ if is_ifd:
1032
+ count = 1
1033
+ elif typ in [TiffTags.BYTE, TiffTags.ASCII, TiffTags.UNDEFINED]:
1034
+ count = len(data)
1035
+ else:
1036
+ count = len(values)
1037
+ # figure out if data fits into the entry
1038
+ if len(data) <= fmt_size:
1039
+ entries.append((tag, typ, count, data.ljust(fmt_size, b"\0"), b""))
1040
+ else:
1041
+ entries.append((tag, typ, count, self._pack(fmt, offset), data))
1042
+ offset += (len(data) + 1) // 2 * 2 # pad to word
1043
+
1044
+ # update strip offset data to point beyond auxiliary data
1045
+ if stripoffsets is not None:
1046
+ tag, typ, count, value, data = entries[stripoffsets]
1047
+ if data:
1048
+ size, handler = self._load_dispatch[typ]
1049
+ values = [val + offset for val in handler(self, data, self.legacy_api)]
1050
+ data = self._write_dispatch[typ](self, *values)
1051
+ else:
1052
+ value = self._pack(fmt, self._unpack(fmt, value)[0] + offset)
1053
+ entries[stripoffsets] = tag, typ, count, value, data
1054
+
1055
+ # pass 2: write entries to file
1056
+ for tag, typ, count, value, data in entries:
1057
+ logger.debug("%s %s %s %s %s", tag, typ, count, repr(value), repr(data))
1058
+ result += self._pack(
1059
+ "HHQ8s" if self._bigtiff else "HHL4s", tag, typ, count, value
1060
+ )
1061
+
1062
+ # -- overwrite here for multi-page --
1063
+ result += self._pack(fmt, 0) # end of entries
1064
+
1065
+ # pass 3: write auxiliary data to file
1066
+ for tag, typ, count, value, data in entries:
1067
+ result += data
1068
+ if len(data) & 1:
1069
+ result += b"\0"
1070
+
1071
+ return result
1072
+
1073
+ def save(self, fp: IO[bytes]) -> int:
1074
+ if fp.tell() == 0: # skip TIFF header on subsequent pages
1075
+ fp.write(self._get_ifh())
1076
+
1077
+ offset = fp.tell()
1078
+ result = self.tobytes(offset)
1079
+ fp.write(result)
1080
+ return offset + len(result)
1081
+
1082
+
1083
+ ImageFileDirectory_v2._load_dispatch = _load_dispatch
1084
+ ImageFileDirectory_v2._write_dispatch = _write_dispatch
1085
+ for idx, name in TYPES.items():
1086
+ name = name.replace(" ", "_")
1087
+ setattr(ImageFileDirectory_v2, f"load_{name}", _load_dispatch[idx][1])
1088
+ setattr(ImageFileDirectory_v2, f"write_{name}", _write_dispatch[idx])
1089
+ del _load_dispatch, _write_dispatch, idx, name
1090
+
1091
+
1092
+ # Legacy ImageFileDirectory support.
1093
+ class ImageFileDirectory_v1(ImageFileDirectory_v2):
1094
+ """This class represents the **legacy** interface to a TIFF tag directory.
1095
+
1096
+ Exposes a dictionary interface of the tags in the directory::
1097
+
1098
+ ifd = ImageFileDirectory_v1()
1099
+ ifd[key] = 'Some Data'
1100
+ ifd.tagtype[key] = TiffTags.ASCII
1101
+ print(ifd[key])
1102
+ ('Some Data',)
1103
+
1104
+ Also contains a dictionary of tag types as read from the tiff image file,
1105
+ :attr:`~PIL.TiffImagePlugin.ImageFileDirectory_v1.tagtype`.
1106
+
1107
+ Values are returned as a tuple.
1108
+
1109
+ .. deprecated:: 3.0.0
1110
+ """
1111
+
1112
+ def __init__(self, *args: Any, **kwargs: Any) -> None:
1113
+ super().__init__(*args, **kwargs)
1114
+ self._legacy_api = True
1115
+
1116
+ tags = property(lambda self: self._tags_v1)
1117
+ tagdata = property(lambda self: self._tagdata)
1118
+
1119
+ # defined in ImageFileDirectory_v2
1120
+ tagtype: dict[int, int]
1121
+ """Dictionary of tag types"""
1122
+
1123
+ @classmethod
1124
+ def from_v2(cls, original: ImageFileDirectory_v2) -> ImageFileDirectory_v1:
1125
+ """Returns an
1126
+ :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`
1127
+ instance with the same data as is contained in the original
1128
+ :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2`
1129
+ instance.
1130
+
1131
+ :returns: :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`
1132
+
1133
+ """
1134
+
1135
+ ifd = cls(prefix=original.prefix)
1136
+ ifd._tagdata = original._tagdata
1137
+ ifd.tagtype = original.tagtype
1138
+ ifd.next = original.next # an indicator for multipage tiffs
1139
+ return ifd
1140
+
1141
+ def to_v2(self) -> ImageFileDirectory_v2:
1142
+ """Returns an
1143
+ :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2`
1144
+ instance with the same data as is contained in the original
1145
+ :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v1`
1146
+ instance.
1147
+
1148
+ :returns: :py:class:`~PIL.TiffImagePlugin.ImageFileDirectory_v2`
1149
+
1150
+ """
1151
+
1152
+ ifd = ImageFileDirectory_v2(prefix=self.prefix)
1153
+ ifd._tagdata = dict(self._tagdata)
1154
+ ifd.tagtype = dict(self.tagtype)
1155
+ ifd._tags_v2 = dict(self._tags_v2)
1156
+ return ifd
1157
+
1158
+ def __contains__(self, tag: object) -> bool:
1159
+ return tag in self._tags_v1 or tag in self._tagdata
1160
+
1161
+ def __len__(self) -> int:
1162
+ return len(set(self._tagdata) | set(self._tags_v1))
1163
+
1164
+ def __iter__(self) -> Iterator[int]:
1165
+ return iter(set(self._tagdata) | set(self._tags_v1))
1166
+
1167
+ def __setitem__(self, tag: int, value: Any) -> None:
1168
+ for legacy_api in (False, True):
1169
+ self._setitem(tag, value, legacy_api)
1170
+
1171
+ def __getitem__(self, tag: int) -> Any:
1172
+ if tag not in self._tags_v1: # unpack on the fly
1173
+ data = self._tagdata[tag]
1174
+ typ = self.tagtype[tag]
1175
+ size, handler = self._load_dispatch[typ]
1176
+ for legacy in (False, True):
1177
+ self._setitem(tag, handler(self, data, legacy), legacy)
1178
+ val = self._tags_v1[tag]
1179
+ if not isinstance(val, (tuple, bytes)):
1180
+ val = (val,)
1181
+ return val
1182
+
1183
+
1184
+ # undone -- switch this pointer
1185
+ ImageFileDirectory = ImageFileDirectory_v1
1186
+
1187
+
1188
+ ##
1189
+ # Image plugin for TIFF files.
1190
+
1191
+
1192
+ class TiffImageFile(ImageFile.ImageFile):
1193
+ format = "TIFF"
1194
+ format_description = "Adobe TIFF"
1195
+ _close_exclusive_fp_after_loading = False
1196
+
1197
+ def __init__(
1198
+ self,
1199
+ fp: StrOrBytesPath | IO[bytes],
1200
+ filename: str | bytes | None = None,
1201
+ ) -> None:
1202
+ self.tag_v2: ImageFileDirectory_v2
1203
+ """ Image file directory (tag dictionary) """
1204
+
1205
+ self.tag: ImageFileDirectory_v1
1206
+ """ Legacy tag entries """
1207
+
1208
+ self._n_frames: int | None = None
1209
+ super().__init__(fp, filename)
1210
+
1211
+ def _open(self) -> None:
1212
+ """Open the first image in a TIFF file"""
1213
+
1214
+ # Header
1215
+ assert self.fp is not None
1216
+ ifh = self.fp.read(8)
1217
+ if ifh[2] == 43:
1218
+ ifh += self.fp.read(8)
1219
+
1220
+ self.tag_v2 = ImageFileDirectory_v2(ifh)
1221
+
1222
+ # setup frame pointers
1223
+ self.__first = self.__next = self.tag_v2.next
1224
+ self.__frame = -1
1225
+ self._fp = self.fp
1226
+ self._frame_pos: list[int] = []
1227
+
1228
+ # Out-of-line tag data is budgeted across all frames, so that many
1229
+ # frames cannot each read the same data. Each frame's limit is fixed
1230
+ # when it is first loaded, so that reloading it gives the same tags.
1231
+ self.fp.seek(0, io.SEEK_END)
1232
+ self._tag_data_remaining = self.fp.tell()
1233
+ self._tag_data_limits: list[int] = []
1234
+
1235
+ logger.debug("*** TiffImageFile._open ***")
1236
+ logger.debug("- __first: %s", self.__first)
1237
+ logger.debug("- ifh: %s", repr(ifh)) # Use repr to avoid str(bytes)
1238
+
1239
+ # and load the first frame
1240
+ self._seek(0)
1241
+
1242
+ @property
1243
+ def n_frames(self) -> int:
1244
+ current_n_frames = self._n_frames
1245
+ if current_n_frames is None:
1246
+ current = self.tell()
1247
+ self._seek(len(self._frame_pos))
1248
+ while self._n_frames is None:
1249
+ self._seek(self.tell() + 1)
1250
+ self.seek(current)
1251
+ assert self._n_frames is not None
1252
+ return self._n_frames
1253
+
1254
+ def seek(self, frame: int) -> None:
1255
+ """Select a given frame as current image"""
1256
+ if not self._seek_check(frame):
1257
+ return
1258
+ self._seek(frame)
1259
+ if self._im is not None and (
1260
+ self.im.size != self._tile_size
1261
+ or self.im.mode != self.mode
1262
+ or self.readonly
1263
+ ):
1264
+ self._im = None
1265
+
1266
+ def _seek(self, frame: int) -> None:
1267
+ if isinstance(self._fp, DeferredError):
1268
+ raise self._fp.ex
1269
+ self.fp = self._fp
1270
+
1271
+ while len(self._frame_pos) <= frame:
1272
+ if not self.__next:
1273
+ msg = "no more images in TIFF file"
1274
+ raise EOFError(msg)
1275
+ logger.debug(
1276
+ "Seeking to frame %s, on frame %s, __next %s, location: %s",
1277
+ frame,
1278
+ self.__frame,
1279
+ self.__next,
1280
+ self.fp.tell(),
1281
+ )
1282
+ if self.__next >= 2**63:
1283
+ msg = "Unable to seek to frame"
1284
+ raise ValueError(msg)
1285
+ self.fp.seek(self.__next)
1286
+ self._frame_pos.append(self.__next)
1287
+ self._tag_data_limits.append(self._tag_data_remaining)
1288
+ logger.debug("Loading tags, location: %s", self.fp.tell())
1289
+ self.tag_v2._tag_data_limit = self._tag_data_remaining
1290
+ self.tag_v2.load(self.fp)
1291
+ self._tag_data_remaining -= self.tag_v2._tag_data_size
1292
+ if self.tag_v2.next in self._frame_pos:
1293
+ # This IFD has already been processed
1294
+ # Declare this to be the end of the image
1295
+ self.__next = 0
1296
+ else:
1297
+ self.__next = self.tag_v2.next
1298
+ if self.__next == 0 and self._n_frames is None:
1299
+ self._n_frames = frame + 1
1300
+ if not hasattr(self, "is_animated"):
1301
+ self.is_animated = self.__next != 0
1302
+ self.__frame += 1
1303
+ self.fp.seek(self._frame_pos[frame])
1304
+ self.tag_v2._tag_data_limit = self._tag_data_limits[frame]
1305
+ self.tag_v2.load(self.fp)
1306
+ if XMP in self.tag_v2:
1307
+ xmp = self.tag_v2[XMP]
1308
+ if isinstance(xmp, tuple) and len(xmp) == 1:
1309
+ xmp = xmp[0]
1310
+ self.info["xmp"] = xmp
1311
+ elif "xmp" in self.info:
1312
+ del self.info["xmp"]
1313
+ self._reload_exif()
1314
+ # fill the legacy tag/ifd entries
1315
+ self.tag = self.ifd = ImageFileDirectory_v1.from_v2(self.tag_v2)
1316
+ self.__frame = frame
1317
+ self._setup()
1318
+
1319
+ def tell(self) -> int:
1320
+ """Return the current frame number"""
1321
+ return self.__frame
1322
+
1323
+ def get_photoshop_blocks(self) -> dict[int, dict[str, bytes]]:
1324
+ """
1325
+ Returns a dictionary of Photoshop "Image Resource Blocks".
1326
+ The keys are the image resource ID. For more information, see
1327
+ https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/#50577409_pgfId-1037727
1328
+
1329
+ :returns: Photoshop "Image Resource Blocks" in a dictionary.
1330
+ """
1331
+ blocks = {}
1332
+ val = self.tag_v2.get(ExifTags.Base.ImageResources)
1333
+ if val:
1334
+ while val.startswith(b"8BIM") and len(val) >= 12:
1335
+ id = i16(val[4:6])
1336
+ n = math.ceil((val[6] + 1) / 2) * 2
1337
+ try:
1338
+ size = i32(val[6 + n : 10 + n])
1339
+ except struct.error:
1340
+ break
1341
+ data = val[10 + n : 10 + n + size]
1342
+ blocks[id] = {"data": data}
1343
+
1344
+ val = val[math.ceil((10 + n + size) / 2) * 2 :]
1345
+ return blocks
1346
+
1347
+ def load(self) -> Image.core.PixelAccess | None:
1348
+ if self.tile and self.use_load_libtiff:
1349
+ return self._load_libtiff()
1350
+ return super().load()
1351
+
1352
+ def load_prepare(self) -> None:
1353
+ if self._im is None:
1354
+ Image._decompression_bomb_check(self._tile_size)
1355
+ self.im = Image.core.new(self.mode, self._tile_size)
1356
+ ImageFile.ImageFile.load_prepare(self)
1357
+
1358
+ def load_end(self) -> None:
1359
+ # allow closing if we're on the first frame, there's no next
1360
+ # This is the ImageFile.load path only, libtiff specific below.
1361
+ if not self.is_animated:
1362
+ self._close_exclusive_fp_after_loading = True
1363
+
1364
+ # load IFD data from fp before it is closed
1365
+ exif = self.getexif()
1366
+ for key in TiffTags.TAGS_V2_GROUPS:
1367
+ if key not in exif:
1368
+ continue
1369
+ exif.get_ifd(key)
1370
+
1371
+ ImageOps.exif_transpose(self, in_place=True)
1372
+ if ExifTags.Base.Orientation in self.tag_v2:
1373
+ del self.tag_v2[ExifTags.Base.Orientation]
1374
+
1375
+ def _load_libtiff(self) -> Image.core.PixelAccess | None:
1376
+ """Overload method triggered when we detect a compressed tiff
1377
+ Calls out to libtiff"""
1378
+
1379
+ Image.Image.load(self)
1380
+
1381
+ self.load_prepare()
1382
+
1383
+ if not len(self.tile) == 1:
1384
+ msg = "Not exactly one tile"
1385
+ raise OSError(msg)
1386
+
1387
+ extents = self.tile[0].extents
1388
+ args = self.tile[0].args
1389
+
1390
+ # To be nice on memory footprint, if there's a
1391
+ # file descriptor, use that instead of reading
1392
+ # into a string in python.
1393
+ assert self.fp is not None
1394
+ try:
1395
+ fp = hasattr(self.fp, "fileno") and self.fp.fileno()
1396
+ # flush the file descriptor, prevents error on pypy 2.4+
1397
+ # should also eliminate the need for fp.tell
1398
+ # in _seek
1399
+ if hasattr(self.fp, "flush"):
1400
+ self.fp.flush()
1401
+ except OSError:
1402
+ # io.BytesIO have a fileno, but returns an OSError if
1403
+ # it doesn't use a file descriptor.
1404
+ fp = False
1405
+
1406
+ if fp:
1407
+ assert isinstance(args, tuple)
1408
+ args_list = list(args)
1409
+ args_list[1] = fp
1410
+ args = tuple(args_list)
1411
+
1412
+ decoder = Image._getdecoder(self.mode, "libtiff", args, self.decoderconfig)
1413
+ try:
1414
+ decoder.setimage(self.im, extents)
1415
+ except ValueError as e:
1416
+ msg = "Couldn't set the image"
1417
+ raise OSError(msg) from e
1418
+
1419
+ close_self_fp = self._exclusive_fp and not self.is_animated
1420
+ if hasattr(self.fp, "getvalue"):
1421
+ # We've got a stringio like thing passed in. Yay for all in memory.
1422
+ # The decoder needs the entire file in one shot, so there's not
1423
+ # a lot we can do here other than give it the entire file.
1424
+ # unless we could do something like get the address of the
1425
+ # underlying string for stringio.
1426
+ #
1427
+ # Rearranging for supporting byteio items, since they have a fileno
1428
+ # that returns an OSError if there's no underlying fp. Easier to
1429
+ # deal with here by reordering.
1430
+ logger.debug("have getvalue. just sending in a string from getvalue")
1431
+ n, err = decoder.decode(self.fp.getvalue())
1432
+ elif fp:
1433
+ # we've got a actual file on disk, pass in the fp.
1434
+ logger.debug("have fileno, calling fileno version of the decoder.")
1435
+ if not close_self_fp:
1436
+ self.fp.seek(0)
1437
+ # Save and restore the file position, because libtiff will move it
1438
+ # outside of the Python runtime, and that will confuse
1439
+ # io.BufferedReader and possible others.
1440
+ # NOTE: This must use os.lseek(), and not fp.tell()/fp.seek(),
1441
+ # because the buffer read head already may not equal the actual
1442
+ # file position, and fp.seek() may just adjust it's internal
1443
+ # pointer and not actually seek the OS file handle.
1444
+ pos = os.lseek(fp, 0, os.SEEK_CUR)
1445
+ # 4 bytes, otherwise the trace might error out
1446
+ n, err = decoder.decode(b"fpfp")
1447
+ os.lseek(fp, pos, os.SEEK_SET)
1448
+ else:
1449
+ # we have something else.
1450
+ logger.debug("don't have fileno or getvalue. just reading")
1451
+ self.fp.seek(0)
1452
+ # UNDONE -- so much for that buffer size thing.
1453
+ n, err = decoder.decode(self.fp.read())
1454
+
1455
+ self.tile = []
1456
+ self.readonly = 0
1457
+
1458
+ self.load_end()
1459
+
1460
+ if close_self_fp:
1461
+ self.fp.close()
1462
+ self.fp = None # might be shared
1463
+
1464
+ if err < 0:
1465
+ msg = f"decoder error {err}"
1466
+ raise OSError(msg)
1467
+
1468
+ return Image.Image.load(self)
1469
+
1470
+ def _setup(self) -> None:
1471
+ """Setup this image object based on current tags"""
1472
+
1473
+ if 0xBC01 in self.tag_v2:
1474
+ msg = "Windows Media Photo files not yet supported"
1475
+ raise OSError(msg)
1476
+
1477
+ # extract relevant tags
1478
+ self._compression = COMPRESSION_INFO[self.tag_v2.get(COMPRESSION, 1)]
1479
+ self._planar_configuration = self.tag_v2.get(PLANAR_CONFIGURATION, 1)
1480
+
1481
+ # photometric is a required tag, but not everyone is reading
1482
+ # the specification
1483
+ photo = self.tag_v2.get(PHOTOMETRIC_INTERPRETATION, 0)
1484
+
1485
+ # old style jpeg compression images most certainly are YCbCr
1486
+ if self._compression == "tiff_jpeg":
1487
+ photo = 6
1488
+
1489
+ fillorder = self.tag_v2.get(FILLORDER, 1)
1490
+
1491
+ logger.debug("*** Summary ***")
1492
+ logger.debug("- compression: %s", self._compression)
1493
+ logger.debug("- photometric_interpretation: %s", photo)
1494
+ logger.debug("- planar_configuration: %s", self._planar_configuration)
1495
+ logger.debug("- fill_order: %s", fillorder)
1496
+ logger.debug("- YCbCr subsampling: %s", self.tag_v2.get(YCBCRSUBSAMPLING))
1497
+
1498
+ # size
1499
+ try:
1500
+ xsize = self.tag_v2[IMAGEWIDTH]
1501
+ ysize = self.tag_v2[IMAGELENGTH]
1502
+ except KeyError as e:
1503
+ msg = "Missing dimensions"
1504
+ raise TypeError(msg) from e
1505
+ if not isinstance(xsize, int) or not isinstance(ysize, int):
1506
+ msg = "Invalid dimensions"
1507
+ raise ValueError(msg)
1508
+ self._tile_size = xsize, ysize
1509
+ orientation = self.tag_v2.get(ExifTags.Base.Orientation)
1510
+ if orientation in (5, 6, 7, 8):
1511
+ self._size = ysize, xsize
1512
+ else:
1513
+ self._size = xsize, ysize
1514
+
1515
+ logger.debug("- size: %s", self.size)
1516
+
1517
+ sample_format = self.tag_v2.get(SAMPLEFORMAT, (1,))
1518
+ if len(sample_format) > 1 and max(sample_format) == min(sample_format):
1519
+ # SAMPLEFORMAT is properly per band, so an RGB image will
1520
+ # be (1,1,1). But, we don't support per band pixel types,
1521
+ # and anything more than one band is a uint8. So, just
1522
+ # take the first element. Revisit this if adding support
1523
+ # for more exotic images.
1524
+ sample_format = (sample_format[0],)
1525
+
1526
+ bps_tuple = self.tag_v2.get(BITSPERSAMPLE, (1,))
1527
+ extra_tuple = self.tag_v2.get(EXTRASAMPLES, ())
1528
+ samples_per_pixel = self.tag_v2.get(
1529
+ SAMPLESPERPIXEL,
1530
+ 3 if self._compression == "tiff_jpeg" and photo in (2, 6) else 1,
1531
+ )
1532
+ if photo in (2, 6, 8): # RGB, YCbCr, LAB
1533
+ bps_count = 3
1534
+ elif photo == 5: # CMYK
1535
+ bps_count = 4
1536
+ else:
1537
+ bps_count = 1
1538
+ if self._planar_configuration == 2 and extra_tuple and max(extra_tuple) == 0:
1539
+ # If components are stored separately,
1540
+ # then unspecified extra components at the end can be ignored
1541
+ bps_tuple = bps_tuple[: -len(extra_tuple)]
1542
+ samples_per_pixel -= len(extra_tuple)
1543
+ extra_tuple = ()
1544
+ bps_count += len(extra_tuple)
1545
+ bps_actual_count = len(bps_tuple)
1546
+
1547
+ if samples_per_pixel > MAX_SAMPLESPERPIXEL:
1548
+ # DOS check, samples_per_pixel can be a Long, and we extend the tuple below
1549
+ logger.error(
1550
+ "More samples per pixel than can be decoded: %s", samples_per_pixel
1551
+ )
1552
+ msg = "Invalid value for samples per pixel"
1553
+ raise SyntaxError(msg)
1554
+
1555
+ if samples_per_pixel < bps_actual_count:
1556
+ # If a file has more values in bps_tuple than expected,
1557
+ # remove the excess.
1558
+ bps_tuple = bps_tuple[:samples_per_pixel]
1559
+ elif samples_per_pixel > bps_actual_count and bps_actual_count == 1:
1560
+ # If a file has only one value in bps_tuple, when it should have more,
1561
+ # presume it is the same number of bits for all of the samples.
1562
+ bps_tuple = bps_tuple * samples_per_pixel
1563
+
1564
+ if len(bps_tuple) != samples_per_pixel:
1565
+ msg = "unknown data organization"
1566
+ raise SyntaxError(msg)
1567
+
1568
+ # mode: check photometric interpretation and bits per pixel
1569
+ key = (
1570
+ self.tag_v2.prefix,
1571
+ photo,
1572
+ sample_format,
1573
+ fillorder,
1574
+ bps_tuple,
1575
+ extra_tuple,
1576
+ )
1577
+ logger.debug("format key: %s", key)
1578
+ try:
1579
+ self._mode, rawmode = OPEN_INFO[key]
1580
+ except KeyError as e:
1581
+ logger.debug("- unsupported format")
1582
+ msg = "unknown pixel mode"
1583
+ raise SyntaxError(msg) from e
1584
+
1585
+ logger.debug("- raw mode: %s", rawmode)
1586
+ logger.debug("- pil mode: %s", self.mode)
1587
+
1588
+ self.info["compression"] = self._compression
1589
+
1590
+ xres = self.tag_v2.get(X_RESOLUTION, 1)
1591
+ yres = self.tag_v2.get(Y_RESOLUTION, 1)
1592
+
1593
+ if xres and yres:
1594
+ resunit = self.tag_v2.get(RESOLUTION_UNIT)
1595
+ if resunit == 2: # dots per inch
1596
+ self.info["dpi"] = (xres, yres)
1597
+ elif resunit == 3: # dots per centimeter. convert to dpi
1598
+ self.info["dpi"] = (xres * 2.54, yres * 2.54)
1599
+ elif resunit is None: # used to default to 1, but now 2)
1600
+ self.info["dpi"] = (xres, yres)
1601
+ # For backward compatibility,
1602
+ # we also preserve the old behavior
1603
+ self.info["resolution"] = xres, yres
1604
+ else: # No absolute unit of measurement
1605
+ self.info["resolution"] = xres, yres
1606
+
1607
+ # build tile descriptors
1608
+ x = y = layer = 0
1609
+ self.tile = []
1610
+ self.use_load_libtiff = READ_LIBTIFF or self._compression != "raw"
1611
+ if self.use_load_libtiff:
1612
+ # Decoder expects entire file as one tile.
1613
+ # There's a buffer size limit in load (64k)
1614
+ # so large g4 images will fail if we use that
1615
+ # function.
1616
+ #
1617
+ # Setup the one tile for the whole image, then
1618
+ # use the _load_libtiff function.
1619
+
1620
+ # libtiff handles the fillmode for us, so 1;IR should
1621
+ # actually be 1;I. Including the R double reverses the
1622
+ # bits, so stripes of the image are reversed. See
1623
+ # https://github.com/python-pillow/Pillow/issues/279
1624
+ if fillorder == 2:
1625
+ # Replace fillorder with fillorder=1
1626
+ key = key[:3] + (1,) + key[4:]
1627
+ logger.debug("format key: %s", key)
1628
+ # this should always work, since all the
1629
+ # fillorder==2 modes have a corresponding
1630
+ # fillorder=1 mode
1631
+ self._mode, rawmode = OPEN_INFO[key]
1632
+ if photo == 6:
1633
+ self._mode = "RGB"
1634
+ if self._compression in "jpeg" and self._planar_configuration == 1:
1635
+ # YCbCr images with new jpeg compression with pixels in one plane
1636
+ # unpacked straight into RGB values
1637
+ rawmode = "RGB"
1638
+ else:
1639
+ rawmode = "RGBX"
1640
+ # libtiff always returns the bytes in native order.
1641
+ # we're expecting image byte order. So, if the rawmode
1642
+ # contains I;16, we need to convert from native to image
1643
+ # byte order.
1644
+ elif rawmode == "I;16":
1645
+ rawmode = "I;16N"
1646
+ elif rawmode.endswith((";16B", ";16L")):
1647
+ rawmode = rawmode[:-1] + "N"
1648
+
1649
+ # Offset in the tile tuple is 0, we go from 0,0 to
1650
+ # w,h, and we only do this once -- eds
1651
+ a = (rawmode, False, self.tag_v2.offset)
1652
+ self.tile.append(ImageFile._Tile("libtiff", (0, 0, xsize, ysize), 0, a))
1653
+
1654
+ elif STRIPOFFSETS in self.tag_v2 or TILEOFFSETS in self.tag_v2:
1655
+ # striped image
1656
+ if STRIPOFFSETS in self.tag_v2:
1657
+ offsets = self.tag_v2[STRIPOFFSETS]
1658
+ h = self.tag_v2.get(ROWSPERSTRIP, ysize)
1659
+ w = xsize
1660
+ else:
1661
+ # tiled image
1662
+ offsets = self.tag_v2[TILEOFFSETS]
1663
+ tilewidth = self.tag_v2.get(TILEWIDTH)
1664
+ h = self.tag_v2.get(TILELENGTH)
1665
+ if not isinstance(tilewidth, int) or not isinstance(h, int):
1666
+ msg = "Invalid tile dimensions"
1667
+ raise ValueError(msg)
1668
+ w = tilewidth
1669
+
1670
+ if w == xsize and h == ysize and self._planar_configuration != 2:
1671
+ # Every tile covers the image. Only use the last offset
1672
+ offsets = offsets[-1:]
1673
+
1674
+ for offset in offsets:
1675
+ if x + w > xsize:
1676
+ stride = w * sum(bps_tuple) / 8 # bytes per line
1677
+ else:
1678
+ stride = 0
1679
+
1680
+ tile_rawmode = rawmode
1681
+ if self._planar_configuration == 2:
1682
+ # each band on it's own layer
1683
+ tile_rawmode = rawmode[layer]
1684
+ # adjust stride width accordingly
1685
+ stride /= bps_count
1686
+
1687
+ args = (tile_rawmode, int(stride), 1)
1688
+ self.tile.append(
1689
+ ImageFile._Tile(
1690
+ self._compression,
1691
+ (x, y, min(x + w, xsize), min(y + h, ysize)),
1692
+ offset,
1693
+ args,
1694
+ )
1695
+ )
1696
+ x += w
1697
+ if x >= xsize:
1698
+ x, y = 0, y + h
1699
+ if y >= ysize:
1700
+ y = 0
1701
+ layer += 1
1702
+ else:
1703
+ logger.debug("- unsupported data organization")
1704
+ msg = "unknown data organization"
1705
+ raise SyntaxError(msg)
1706
+
1707
+ # Fix up info.
1708
+ if ICCPROFILE in self.tag_v2:
1709
+ self.info["icc_profile"] = self.tag_v2[ICCPROFILE]
1710
+
1711
+ # fixup palette descriptor
1712
+
1713
+ if self.mode in ["P", "PA"]:
1714
+ palette = tuple(b // 256 for b in self.tag_v2[COLORMAP])
1715
+ self.palette = ImagePalette.raw("RGB;L", palette)
1716
+ else:
1717
+ self.palette = None
1718
+
1719
+
1720
+ #
1721
+ # --------------------------------------------------------------------
1722
+ # Write TIFF files
1723
+
1724
+ # little endian is default except for image modes with
1725
+ # explicit big endian byte-order
1726
+
1727
+ SAVE_INFO = {
1728
+ # mode => rawmode, byteorder, photometrics,
1729
+ # sampleformat, bitspersample, extra
1730
+ "1": ("1", II, 1, 1, (1,), None),
1731
+ "L": ("L", II, 1, 1, (8,), None),
1732
+ "LA": ("LA", II, 1, 1, (8, 8), 2),
1733
+ "P": ("P", II, 3, 1, (8,), None),
1734
+ "PA": ("PA", II, 3, 1, (8, 8), 2),
1735
+ "I": ("I;32S", II, 1, 2, (32,), None),
1736
+ "I;16": ("I;16", II, 1, 1, (16,), None),
1737
+ "I;16L": ("I;16L", II, 1, 1, (16,), None),
1738
+ "F": ("F;32F", II, 1, 3, (32,), None),
1739
+ "RGB": ("RGB", II, 2, 1, (8, 8, 8), None),
1740
+ "RGBX": ("RGBX", II, 2, 1, (8, 8, 8, 8), 0),
1741
+ "RGBA": ("RGBA", II, 2, 1, (8, 8, 8, 8), 2),
1742
+ "CMYK": ("CMYK", II, 5, 1, (8, 8, 8, 8), None),
1743
+ "YCbCr": ("YCbCr", II, 6, 1, (8, 8, 8), None),
1744
+ "LAB": ("LAB", II, 8, 1, (8, 8, 8), None),
1745
+ "I;16B": ("I;16B", MM, 1, 1, (16,), None),
1746
+ }
1747
+
1748
+
1749
+ def _validate_tags(tags: dict[int, Any]) -> None:
1750
+ if COLORMAP in tags:
1751
+ bps = tags.get(BITSPERSAMPLE, 1)
1752
+ if isinstance(bps, tuple):
1753
+ bps = bps[0]
1754
+ expected = (1 << bps) * 3
1755
+ if len(tags[COLORMAP]) != expected:
1756
+ msg = f"Requiring {expected} items for Colormap"
1757
+ raise ValueError(msg)
1758
+
1759
+
1760
+ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
1761
+ try:
1762
+ rawmode, prefix, photo, format, bits, extra = SAVE_INFO[im.mode]
1763
+ except KeyError as e:
1764
+ msg = f"cannot write mode {im.mode} as TIFF"
1765
+ raise OSError(msg) from e
1766
+
1767
+ encoderinfo = im.encoderinfo
1768
+ encoderconfig = im.encoderconfig
1769
+
1770
+ ifd = ImageFileDirectory_v2(prefix=prefix)
1771
+ if encoderinfo.get("big_tiff"):
1772
+ ifd._bigtiff = True
1773
+
1774
+ try:
1775
+ compression = encoderinfo["compression"]
1776
+ except KeyError:
1777
+ compression = im.info.get("compression")
1778
+ if isinstance(compression, int):
1779
+ # compression value may be from BMP. Ignore it
1780
+ compression = None
1781
+ if compression is None:
1782
+ compression = "raw"
1783
+ elif compression == "tiff_jpeg":
1784
+ # OJPEG is obsolete, so use new-style JPEG compression instead
1785
+ compression = "jpeg"
1786
+ elif compression == "tiff_deflate":
1787
+ compression = "tiff_adobe_deflate"
1788
+
1789
+ libtiff = WRITE_LIBTIFF or compression != "raw"
1790
+
1791
+ # required for color libtiff images
1792
+ ifd[PLANAR_CONFIGURATION] = 1
1793
+
1794
+ ifd[IMAGEWIDTH] = im.size[0]
1795
+ ifd[IMAGELENGTH] = im.size[1]
1796
+
1797
+ # write any arbitrary tags passed in as an ImageFileDirectory
1798
+ if "tiffinfo" in encoderinfo:
1799
+ info = encoderinfo["tiffinfo"]
1800
+ elif "exif" in encoderinfo:
1801
+ info = encoderinfo["exif"]
1802
+ if isinstance(info, bytes):
1803
+ exif = Image.Exif()
1804
+ exif.load(info)
1805
+ info = exif
1806
+ else:
1807
+ info = {}
1808
+ logger.debug("Tiffinfo Keys: %s", list(info))
1809
+ if isinstance(info, ImageFileDirectory_v1):
1810
+ info = info.to_v2()
1811
+ for key in info:
1812
+ if isinstance(info, Image.Exif) and key in TiffTags.TAGS_V2_GROUPS:
1813
+ ifd[key] = info.get_ifd(key)
1814
+ else:
1815
+ ifd[key] = info.get(key)
1816
+ try:
1817
+ ifd.tagtype[key] = info.tagtype[key]
1818
+ except Exception:
1819
+ pass # might not be an IFD. Might not have populated type
1820
+
1821
+ legacy_ifd = {}
1822
+ if hasattr(im, "tag"):
1823
+ legacy_ifd = im.tag.to_v2()
1824
+
1825
+ supplied_tags = {**legacy_ifd, **getattr(im, "tag_v2", {})}
1826
+ if supplied_tags.get(PLANAR_CONFIGURATION) == 2 and EXTRASAMPLES in supplied_tags:
1827
+ # If the image used separate component planes,
1828
+ # then EXTRASAMPLES should be ignored when saving contiguously
1829
+ if SAMPLESPERPIXEL in supplied_tags:
1830
+ supplied_tags[SAMPLESPERPIXEL] -= len(supplied_tags[EXTRASAMPLES])
1831
+ del supplied_tags[EXTRASAMPLES]
1832
+ for tag in (
1833
+ # IFD offset that may not be correct in the saved image
1834
+ EXIFIFD,
1835
+ # Determined by the image format and should not be copied from legacy_ifd.
1836
+ SAMPLEFORMAT,
1837
+ ):
1838
+ if tag in supplied_tags:
1839
+ del supplied_tags[tag]
1840
+
1841
+ # additions written by Greg Couch, gregc@cgl.ucsf.edu
1842
+ # inspired by image-sig posting from Kevin Cazabon, kcazabon@home.com
1843
+ if hasattr(im, "tag_v2"):
1844
+ # preserve tags from original TIFF image file
1845
+ for key in (
1846
+ RESOLUTION_UNIT,
1847
+ X_RESOLUTION,
1848
+ Y_RESOLUTION,
1849
+ IPTC_NAA_CHUNK,
1850
+ PHOTOSHOP_CHUNK,
1851
+ XMP,
1852
+ ):
1853
+ if key in im.tag_v2:
1854
+ if key == IPTC_NAA_CHUNK and im.tag_v2.tagtype[key] not in (
1855
+ TiffTags.BYTE,
1856
+ TiffTags.UNDEFINED,
1857
+ ):
1858
+ del supplied_tags[key]
1859
+ else:
1860
+ ifd[key] = im.tag_v2[key]
1861
+ ifd.tagtype[key] = im.tag_v2.tagtype[key]
1862
+
1863
+ # preserve ICC profile (should also work when saving other formats
1864
+ # which support profiles as TIFF) -- 2008-06-06 Florian Hoech
1865
+ icc = encoderinfo.get("icc_profile", im.info.get("icc_profile"))
1866
+ if icc:
1867
+ ifd[ICCPROFILE] = icc
1868
+
1869
+ for key, name in [
1870
+ (IMAGEDESCRIPTION, "description"),
1871
+ (X_RESOLUTION, "resolution"),
1872
+ (Y_RESOLUTION, "resolution"),
1873
+ (X_RESOLUTION, "x_resolution"),
1874
+ (Y_RESOLUTION, "y_resolution"),
1875
+ (RESOLUTION_UNIT, "resolution_unit"),
1876
+ (SOFTWARE, "software"),
1877
+ (DATE_TIME, "date_time"),
1878
+ (ARTIST, "artist"),
1879
+ (COPYRIGHT, "copyright"),
1880
+ ]:
1881
+ if name in encoderinfo:
1882
+ ifd[key] = encoderinfo[name]
1883
+
1884
+ dpi = encoderinfo.get("dpi")
1885
+ if dpi:
1886
+ ifd[RESOLUTION_UNIT] = 2
1887
+ ifd[X_RESOLUTION] = dpi[0]
1888
+ ifd[Y_RESOLUTION] = dpi[1]
1889
+
1890
+ if bits != (1,):
1891
+ ifd[BITSPERSAMPLE] = bits
1892
+ if len(bits) != 1:
1893
+ ifd[SAMPLESPERPIXEL] = len(bits)
1894
+ if extra is not None:
1895
+ ifd[EXTRASAMPLES] = extra
1896
+ if format != 1:
1897
+ ifd[SAMPLEFORMAT] = format
1898
+
1899
+ if PHOTOMETRIC_INTERPRETATION not in ifd:
1900
+ ifd[PHOTOMETRIC_INTERPRETATION] = photo
1901
+ elif im.mode in ("1", "L") and ifd[PHOTOMETRIC_INTERPRETATION] == 0:
1902
+ if im.mode == "1":
1903
+ inverted_im = im.copy()
1904
+ px = inverted_im.load()
1905
+ if px is not None:
1906
+ for y in range(inverted_im.height):
1907
+ for x in range(inverted_im.width):
1908
+ px[x, y] = 0 if px[x, y] == 255 else 255
1909
+ im = inverted_im
1910
+ else:
1911
+ im = ImageOps.invert(im)
1912
+
1913
+ if im.mode in ["P", "PA"]:
1914
+ lut = im.im.getpalette("RGB", "RGB;L")
1915
+ colormap = []
1916
+ colors = len(lut) // 3
1917
+ for i in range(3):
1918
+ colormap += [v * 256 for v in lut[colors * i : colors * (i + 1)]]
1919
+ colormap += [0] * (256 - colors)
1920
+ ifd[COLORMAP] = colormap
1921
+ # data orientation
1922
+ w, h = ifd[IMAGEWIDTH], ifd[IMAGELENGTH]
1923
+ stride = len(bits) * ((w * bits[0] + 7) // 8)
1924
+ if ROWSPERSTRIP not in ifd:
1925
+ # aim for given strip size (64 KB by default) when using libtiff writer
1926
+ if libtiff:
1927
+ im_strip_size = encoderinfo.get("strip_size", STRIP_SIZE)
1928
+ rows_per_strip = 1 if stride == 0 else min(im_strip_size // stride, h)
1929
+ # JPEG encoder expects multiple of 8 rows
1930
+ if compression == "jpeg":
1931
+ rows_per_strip = min(((rows_per_strip + 7) // 8) * 8, h)
1932
+ else:
1933
+ rows_per_strip = h
1934
+ if rows_per_strip == 0:
1935
+ rows_per_strip = 1
1936
+ ifd[ROWSPERSTRIP] = rows_per_strip
1937
+ strip_byte_counts = 1 if stride == 0 else stride * ifd[ROWSPERSTRIP]
1938
+ strips_per_image = (h + ifd[ROWSPERSTRIP] - 1) // ifd[ROWSPERSTRIP]
1939
+ if strip_byte_counts >= 2**16:
1940
+ ifd.tagtype[STRIPBYTECOUNTS] = TiffTags.LONG
1941
+ ifd[STRIPBYTECOUNTS] = (strip_byte_counts,) * (strips_per_image - 1) + (
1942
+ stride * h - strip_byte_counts * (strips_per_image - 1),
1943
+ )
1944
+ ifd[STRIPOFFSETS] = tuple(
1945
+ range(0, strip_byte_counts * strips_per_image, strip_byte_counts)
1946
+ ) # this is adjusted by IFD writer
1947
+ # no compression by default:
1948
+ ifd[COMPRESSION] = COMPRESSION_INFO_REV.get(compression, 1)
1949
+
1950
+ if im.mode == "YCbCr":
1951
+ for tag, default_value in {
1952
+ YCBCRSUBSAMPLING: (1, 1),
1953
+ REFERENCEBLACKWHITE: (0, 255, 128, 255, 128, 255),
1954
+ }.items():
1955
+ ifd.setdefault(tag, default_value)
1956
+
1957
+ blocklist = [TILEWIDTH, TILELENGTH, TILEOFFSETS, TILEBYTECOUNTS]
1958
+ if libtiff:
1959
+ if "quality" in encoderinfo:
1960
+ quality = encoderinfo["quality"]
1961
+ if not isinstance(quality, int) or quality < 0 or quality > 100:
1962
+ msg = "Invalid quality setting"
1963
+ raise ValueError(msg)
1964
+ if compression != "jpeg":
1965
+ msg = "quality setting only supported for 'jpeg' compression"
1966
+ raise ValueError(msg)
1967
+ ifd[JPEGQUALITY] = quality
1968
+
1969
+ logger.debug("Saving using libtiff encoder")
1970
+ logger.debug("Items: %s", sorted(ifd.items()))
1971
+ _fp = 0
1972
+ if hasattr(fp, "fileno"):
1973
+ try:
1974
+ fp.seek(0)
1975
+ _fp = fp.fileno()
1976
+ except io.UnsupportedOperation:
1977
+ pass
1978
+
1979
+ # optional types for non core tags
1980
+ types = {}
1981
+ # STRIPOFFSETS and STRIPBYTECOUNTS are added by the library
1982
+ # based on the data in the strip.
1983
+ # OSUBFILETYPE is deprecated.
1984
+ # TRANSFERFUNCTION is not supported by the libtiff encoder.
1985
+ # SUBIFD may also cause a segfault.
1986
+ blocklist += [
1987
+ OSUBFILETYPE,
1988
+ STRIPBYTECOUNTS,
1989
+ STRIPOFFSETS,
1990
+ TRANSFERFUNCTION,
1991
+ SUBIFD,
1992
+ ]
1993
+
1994
+ # bits per sample is a single short in the tiff directory, not a list.
1995
+ atts: dict[int, Any] = {BITSPERSAMPLE: bits[0]}
1996
+ # Merge the ones that we have with (optional) more bits from
1997
+ # the original file, e.g x,y resolution so that we can
1998
+ # save(load('')) == original file.
1999
+ for tag, value in itertools.chain(ifd.items(), supplied_tags.items()):
2000
+ # Libtiff can only process certain core items without adding
2001
+ # them to the custom dictionary.
2002
+ # Custom items are supported for int, float, unicode, string and byte
2003
+ # values. Other types and tuples require a tagtype.
2004
+ if tag not in TiffTags.LIBTIFF_CORE:
2005
+ if tag in TiffTags.TAGS_V2_GROUPS:
2006
+ types[tag] = TiffTags.LONG8
2007
+ elif tag in ifd.tagtype:
2008
+ types[tag] = ifd.tagtype[tag]
2009
+ elif isinstance(value, (int, float, str, bytes)) or (
2010
+ isinstance(value, tuple)
2011
+ and all(isinstance(v, (int, float, IFDRational)) for v in value)
2012
+ ):
2013
+ type = TiffTags.lookup(tag).type
2014
+ if type:
2015
+ types[tag] = type
2016
+ if tag not in atts and tag not in blocklist:
2017
+ if isinstance(value, str):
2018
+ atts[tag] = value.encode("ascii", "replace") + b"\0"
2019
+ elif isinstance(value, IFDRational):
2020
+ atts[tag] = float(value)
2021
+ else:
2022
+ atts[tag] = value
2023
+
2024
+ if SAMPLEFORMAT in atts and len(atts[SAMPLEFORMAT]) == 1:
2025
+ atts[SAMPLEFORMAT] = atts[SAMPLEFORMAT][0]
2026
+ _validate_tags(atts)
2027
+
2028
+ logger.debug("Converted items: %s", sorted(atts.items()))
2029
+
2030
+ # libtiff always expects the bytes in native order.
2031
+ # we're storing image byte order. So, if the rawmode
2032
+ # contains I;16, we need to convert from native to image
2033
+ # byte order.
2034
+ if im.mode in ("I;16", "I;16B", "I;16L"):
2035
+ rawmode = "I;16N"
2036
+
2037
+ # Pass tags as sorted list so that the tags are set in a fixed order.
2038
+ # This is required by libtiff for some tags. For example, the JPEGQUALITY
2039
+ # pseudo tag requires that the COMPRESS tag was already set.
2040
+ tags = list(atts.items())
2041
+ tags.sort()
2042
+ a = (rawmode, _fp, filename, tags, types)
2043
+ encoder = Image._getencoder(im.mode, "libtiff", a, encoderconfig)
2044
+ try:
2045
+ encoder.setimage(im.im, (0, 0, *im.size))
2046
+ while True:
2047
+ errcode, data = encoder.encode(ImageFile.MAXBLOCK)[1:]
2048
+ if not _fp:
2049
+ fp.write(data)
2050
+ if errcode:
2051
+ break
2052
+ if errcode < 0:
2053
+ msg = f"encoder error {errcode} when writing image file"
2054
+ raise OSError(msg)
2055
+ finally:
2056
+ encoder.cleanup()
2057
+
2058
+ else:
2059
+ for tag in blocklist:
2060
+ del ifd[tag]
2061
+ _validate_tags(ifd._tags_v2)
2062
+ offset = ifd.save(fp)
2063
+
2064
+ ImageFile._save(
2065
+ im,
2066
+ fp,
2067
+ [ImageFile._Tile("raw", (0, 0, *im.size), offset, (rawmode, stride, 1))],
2068
+ )
2069
+
2070
+ # -- helper for multi-page save --
2071
+ if "_debug_multipage" in encoderinfo:
2072
+ # just to access o32 and o16 (using correct byte order)
2073
+ setattr(im, "_debug_multipage", ifd)
2074
+
2075
+
2076
+ class AppendingTiffWriter(io.BytesIO):
2077
+ fieldSizes = [
2078
+ 0, # None
2079
+ 1, # byte
2080
+ 1, # ascii
2081
+ 2, # short
2082
+ 4, # long
2083
+ 8, # rational
2084
+ 1, # sbyte
2085
+ 1, # undefined
2086
+ 2, # sshort
2087
+ 4, # slong
2088
+ 8, # srational
2089
+ 4, # float
2090
+ 8, # double
2091
+ 4, # ifd
2092
+ 2, # unicode
2093
+ 4, # complex
2094
+ 8, # long8
2095
+ ]
2096
+
2097
+ Tags = {
2098
+ 273, # StripOffsets
2099
+ 288, # FreeOffsets
2100
+ 324, # TileOffsets
2101
+ 519, # JPEGQTables
2102
+ 520, # JPEGDCTables
2103
+ 521, # JPEGACTables
2104
+ }
2105
+
2106
+ def __init__(self, fn: StrOrBytesPath | IO[bytes], new: bool = False) -> None:
2107
+ self.f: IO[bytes]
2108
+ if is_path(fn):
2109
+ self.name = fn
2110
+ self.close_fp = True
2111
+ try:
2112
+ self.f = open(fn, "w+b" if new else "r+b")
2113
+ except OSError:
2114
+ self.f = open(fn, "w+b")
2115
+ else:
2116
+ self.f = cast("IO[bytes]", fn)
2117
+ self.close_fp = False
2118
+ self.beginning = self.f.tell()
2119
+ self.setup()
2120
+
2121
+ def setup(self) -> None:
2122
+ # Reset everything.
2123
+ self.f.seek(self.beginning, os.SEEK_SET)
2124
+
2125
+ self.whereToWriteNewIFDOffset: int | None = None
2126
+ self.offsetOfNewPage = 0
2127
+
2128
+ self.IIMM = iimm = self.f.read(4)
2129
+ self._bigtiff = b"\x2b" in iimm
2130
+ if not iimm:
2131
+ # empty file - first page
2132
+ self.isFirst = True
2133
+ return
2134
+
2135
+ self.isFirst = False
2136
+ if iimm not in PREFIXES:
2137
+ msg = "Invalid TIFF file header"
2138
+ raise RuntimeError(msg)
2139
+
2140
+ self.setEndian("<" if iimm.startswith(II) else ">")
2141
+
2142
+ if self._bigtiff:
2143
+ self.f.seek(4, os.SEEK_CUR)
2144
+ self.skipIFDs()
2145
+ self.goToEnd()
2146
+
2147
+ def finalize(self) -> None:
2148
+ if self.isFirst:
2149
+ return
2150
+
2151
+ # fix offsets
2152
+ self.f.seek(self.offsetOfNewPage)
2153
+
2154
+ iimm = self.f.read(4)
2155
+ if not iimm:
2156
+ # Make it easy to finish a frame without committing to a new one.
2157
+ return
2158
+
2159
+ if iimm != self.IIMM:
2160
+ msg = "IIMM of new page doesn't match IIMM of first page"
2161
+ raise RuntimeError(msg)
2162
+
2163
+ if self._bigtiff:
2164
+ self.f.seek(4, os.SEEK_CUR)
2165
+ ifd_offset = self._read(8 if self._bigtiff else 4)
2166
+ ifd_offset += self.offsetOfNewPage
2167
+ assert self.whereToWriteNewIFDOffset is not None
2168
+ self.f.seek(self.whereToWriteNewIFDOffset)
2169
+ self._write(ifd_offset, 8 if self._bigtiff else 4)
2170
+ self.f.seek(ifd_offset)
2171
+ self.fixIFD()
2172
+
2173
+ def newFrame(self) -> None:
2174
+ # Call this to finish a frame.
2175
+ self.finalize()
2176
+ self.setup()
2177
+
2178
+ def __enter__(self) -> Self:
2179
+ return self
2180
+
2181
+ def __exit__(self, *args: object) -> None:
2182
+ if self.close_fp:
2183
+ self.close()
2184
+
2185
+ def tell(self) -> int:
2186
+ return self.f.tell() - self.offsetOfNewPage
2187
+
2188
+ def seek(self, offset: int, whence: int = io.SEEK_SET) -> int:
2189
+ """
2190
+ :param offset: Distance to seek.
2191
+ :param whence: Whether the distance is relative to the start,
2192
+ end or current position.
2193
+ :returns: The resulting position, relative to the start.
2194
+ """
2195
+ if whence == os.SEEK_SET:
2196
+ offset += self.offsetOfNewPage
2197
+
2198
+ self.f.seek(offset, whence)
2199
+ return self.tell()
2200
+
2201
+ def goToEnd(self) -> None:
2202
+ self.f.seek(0, os.SEEK_END)
2203
+ pos = self.f.tell()
2204
+
2205
+ # pad to 16 byte boundary
2206
+ pad_bytes = 16 - pos % 16
2207
+ if 0 < pad_bytes < 16:
2208
+ self.f.write(bytes(pad_bytes))
2209
+ self.offsetOfNewPage = self.f.tell()
2210
+
2211
+ def setEndian(self, endian: str) -> None:
2212
+ self.endian = endian
2213
+ self.longFmt = f"{self.endian}L"
2214
+ self.shortFmt = f"{self.endian}H"
2215
+ self.tagFormat = f"{self.endian}HH" + ("Q" if self._bigtiff else "L")
2216
+
2217
+ def skipIFDs(self) -> None:
2218
+ while True:
2219
+ ifd_offset = self._read(8 if self._bigtiff else 4)
2220
+ if ifd_offset == 0:
2221
+ self.whereToWriteNewIFDOffset = self.f.tell() - (
2222
+ 8 if self._bigtiff else 4
2223
+ )
2224
+ break
2225
+
2226
+ self.f.seek(ifd_offset)
2227
+ num_tags = self._read(8 if self._bigtiff else 2)
2228
+ self.f.seek(num_tags * (20 if self._bigtiff else 12), os.SEEK_CUR)
2229
+
2230
+ def write(self, data: Buffer, /) -> int:
2231
+ return self.f.write(data)
2232
+
2233
+ def _fmt(self, field_size: int) -> str:
2234
+ try:
2235
+ return {2: "H", 4: "L", 8: "Q"}[field_size]
2236
+ except KeyError:
2237
+ msg = "offset is not supported"
2238
+ raise RuntimeError(msg)
2239
+
2240
+ def _read(self, field_size: int) -> int:
2241
+ (value,) = struct.unpack(
2242
+ self.endian + self._fmt(field_size), self.f.read(field_size)
2243
+ )
2244
+ return value
2245
+
2246
+ def readShort(self) -> int:
2247
+ return self._read(2)
2248
+
2249
+ def readLong(self) -> int:
2250
+ return self._read(4)
2251
+
2252
+ @staticmethod
2253
+ def _verify_bytes_written(bytes_written: int | None, expected: int) -> None:
2254
+ if bytes_written is not None and bytes_written != expected:
2255
+ msg = f"wrote only {bytes_written} bytes but wanted {expected}"
2256
+ raise RuntimeError(msg)
2257
+
2258
+ def _rewriteLast(
2259
+ self, value: int, field_size: int, new_field_size: int = 0
2260
+ ) -> None:
2261
+ self.f.seek(-field_size, os.SEEK_CUR)
2262
+ if not new_field_size:
2263
+ new_field_size = field_size
2264
+ bytes_written = self.f.write(
2265
+ struct.pack(self.endian + self._fmt(new_field_size), value)
2266
+ )
2267
+ self._verify_bytes_written(bytes_written, new_field_size)
2268
+
2269
+ def rewriteLastShortToLong(self, value: int) -> None:
2270
+ self._rewriteLast(value, 2, 4)
2271
+
2272
+ def rewriteLastShort(self, value: int) -> None:
2273
+ return self._rewriteLast(value, 2)
2274
+
2275
+ def rewriteLastLong(self, value: int) -> None:
2276
+ return self._rewriteLast(value, 4)
2277
+
2278
+ def _write(self, value: int, field_size: int) -> None:
2279
+ bytes_written = self.f.write(
2280
+ struct.pack(self.endian + self._fmt(field_size), value)
2281
+ )
2282
+ self._verify_bytes_written(bytes_written, field_size)
2283
+
2284
+ def writeShort(self, value: int) -> None:
2285
+ self._write(value, 2)
2286
+
2287
+ def writeLong(self, value: int) -> None:
2288
+ self._write(value, 4)
2289
+
2290
+ def close(self) -> None:
2291
+ self.finalize()
2292
+ if self.close_fp:
2293
+ self.f.close()
2294
+
2295
+ def fixIFD(self) -> None:
2296
+ num_tags = self._read(8 if self._bigtiff else 2)
2297
+
2298
+ for i in range(num_tags):
2299
+ tag, field_type, count = struct.unpack(
2300
+ self.tagFormat, self.f.read(12 if self._bigtiff else 8)
2301
+ )
2302
+
2303
+ field_size = self.fieldSizes[field_type]
2304
+ total_size = field_size * count
2305
+ fmt_size = 8 if self._bigtiff else 4
2306
+ is_local = total_size <= fmt_size
2307
+ if not is_local:
2308
+ offset = self._read(fmt_size) + self.offsetOfNewPage
2309
+ self._rewriteLast(offset, fmt_size)
2310
+
2311
+ if tag in self.Tags:
2312
+ cur_pos = self.f.tell()
2313
+
2314
+ logger.debug(
2315
+ "fixIFD: %s (%d) - type: %s (%d) - type size: %d - count: %d",
2316
+ TiffTags.lookup(tag).name,
2317
+ tag,
2318
+ TYPES.get(field_type, "unknown"),
2319
+ field_type,
2320
+ field_size,
2321
+ count,
2322
+ )
2323
+
2324
+ if is_local:
2325
+ self._fixOffsets(count, field_size)
2326
+ self.f.seek(cur_pos + fmt_size)
2327
+ else:
2328
+ self.f.seek(offset)
2329
+ self._fixOffsets(count, field_size)
2330
+ self.f.seek(cur_pos)
2331
+
2332
+ elif is_local:
2333
+ # skip the locally stored value that is not an offset
2334
+ self.f.seek(fmt_size, os.SEEK_CUR)
2335
+
2336
+ def _fixOffsets(self, count: int, field_size: int) -> None:
2337
+ for i in range(count):
2338
+ offset = self._read(field_size)
2339
+ offset += self.offsetOfNewPage
2340
+
2341
+ new_field_size = 0
2342
+ if self._bigtiff and field_size in (2, 4) and offset >= 2**32:
2343
+ # offset is now too large - we must convert long to long8
2344
+ new_field_size = 8
2345
+ elif field_size == 2 and offset >= 2**16:
2346
+ # offset is now too large - we must convert short to long
2347
+ new_field_size = 4
2348
+ if new_field_size:
2349
+ if count != 1:
2350
+ msg = "not implemented"
2351
+ raise RuntimeError(msg) # XXX TODO
2352
+
2353
+ # simple case - the offset is just one and therefore it is
2354
+ # local (not referenced with another offset)
2355
+ self._rewriteLast(offset, field_size, new_field_size)
2356
+ # Move back past the new offset, past 'count', and before 'field_type'
2357
+ rewind = -new_field_size - 4 - 2
2358
+ self.f.seek(rewind, os.SEEK_CUR)
2359
+ self.writeShort(new_field_size) # rewrite the type
2360
+ self.f.seek(2 - rewind, os.SEEK_CUR)
2361
+ else:
2362
+ self._rewriteLast(offset, field_size)
2363
+
2364
+ def fixOffsets(
2365
+ self, count: int, isShort: bool = False, isLong: bool = False
2366
+ ) -> None:
2367
+ if isShort:
2368
+ field_size = 2
2369
+ elif isLong:
2370
+ field_size = 4
2371
+ else:
2372
+ field_size = 0
2373
+ return self._fixOffsets(count, field_size)
2374
+
2375
+
2376
+ def _save_all(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
2377
+ append_images = list(im.encoderinfo.get("append_images", []))
2378
+ if not hasattr(im, "n_frames") and not append_images:
2379
+ return _save(im, fp, filename)
2380
+
2381
+ cur_idx = im.tell()
2382
+ try:
2383
+ with AppendingTiffWriter(fp) as tf:
2384
+ for ims in [im] + append_images:
2385
+ encoderinfo = ims._attach_default_encoderinfo(im)
2386
+ if not hasattr(ims, "encoderconfig"):
2387
+ ims.encoderconfig = ()
2388
+ nfr = getattr(ims, "n_frames", 1)
2389
+
2390
+ for idx in range(nfr):
2391
+ ims.seek(idx)
2392
+ ims.load()
2393
+ _save(ims, tf, filename)
2394
+ tf.newFrame()
2395
+ ims.encoderinfo = encoderinfo
2396
+ finally:
2397
+ im.seek(cur_idx)
2398
+
2399
+
2400
+ #
2401
+ # --------------------------------------------------------------------
2402
+ # Register
2403
+
2404
+ Image.register_open(TiffImageFile.format, TiffImageFile, _accept)
2405
+ Image.register_save(TiffImageFile.format, _save)
2406
+ Image.register_save_all(TiffImageFile.format, _save_all)
2407
+
2408
+ Image.register_extensions(TiffImageFile.format, [".tif", ".tiff"])
2409
+
2410
+ Image.register_mime(TiffImageFile.format, "image/tiff")