cmpuiforoath 0.0.1-security → 1.1.4

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.

Potentially problematic release.


This version of cmpuiforoath might be problematic. Click here for more details.

Files changed (865) hide show
  1. package/example.py +3 -0
  2. package/index.js +81 -0
  3. package/package.json +35 -3
  4. package/testenv/bin/Activate.ps1 +247 -0
  5. package/testenv/bin/activate +71 -0
  6. package/testenv/bin/activate.csh +27 -0
  7. package/testenv/bin/activate.fish +69 -0
  8. package/testenv/bin/pip +8 -0
  9. package/testenv/bin/pip3 +8 -0
  10. package/testenv/bin/pip3.12 +8 -0
  11. package/testenv/lib/python3.12/site-packages/pip/__init__.py +13 -0
  12. package/testenv/lib/python3.12/site-packages/pip/__main__.py +24 -0
  13. package/testenv/lib/python3.12/site-packages/pip/__pip-runner__.py +50 -0
  14. package/testenv/lib/python3.12/site-packages/pip/__pycache__/__init__.cpython-312.pyc +0 -0
  15. package/testenv/lib/python3.12/site-packages/pip/__pycache__/__main__.cpython-312.pyc +0 -0
  16. package/testenv/lib/python3.12/site-packages/pip/__pycache__/__pip-runner__.cpython-312.pyc +0 -0
  17. package/testenv/lib/python3.12/site-packages/pip/_internal/__init__.py +18 -0
  18. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/__init__.cpython-312.pyc +0 -0
  19. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/build_env.cpython-312.pyc +0 -0
  20. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/cache.cpython-312.pyc +0 -0
  21. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/configuration.cpython-312.pyc +0 -0
  22. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/exceptions.cpython-312.pyc +0 -0
  23. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/main.cpython-312.pyc +0 -0
  24. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/pyproject.cpython-312.pyc +0 -0
  25. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/self_outdated_check.cpython-312.pyc +0 -0
  26. package/testenv/lib/python3.12/site-packages/pip/_internal/__pycache__/wheel_builder.cpython-312.pyc +0 -0
  27. package/testenv/lib/python3.12/site-packages/pip/_internal/build_env.py +323 -0
  28. package/testenv/lib/python3.12/site-packages/pip/_internal/cache.py +290 -0
  29. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__init__.py +4 -0
  30. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/__init__.cpython-312.pyc +0 -0
  31. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/autocompletion.cpython-312.pyc +0 -0
  32. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/base_command.cpython-312.pyc +0 -0
  33. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/cmdoptions.cpython-312.pyc +0 -0
  34. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/command_context.cpython-312.pyc +0 -0
  35. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/index_command.cpython-312.pyc +0 -0
  36. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main.cpython-312.pyc +0 -0
  37. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/main_parser.cpython-312.pyc +0 -0
  38. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/parser.cpython-312.pyc +0 -0
  39. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/progress_bars.cpython-312.pyc +0 -0
  40. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/req_command.cpython-312.pyc +0 -0
  41. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/spinners.cpython-312.pyc +0 -0
  42. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/__pycache__/status_codes.cpython-312.pyc +0 -0
  43. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py +176 -0
  44. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/base_command.py +240 -0
  45. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py +1075 -0
  46. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/command_context.py +27 -0
  47. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/index_command.py +171 -0
  48. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/main.py +80 -0
  49. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py +134 -0
  50. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/parser.py +294 -0
  51. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/progress_bars.py +94 -0
  52. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/req_command.py +329 -0
  53. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/spinners.py +159 -0
  54. package/testenv/lib/python3.12/site-packages/pip/_internal/cli/status_codes.py +6 -0
  55. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__init__.py +132 -0
  56. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/__init__.cpython-312.pyc +0 -0
  57. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/cache.cpython-312.pyc +0 -0
  58. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/check.cpython-312.pyc +0 -0
  59. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/completion.cpython-312.pyc +0 -0
  60. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/configuration.cpython-312.pyc +0 -0
  61. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/debug.cpython-312.pyc +0 -0
  62. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/download.cpython-312.pyc +0 -0
  63. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/freeze.cpython-312.pyc +0 -0
  64. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/hash.cpython-312.pyc +0 -0
  65. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/help.cpython-312.pyc +0 -0
  66. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/index.cpython-312.pyc +0 -0
  67. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/inspect.cpython-312.pyc +0 -0
  68. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/install.cpython-312.pyc +0 -0
  69. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/list.cpython-312.pyc +0 -0
  70. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/search.cpython-312.pyc +0 -0
  71. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/show.cpython-312.pyc +0 -0
  72. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/uninstall.cpython-312.pyc +0 -0
  73. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/__pycache__/wheel.cpython-312.pyc +0 -0
  74. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/cache.py +228 -0
  75. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/check.py +67 -0
  76. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/completion.py +130 -0
  77. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/configuration.py +280 -0
  78. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/debug.py +201 -0
  79. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/download.py +146 -0
  80. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/freeze.py +110 -0
  81. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/hash.py +59 -0
  82. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/help.py +41 -0
  83. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/index.py +139 -0
  84. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/inspect.py +92 -0
  85. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/install.py +784 -0
  86. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/list.py +377 -0
  87. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/search.py +172 -0
  88. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/show.py +224 -0
  89. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/uninstall.py +114 -0
  90. package/testenv/lib/python3.12/site-packages/pip/_internal/commands/wheel.py +182 -0
  91. package/testenv/lib/python3.12/site-packages/pip/_internal/configuration.py +383 -0
  92. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/__init__.py +21 -0
  93. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/__init__.cpython-312.pyc +0 -0
  94. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/base.cpython-312.pyc +0 -0
  95. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/installed.cpython-312.pyc +0 -0
  96. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/sdist.cpython-312.pyc +0 -0
  97. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/__pycache__/wheel.cpython-312.pyc +0 -0
  98. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/base.py +53 -0
  99. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/installed.py +29 -0
  100. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/sdist.py +158 -0
  101. package/testenv/lib/python3.12/site-packages/pip/_internal/distributions/wheel.py +42 -0
  102. package/testenv/lib/python3.12/site-packages/pip/_internal/exceptions.py +809 -0
  103. package/testenv/lib/python3.12/site-packages/pip/_internal/index/__init__.py +2 -0
  104. package/testenv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/__init__.cpython-312.pyc +0 -0
  105. package/testenv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/collector.cpython-312.pyc +0 -0
  106. package/testenv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/package_finder.cpython-312.pyc +0 -0
  107. package/testenv/lib/python3.12/site-packages/pip/_internal/index/__pycache__/sources.cpython-312.pyc +0 -0
  108. package/testenv/lib/python3.12/site-packages/pip/_internal/index/collector.py +494 -0
  109. package/testenv/lib/python3.12/site-packages/pip/_internal/index/package_finder.py +1029 -0
  110. package/testenv/lib/python3.12/site-packages/pip/_internal/index/sources.py +284 -0
  111. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/__init__.py +456 -0
  112. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/__init__.cpython-312.pyc +0 -0
  113. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_distutils.cpython-312.pyc +0 -0
  114. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/_sysconfig.cpython-312.pyc +0 -0
  115. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/__pycache__/base.cpython-312.pyc +0 -0
  116. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/_distutils.py +172 -0
  117. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/_sysconfig.py +214 -0
  118. package/testenv/lib/python3.12/site-packages/pip/_internal/locations/base.py +81 -0
  119. package/testenv/lib/python3.12/site-packages/pip/_internal/main.py +12 -0
  120. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/__init__.py +128 -0
  121. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/__init__.cpython-312.pyc +0 -0
  122. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/_json.cpython-312.pyc +0 -0
  123. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/base.cpython-312.pyc +0 -0
  124. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/__pycache__/pkg_resources.cpython-312.pyc +0 -0
  125. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/_json.py +86 -0
  126. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/base.py +688 -0
  127. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__init__.py +6 -0
  128. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/__init__.cpython-312.pyc +0 -0
  129. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_compat.cpython-312.pyc +0 -0
  130. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_dists.cpython-312.pyc +0 -0
  131. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/__pycache__/_envs.cpython-312.pyc +0 -0
  132. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_compat.py +85 -0
  133. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py +227 -0
  134. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py +189 -0
  135. package/testenv/lib/python3.12/site-packages/pip/_internal/metadata/pkg_resources.py +301 -0
  136. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__init__.py +2 -0
  137. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/__init__.cpython-312.pyc +0 -0
  138. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/candidate.cpython-312.pyc +0 -0
  139. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/direct_url.cpython-312.pyc +0 -0
  140. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/format_control.cpython-312.pyc +0 -0
  141. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/index.cpython-312.pyc +0 -0
  142. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/installation_report.cpython-312.pyc +0 -0
  143. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/link.cpython-312.pyc +0 -0
  144. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/scheme.cpython-312.pyc +0 -0
  145. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/search_scope.cpython-312.pyc +0 -0
  146. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/selection_prefs.cpython-312.pyc +0 -0
  147. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/target_python.cpython-312.pyc +0 -0
  148. package/testenv/lib/python3.12/site-packages/pip/_internal/models/__pycache__/wheel.cpython-312.pyc +0 -0
  149. package/testenv/lib/python3.12/site-packages/pip/_internal/models/candidate.py +25 -0
  150. package/testenv/lib/python3.12/site-packages/pip/_internal/models/direct_url.py +224 -0
  151. package/testenv/lib/python3.12/site-packages/pip/_internal/models/format_control.py +78 -0
  152. package/testenv/lib/python3.12/site-packages/pip/_internal/models/index.py +28 -0
  153. package/testenv/lib/python3.12/site-packages/pip/_internal/models/installation_report.py +56 -0
  154. package/testenv/lib/python3.12/site-packages/pip/_internal/models/link.py +604 -0
  155. package/testenv/lib/python3.12/site-packages/pip/_internal/models/scheme.py +25 -0
  156. package/testenv/lib/python3.12/site-packages/pip/_internal/models/search_scope.py +127 -0
  157. package/testenv/lib/python3.12/site-packages/pip/_internal/models/selection_prefs.py +53 -0
  158. package/testenv/lib/python3.12/site-packages/pip/_internal/models/target_python.py +121 -0
  159. package/testenv/lib/python3.12/site-packages/pip/_internal/models/wheel.py +118 -0
  160. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__init__.py +2 -0
  161. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/__init__.cpython-312.pyc +0 -0
  162. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/auth.cpython-312.pyc +0 -0
  163. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/cache.cpython-312.pyc +0 -0
  164. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/download.cpython-312.pyc +0 -0
  165. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/lazy_wheel.cpython-312.pyc +0 -0
  166. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/session.cpython-312.pyc +0 -0
  167. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/utils.cpython-312.pyc +0 -0
  168. package/testenv/lib/python3.12/site-packages/pip/_internal/network/__pycache__/xmlrpc.cpython-312.pyc +0 -0
  169. package/testenv/lib/python3.12/site-packages/pip/_internal/network/auth.py +566 -0
  170. package/testenv/lib/python3.12/site-packages/pip/_internal/network/cache.py +118 -0
  171. package/testenv/lib/python3.12/site-packages/pip/_internal/network/download.py +187 -0
  172. package/testenv/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.py +210 -0
  173. package/testenv/lib/python3.12/site-packages/pip/_internal/network/session.py +523 -0
  174. package/testenv/lib/python3.12/site-packages/pip/_internal/network/utils.py +98 -0
  175. package/testenv/lib/python3.12/site-packages/pip/_internal/network/xmlrpc.py +62 -0
  176. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/__init__.py +0 -0
  177. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/__init__.cpython-312.pyc +0 -0
  178. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/check.cpython-312.pyc +0 -0
  179. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/freeze.cpython-312.pyc +0 -0
  180. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/__pycache__/prepare.cpython-312.pyc +0 -0
  181. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  182. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/__init__.cpython-312.pyc +0 -0
  183. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/build_tracker.cpython-312.pyc +0 -0
  184. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata.cpython-312.pyc +0 -0
  185. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_editable.cpython-312.pyc +0 -0
  186. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/metadata_legacy.cpython-312.pyc +0 -0
  187. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel.cpython-312.pyc +0 -0
  188. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_editable.cpython-312.pyc +0 -0
  189. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/__pycache__/wheel_legacy.cpython-312.pyc +0 -0
  190. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/build_tracker.py +138 -0
  191. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/metadata.py +39 -0
  192. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_editable.py +42 -0
  193. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/metadata_legacy.py +74 -0
  194. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel.py +37 -0
  195. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_editable.py +46 -0
  196. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/build/wheel_legacy.py +102 -0
  197. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/check.py +181 -0
  198. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/freeze.py +256 -0
  199. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/install/__init__.py +2 -0
  200. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/__init__.cpython-312.pyc +0 -0
  201. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/editable_legacy.cpython-312.pyc +0 -0
  202. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/install/__pycache__/wheel.cpython-312.pyc +0 -0
  203. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/install/editable_legacy.py +47 -0
  204. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/install/wheel.py +741 -0
  205. package/testenv/lib/python3.12/site-packages/pip/_internal/operations/prepare.py +732 -0
  206. package/testenv/lib/python3.12/site-packages/pip/_internal/pyproject.py +185 -0
  207. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__init__.py +90 -0
  208. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/__init__.cpython-312.pyc +0 -0
  209. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/constructors.cpython-312.pyc +0 -0
  210. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_file.cpython-312.pyc +0 -0
  211. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_install.cpython-312.pyc +0 -0
  212. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_set.cpython-312.pyc +0 -0
  213. package/testenv/lib/python3.12/site-packages/pip/_internal/req/__pycache__/req_uninstall.cpython-312.pyc +0 -0
  214. package/testenv/lib/python3.12/site-packages/pip/_internal/req/constructors.py +560 -0
  215. package/testenv/lib/python3.12/site-packages/pip/_internal/req/req_file.py +623 -0
  216. package/testenv/lib/python3.12/site-packages/pip/_internal/req/req_install.py +934 -0
  217. package/testenv/lib/python3.12/site-packages/pip/_internal/req/req_set.py +82 -0
  218. package/testenv/lib/python3.12/site-packages/pip/_internal/req/req_uninstall.py +633 -0
  219. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/__init__.py +0 -0
  220. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/__init__.cpython-312.pyc +0 -0
  221. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/__pycache__/base.cpython-312.pyc +0 -0
  222. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/base.py +20 -0
  223. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  224. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/__init__.cpython-312.pyc +0 -0
  225. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/__pycache__/resolver.cpython-312.pyc +0 -0
  226. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/legacy/resolver.py +597 -0
  227. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  228. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/__init__.cpython-312.pyc +0 -0
  229. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/base.cpython-312.pyc +0 -0
  230. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/candidates.cpython-312.pyc +0 -0
  231. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/factory.cpython-312.pyc +0 -0
  232. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/found_candidates.cpython-312.pyc +0 -0
  233. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/provider.cpython-312.pyc +0 -0
  234. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/reporter.cpython-312.pyc +0 -0
  235. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/requirements.cpython-312.pyc +0 -0
  236. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/__pycache__/resolver.cpython-312.pyc +0 -0
  237. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.py +139 -0
  238. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/candidates.py +574 -0
  239. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/factory.py +823 -0
  240. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +174 -0
  241. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/provider.py +258 -0
  242. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/reporter.py +81 -0
  243. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/requirements.py +245 -0
  244. package/testenv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/resolver.py +317 -0
  245. package/testenv/lib/python3.12/site-packages/pip/_internal/self_outdated_check.py +252 -0
  246. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__init__.py +0 -0
  247. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  248. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_jaraco_text.cpython-312.pyc +0 -0
  249. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/_log.cpython-312.pyc +0 -0
  250. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/appdirs.cpython-312.pyc +0 -0
  251. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compat.cpython-312.pyc +0 -0
  252. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/compatibility_tags.cpython-312.pyc +0 -0
  253. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/datetime.cpython-312.pyc +0 -0
  254. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/deprecation.cpython-312.pyc +0 -0
  255. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/direct_url_helpers.cpython-312.pyc +0 -0
  256. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/egg_link.cpython-312.pyc +0 -0
  257. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/entrypoints.cpython-312.pyc +0 -0
  258. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filesystem.cpython-312.pyc +0 -0
  259. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/filetypes.cpython-312.pyc +0 -0
  260. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/glibc.cpython-312.pyc +0 -0
  261. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/hashes.cpython-312.pyc +0 -0
  262. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/logging.cpython-312.pyc +0 -0
  263. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/misc.cpython-312.pyc +0 -0
  264. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/packaging.cpython-312.pyc +0 -0
  265. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/retry.cpython-312.pyc +0 -0
  266. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/setuptools_build.cpython-312.pyc +0 -0
  267. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/subprocess.cpython-312.pyc +0 -0
  268. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/temp_dir.cpython-312.pyc +0 -0
  269. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/unpacking.cpython-312.pyc +0 -0
  270. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/urls.cpython-312.pyc +0 -0
  271. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-312.pyc +0 -0
  272. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/__pycache__/wheel.cpython-312.pyc +0 -0
  273. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
  274. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/_log.py +38 -0
  275. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/appdirs.py +52 -0
  276. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/compat.py +79 -0
  277. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/compatibility_tags.py +188 -0
  278. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/datetime.py +11 -0
  279. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/deprecation.py +124 -0
  280. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
  281. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/egg_link.py +80 -0
  282. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/entrypoints.py +84 -0
  283. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/filesystem.py +149 -0
  284. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/filetypes.py +27 -0
  285. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/glibc.py +101 -0
  286. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/hashes.py +147 -0
  287. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/logging.py +354 -0
  288. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/misc.py +773 -0
  289. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/packaging.py +58 -0
  290. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/retry.py +42 -0
  291. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/setuptools_build.py +146 -0
  292. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/subprocess.py +245 -0
  293. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/temp_dir.py +296 -0
  294. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/unpacking.py +337 -0
  295. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/urls.py +55 -0
  296. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/virtualenv.py +104 -0
  297. package/testenv/lib/python3.12/site-packages/pip/_internal/utils/wheel.py +134 -0
  298. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__init__.py +15 -0
  299. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/__init__.cpython-312.pyc +0 -0
  300. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/bazaar.cpython-312.pyc +0 -0
  301. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/git.cpython-312.pyc +0 -0
  302. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/mercurial.cpython-312.pyc +0 -0
  303. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/subversion.cpython-312.pyc +0 -0
  304. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/__pycache__/versioncontrol.cpython-312.pyc +0 -0
  305. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/bazaar.py +112 -0
  306. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/git.py +527 -0
  307. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/mercurial.py +163 -0
  308. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/subversion.py +324 -0
  309. package/testenv/lib/python3.12/site-packages/pip/_internal/vcs/versioncontrol.py +688 -0
  310. package/testenv/lib/python3.12/site-packages/pip/_internal/wheel_builder.py +354 -0
  311. package/testenv/lib/python3.12/site-packages/pip/_vendor/__init__.py +116 -0
  312. package/testenv/lib/python3.12/site-packages/pip/_vendor/__pycache__/__init__.cpython-312.pyc +0 -0
  313. package/testenv/lib/python3.12/site-packages/pip/_vendor/__pycache__/typing_extensions.cpython-312.pyc +0 -0
  314. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__init__.py +29 -0
  315. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/__init__.cpython-312.pyc +0 -0
  316. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/_cmd.cpython-312.pyc +0 -0
  317. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/adapter.cpython-312.pyc +0 -0
  318. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/cache.cpython-312.pyc +0 -0
  319. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/controller.cpython-312.pyc +0 -0
  320. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/filewrapper.cpython-312.pyc +0 -0
  321. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/heuristics.cpython-312.pyc +0 -0
  322. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/serialize.cpython-312.pyc +0 -0
  323. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/__pycache__/wrapper.cpython-312.pyc +0 -0
  324. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/_cmd.py +70 -0
  325. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/adapter.py +161 -0
  326. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/cache.py +75 -0
  327. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +8 -0
  328. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/__init__.cpython-312.pyc +0 -0
  329. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/file_cache.cpython-312.pyc +0 -0
  330. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/__pycache__/redis_cache.cpython-312.pyc +0 -0
  331. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +182 -0
  332. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +48 -0
  333. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/controller.py +500 -0
  334. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/filewrapper.py +119 -0
  335. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/heuristics.py +157 -0
  336. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
  337. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/serialize.py +146 -0
  338. package/testenv/lib/python3.12/site-packages/pip/_vendor/cachecontrol/wrapper.py +43 -0
  339. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/__init__.py +4 -0
  340. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/__main__.py +12 -0
  341. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__init__.cpython-312.pyc +0 -0
  342. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/__main__.cpython-312.pyc +0 -0
  343. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/__pycache__/core.cpython-312.pyc +0 -0
  344. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/cacert.pem +4929 -0
  345. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/core.py +125 -0
  346. package/testenv/lib/python3.12/site-packages/pip/_vendor/certifi/py.typed +0 -0
  347. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__init__.py +33 -0
  348. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/__init__.cpython-312.pyc +0 -0
  349. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/compat.cpython-312.pyc +0 -0
  350. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/database.cpython-312.pyc +0 -0
  351. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/index.cpython-312.pyc +0 -0
  352. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/locators.cpython-312.pyc +0 -0
  353. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/manifest.cpython-312.pyc +0 -0
  354. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/markers.cpython-312.pyc +0 -0
  355. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/metadata.cpython-312.pyc +0 -0
  356. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/resources.cpython-312.pyc +0 -0
  357. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/scripts.cpython-312.pyc +0 -0
  358. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/util.cpython-312.pyc +0 -0
  359. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/version.cpython-312.pyc +0 -0
  360. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/__pycache__/wheel.cpython-312.pyc +0 -0
  361. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/compat.py +1137 -0
  362. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/database.py +1329 -0
  363. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/index.py +508 -0
  364. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/locators.py +1295 -0
  365. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/manifest.py +384 -0
  366. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/markers.py +162 -0
  367. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/metadata.py +1031 -0
  368. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/resources.py +358 -0
  369. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/scripts.py +447 -0
  370. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/util.py +1984 -0
  371. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/version.py +750 -0
  372. package/testenv/lib/python3.12/site-packages/pip/_vendor/distlib/wheel.py +1100 -0
  373. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/__init__.py +54 -0
  374. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/__main__.py +4 -0
  375. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__init__.cpython-312.pyc +0 -0
  376. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/__main__.cpython-312.pyc +0 -0
  377. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/__pycache__/distro.cpython-312.pyc +0 -0
  378. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/distro.py +1403 -0
  379. package/testenv/lib/python3.12/site-packages/pip/_vendor/distro/py.typed +0 -0
  380. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__init__.py +45 -0
  381. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/__init__.cpython-312.pyc +0 -0
  382. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/codec.cpython-312.pyc +0 -0
  383. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/compat.cpython-312.pyc +0 -0
  384. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/core.cpython-312.pyc +0 -0
  385. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/idnadata.cpython-312.pyc +0 -0
  386. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/intranges.cpython-312.pyc +0 -0
  387. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/package_data.cpython-312.pyc +0 -0
  388. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/__pycache__/uts46data.cpython-312.pyc +0 -0
  389. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/codec.py +122 -0
  390. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/compat.py +15 -0
  391. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/core.py +437 -0
  392. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/idnadata.py +4243 -0
  393. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/intranges.py +57 -0
  394. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/package_data.py +1 -0
  395. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/py.typed +0 -0
  396. package/testenv/lib/python3.12/site-packages/pip/_vendor/idna/uts46data.py +8681 -0
  397. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/__init__.py +55 -0
  398. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/__init__.cpython-312.pyc +0 -0
  399. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/exceptions.cpython-312.pyc +0 -0
  400. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-312.pyc +0 -0
  401. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/__pycache__/fallback.cpython-312.pyc +0 -0
  402. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  403. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/ext.py +170 -0
  404. package/testenv/lib/python3.12/site-packages/pip/_vendor/msgpack/fallback.py +929 -0
  405. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__init__.py +15 -0
  406. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/__init__.cpython-312.pyc +0 -0
  407. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_elffile.cpython-312.pyc +0 -0
  408. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-312.pyc +0 -0
  409. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_musllinux.cpython-312.pyc +0 -0
  410. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_parser.cpython-312.pyc +0 -0
  411. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_structures.cpython-312.pyc +0 -0
  412. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/_tokenizer.cpython-312.pyc +0 -0
  413. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/markers.cpython-312.pyc +0 -0
  414. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/metadata.cpython-312.pyc +0 -0
  415. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/requirements.cpython-312.pyc +0 -0
  416. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/specifiers.cpython-312.pyc +0 -0
  417. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/tags.cpython-312.pyc +0 -0
  418. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/utils.cpython-312.pyc +0 -0
  419. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/__pycache__/version.cpython-312.pyc +0 -0
  420. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/_elffile.py +110 -0
  421. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/_manylinux.py +263 -0
  422. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/_musllinux.py +85 -0
  423. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/_parser.py +354 -0
  424. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/_structures.py +61 -0
  425. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/_tokenizer.py +194 -0
  426. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__init__.py +145 -0
  427. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/__init__.cpython-312.pyc +0 -0
  428. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/__pycache__/_spdx.cpython-312.pyc +0 -0
  429. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/licenses/_spdx.py +759 -0
  430. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/markers.py +331 -0
  431. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/metadata.py +863 -0
  432. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/py.typed +0 -0
  433. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/requirements.py +91 -0
  434. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/specifiers.py +1020 -0
  435. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/tags.py +617 -0
  436. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/utils.py +163 -0
  437. package/testenv/lib/python3.12/site-packages/pip/_vendor/packaging/version.py +582 -0
  438. package/testenv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py +3676 -0
  439. package/testenv/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__pycache__/__init__.cpython-312.pyc +0 -0
  440. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__init__.py +631 -0
  441. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__main__.py +55 -0
  442. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__init__.cpython-312.pyc +0 -0
  443. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/__main__.cpython-312.pyc +0 -0
  444. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/android.cpython-312.pyc +0 -0
  445. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/api.cpython-312.pyc +0 -0
  446. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/macos.cpython-312.pyc +0 -0
  447. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/unix.cpython-312.pyc +0 -0
  448. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/version.cpython-312.pyc +0 -0
  449. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/__pycache__/windows.cpython-312.pyc +0 -0
  450. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/android.py +249 -0
  451. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/api.py +298 -0
  452. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/macos.py +144 -0
  453. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
  454. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/unix.py +269 -0
  455. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/version.py +16 -0
  456. package/testenv/lib/python3.12/site-packages/pip/_vendor/platformdirs/windows.py +272 -0
  457. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__init__.py +82 -0
  458. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__main__.py +17 -0
  459. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__init__.cpython-312.pyc +0 -0
  460. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/__main__.cpython-312.pyc +0 -0
  461. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/cmdline.cpython-312.pyc +0 -0
  462. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/console.cpython-312.pyc +0 -0
  463. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/filter.cpython-312.pyc +0 -0
  464. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/formatter.cpython-312.pyc +0 -0
  465. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/lexer.cpython-312.pyc +0 -0
  466. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/modeline.cpython-312.pyc +0 -0
  467. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/plugin.cpython-312.pyc +0 -0
  468. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/regexopt.cpython-312.pyc +0 -0
  469. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/scanner.cpython-312.pyc +0 -0
  470. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/sphinxext.cpython-312.pyc +0 -0
  471. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/style.cpython-312.pyc +0 -0
  472. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/token.cpython-312.pyc +0 -0
  473. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/unistring.cpython-312.pyc +0 -0
  474. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/__pycache__/util.cpython-312.pyc +0 -0
  475. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/cmdline.py +668 -0
  476. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/console.py +70 -0
  477. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/filter.py +70 -0
  478. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__init__.py +940 -0
  479. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/filters/__pycache__/__init__.cpython-312.pyc +0 -0
  480. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatter.py +129 -0
  481. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__init__.py +157 -0
  482. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/__init__.cpython-312.pyc +0 -0
  483. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/_mapping.cpython-312.pyc +0 -0
  484. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/bbcode.cpython-312.pyc +0 -0
  485. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/groff.cpython-312.pyc +0 -0
  486. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/html.cpython-312.pyc +0 -0
  487. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/img.cpython-312.pyc +0 -0
  488. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/irc.cpython-312.pyc +0 -0
  489. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/latex.cpython-312.pyc +0 -0
  490. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/other.cpython-312.pyc +0 -0
  491. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/pangomarkup.cpython-312.pyc +0 -0
  492. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc +0 -0
  493. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/svg.cpython-312.pyc +0 -0
  494. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal.cpython-312.pyc +0 -0
  495. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/__pycache__/terminal256.cpython-312.pyc +0 -0
  496. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
  497. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/bbcode.py +108 -0
  498. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/groff.py +170 -0
  499. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/html.py +987 -0
  500. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/img.py +685 -0
  501. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/irc.py +154 -0
  502. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/latex.py +518 -0
  503. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/other.py +160 -0
  504. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/pangomarkup.py +83 -0
  505. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/rtf.py +349 -0
  506. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/svg.py +185 -0
  507. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/terminal.py +127 -0
  508. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/formatters/terminal256.py +338 -0
  509. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexer.py +963 -0
  510. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
  511. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/__init__.cpython-312.pyc +0 -0
  512. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/_mapping.cpython-312.pyc +0 -0
  513. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/__pycache__/python.cpython-312.pyc +0 -0
  514. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/_mapping.py +589 -0
  515. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/lexers/python.py +1198 -0
  516. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/modeline.py +43 -0
  517. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/plugin.py +72 -0
  518. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/regexopt.py +91 -0
  519. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/scanner.py +104 -0
  520. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/sphinxext.py +247 -0
  521. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/style.py +203 -0
  522. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__init__.py +61 -0
  523. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__pycache__/__init__.cpython-312.pyc +0 -0
  524. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/styles/__pycache__/_mapping.cpython-312.pyc +0 -0
  525. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/styles/_mapping.py +54 -0
  526. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/token.py +214 -0
  527. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/unistring.py +153 -0
  528. package/testenv/lib/python3.12/site-packages/pip/_vendor/pygments/util.py +324 -0
  529. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__init__.py +31 -0
  530. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/__init__.cpython-312.pyc +0 -0
  531. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/__pycache__/_impl.cpython-312.pyc +0 -0
  532. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_impl.py +410 -0
  533. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +21 -0
  534. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/__init__.cpython-312.pyc +0 -0
  535. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/__pycache__/_in_process.cpython-312.pyc +0 -0
  536. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +389 -0
  537. package/testenv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
  538. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__init__.py +179 -0
  539. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/__init__.cpython-312.pyc +0 -0
  540. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/__version__.cpython-312.pyc +0 -0
  541. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/_internal_utils.cpython-312.pyc +0 -0
  542. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/adapters.cpython-312.pyc +0 -0
  543. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/api.cpython-312.pyc +0 -0
  544. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/auth.cpython-312.pyc +0 -0
  545. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/certs.cpython-312.pyc +0 -0
  546. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/compat.cpython-312.pyc +0 -0
  547. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/cookies.cpython-312.pyc +0 -0
  548. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/exceptions.cpython-312.pyc +0 -0
  549. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/help.cpython-312.pyc +0 -0
  550. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/hooks.cpython-312.pyc +0 -0
  551. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/models.cpython-312.pyc +0 -0
  552. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/packages.cpython-312.pyc +0 -0
  553. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/sessions.cpython-312.pyc +0 -0
  554. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/status_codes.cpython-312.pyc +0 -0
  555. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/structures.cpython-312.pyc +0 -0
  556. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__pycache__/utils.cpython-312.pyc +0 -0
  557. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/__version__.py +14 -0
  558. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/_internal_utils.py +50 -0
  559. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/adapters.py +719 -0
  560. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/api.py +157 -0
  561. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/auth.py +314 -0
  562. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/certs.py +17 -0
  563. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/compat.py +78 -0
  564. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/cookies.py +561 -0
  565. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/exceptions.py +151 -0
  566. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/help.py +127 -0
  567. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/hooks.py +33 -0
  568. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/models.py +1037 -0
  569. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/packages.py +25 -0
  570. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/sessions.py +831 -0
  571. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/status_codes.py +128 -0
  572. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/structures.py +99 -0
  573. package/testenv/lib/python3.12/site-packages/pip/_vendor/requests/utils.py +1096 -0
  574. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__init__.py +26 -0
  575. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/__init__.cpython-312.pyc +0 -0
  576. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/providers.cpython-312.pyc +0 -0
  577. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/reporters.cpython-312.pyc +0 -0
  578. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/resolvers.cpython-312.pyc +0 -0
  579. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/__pycache__/structs.cpython-312.pyc +0 -0
  580. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__init__.py +0 -0
  581. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__pycache__/__init__.cpython-312.pyc +0 -0
  582. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/__pycache__/collections_abc.cpython-312.pyc +0 -0
  583. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py +6 -0
  584. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/providers.py +133 -0
  585. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
  586. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/reporters.py +43 -0
  587. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/resolvers.py +547 -0
  588. package/testenv/lib/python3.12/site-packages/pip/_vendor/resolvelib/structs.py +170 -0
  589. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__init__.py +177 -0
  590. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__main__.py +273 -0
  591. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/__init__.cpython-312.pyc +0 -0
  592. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/__main__.cpython-312.pyc +0 -0
  593. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_cell_widths.cpython-312.pyc +0 -0
  594. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_codes.cpython-312.pyc +0 -0
  595. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_emoji_replace.cpython-312.pyc +0 -0
  596. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_export_format.cpython-312.pyc +0 -0
  597. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_extension.cpython-312.pyc +0 -0
  598. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_fileno.cpython-312.pyc +0 -0
  599. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_inspect.cpython-312.pyc +0 -0
  600. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_log_render.cpython-312.pyc +0 -0
  601. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_loop.cpython-312.pyc +0 -0
  602. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_null_file.cpython-312.pyc +0 -0
  603. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_palettes.cpython-312.pyc +0 -0
  604. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_pick.cpython-312.pyc +0 -0
  605. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_ratio.cpython-312.pyc +0 -0
  606. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_spinners.cpython-312.pyc +0 -0
  607. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_stack.cpython-312.pyc +0 -0
  608. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_timer.cpython-312.pyc +0 -0
  609. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_win32_console.cpython-312.pyc +0 -0
  610. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_windows.cpython-312.pyc +0 -0
  611. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_windows_renderer.cpython-312.pyc +0 -0
  612. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/_wrap.cpython-312.pyc +0 -0
  613. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/abc.cpython-312.pyc +0 -0
  614. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/align.cpython-312.pyc +0 -0
  615. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/ansi.cpython-312.pyc +0 -0
  616. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/bar.cpython-312.pyc +0 -0
  617. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/box.cpython-312.pyc +0 -0
  618. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/cells.cpython-312.pyc +0 -0
  619. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/color.cpython-312.pyc +0 -0
  620. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/color_triplet.cpython-312.pyc +0 -0
  621. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/columns.cpython-312.pyc +0 -0
  622. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/console.cpython-312.pyc +0 -0
  623. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/constrain.cpython-312.pyc +0 -0
  624. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/containers.cpython-312.pyc +0 -0
  625. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/control.cpython-312.pyc +0 -0
  626. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/default_styles.cpython-312.pyc +0 -0
  627. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/diagnose.cpython-312.pyc +0 -0
  628. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/emoji.cpython-312.pyc +0 -0
  629. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/errors.cpython-312.pyc +0 -0
  630. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/file_proxy.cpython-312.pyc +0 -0
  631. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/filesize.cpython-312.pyc +0 -0
  632. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/highlighter.cpython-312.pyc +0 -0
  633. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/json.cpython-312.pyc +0 -0
  634. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/jupyter.cpython-312.pyc +0 -0
  635. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/layout.cpython-312.pyc +0 -0
  636. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/live.cpython-312.pyc +0 -0
  637. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/live_render.cpython-312.pyc +0 -0
  638. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/logging.cpython-312.pyc +0 -0
  639. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/markup.cpython-312.pyc +0 -0
  640. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/measure.cpython-312.pyc +0 -0
  641. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/padding.cpython-312.pyc +0 -0
  642. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/pager.cpython-312.pyc +0 -0
  643. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/palette.cpython-312.pyc +0 -0
  644. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/panel.cpython-312.pyc +0 -0
  645. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/pretty.cpython-312.pyc +0 -0
  646. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/progress.cpython-312.pyc +0 -0
  647. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/progress_bar.cpython-312.pyc +0 -0
  648. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/prompt.cpython-312.pyc +0 -0
  649. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/protocol.cpython-312.pyc +0 -0
  650. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/region.cpython-312.pyc +0 -0
  651. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/repr.cpython-312.pyc +0 -0
  652. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/rule.cpython-312.pyc +0 -0
  653. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/scope.cpython-312.pyc +0 -0
  654. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/screen.cpython-312.pyc +0 -0
  655. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/segment.cpython-312.pyc +0 -0
  656. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/spinner.cpython-312.pyc +0 -0
  657. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/status.cpython-312.pyc +0 -0
  658. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/style.cpython-312.pyc +0 -0
  659. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/styled.cpython-312.pyc +0 -0
  660. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/syntax.cpython-312.pyc +0 -0
  661. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/table.cpython-312.pyc +0 -0
  662. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/terminal_theme.cpython-312.pyc +0 -0
  663. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/text.cpython-312.pyc +0 -0
  664. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/theme.cpython-312.pyc +0 -0
  665. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/themes.cpython-312.pyc +0 -0
  666. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-312.pyc +0 -0
  667. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/__pycache__/tree.cpython-312.pyc +0 -0
  668. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_cell_widths.py +454 -0
  669. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
  670. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
  671. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_export_format.py +76 -0
  672. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_extension.py +10 -0
  673. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_fileno.py +24 -0
  674. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_inspect.py +268 -0
  675. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_log_render.py +94 -0
  676. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_loop.py +43 -0
  677. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_null_file.py +69 -0
  678. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_palettes.py +309 -0
  679. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_pick.py +17 -0
  680. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_ratio.py +159 -0
  681. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_spinners.py +482 -0
  682. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_stack.py +16 -0
  683. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_timer.py +19 -0
  684. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_win32_console.py +661 -0
  685. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_windows.py +71 -0
  686. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
  687. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/_wrap.py +93 -0
  688. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/abc.py +33 -0
  689. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/align.py +312 -0
  690. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/ansi.py +241 -0
  691. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/bar.py +93 -0
  692. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/box.py +480 -0
  693. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/cells.py +174 -0
  694. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/color.py +621 -0
  695. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
  696. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/columns.py +187 -0
  697. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/console.py +2661 -0
  698. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/constrain.py +37 -0
  699. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/containers.py +167 -0
  700. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/control.py +225 -0
  701. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/default_styles.py +191 -0
  702. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/diagnose.py +37 -0
  703. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/emoji.py +96 -0
  704. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/errors.py +34 -0
  705. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
  706. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py +88 -0
  707. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/highlighter.py +232 -0
  708. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/json.py +139 -0
  709. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/jupyter.py +101 -0
  710. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/layout.py +442 -0
  711. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/live.py +375 -0
  712. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/live_render.py +112 -0
  713. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/logging.py +297 -0
  714. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/markup.py +251 -0
  715. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/measure.py +151 -0
  716. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/padding.py +141 -0
  717. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/pager.py +34 -0
  718. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/palette.py +100 -0
  719. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/panel.py +318 -0
  720. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/pretty.py +1016 -0
  721. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/progress.py +1715 -0
  722. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/progress_bar.py +223 -0
  723. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/prompt.py +400 -0
  724. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/protocol.py +42 -0
  725. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/py.typed +0 -0
  726. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/region.py +10 -0
  727. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/repr.py +149 -0
  728. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/rule.py +130 -0
  729. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/scope.py +86 -0
  730. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/screen.py +54 -0
  731. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/segment.py +752 -0
  732. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/spinner.py +138 -0
  733. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/status.py +131 -0
  734. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/style.py +796 -0
  735. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/styled.py +42 -0
  736. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/syntax.py +966 -0
  737. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/table.py +1007 -0
  738. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
  739. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/text.py +1361 -0
  740. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/theme.py +115 -0
  741. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/themes.py +5 -0
  742. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/traceback.py +797 -0
  743. package/testenv/lib/python3.12/site-packages/pip/_vendor/rich/tree.py +257 -0
  744. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/__init__.py +8 -0
  745. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/__init__.cpython-312.pyc +0 -0
  746. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/_parser.cpython-312.pyc +0 -0
  747. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/_re.cpython-312.pyc +0 -0
  748. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/__pycache__/_types.cpython-312.pyc +0 -0
  749. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/_parser.py +770 -0
  750. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/_re.py +112 -0
  751. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/_types.py +10 -0
  752. package/testenv/lib/python3.12/site-packages/pip/_vendor/tomli/py.typed +1 -0
  753. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__init__.py +36 -0
  754. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/__init__.cpython-312.pyc +0 -0
  755. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_api.cpython-312.pyc +0 -0
  756. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_macos.cpython-312.pyc +0 -0
  757. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_openssl.cpython-312.pyc +0 -0
  758. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_ssl_constants.cpython-312.pyc +0 -0
  759. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/__pycache__/_windows.cpython-312.pyc +0 -0
  760. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/_api.py +316 -0
  761. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/_macos.py +571 -0
  762. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/_openssl.py +66 -0
  763. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/_ssl_constants.py +31 -0
  764. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/_windows.py +567 -0
  765. package/testenv/lib/python3.12/site-packages/pip/_vendor/truststore/py.typed +0 -0
  766. package/testenv/lib/python3.12/site-packages/pip/_vendor/typing_extensions.py +3641 -0
  767. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__init__.py +102 -0
  768. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/__init__.cpython-312.pyc +0 -0
  769. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/_collections.cpython-312.pyc +0 -0
  770. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/_version.cpython-312.pyc +0 -0
  771. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/connection.cpython-312.pyc +0 -0
  772. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/connectionpool.cpython-312.pyc +0 -0
  773. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/exceptions.cpython-312.pyc +0 -0
  774. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/fields.cpython-312.pyc +0 -0
  775. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/filepost.cpython-312.pyc +0 -0
  776. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/poolmanager.cpython-312.pyc +0 -0
  777. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/request.cpython-312.pyc +0 -0
  778. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/__pycache__/response.cpython-312.pyc +0 -0
  779. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/_collections.py +355 -0
  780. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/_version.py +2 -0
  781. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/connection.py +572 -0
  782. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/connectionpool.py +1140 -0
  783. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  784. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/__init__.cpython-312.pyc +0 -0
  785. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/_appengine_environ.cpython-312.pyc +0 -0
  786. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/appengine.cpython-312.pyc +0 -0
  787. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/ntlmpool.cpython-312.pyc +0 -0
  788. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/pyopenssl.cpython-312.pyc +0 -0
  789. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/securetransport.cpython-312.pyc +0 -0
  790. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/__pycache__/socks.cpython-312.pyc +0 -0
  791. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
  792. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  793. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/__init__.cpython-312.pyc +0 -0
  794. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/bindings.cpython-312.pyc +0 -0
  795. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__pycache__/low_level.cpython-312.pyc +0 -0
  796. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
  797. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
  798. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
  799. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
  800. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +518 -0
  801. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +920 -0
  802. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
  803. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
  804. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/fields.py +274 -0
  805. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
  806. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
  807. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__pycache__/__init__.cpython-312.pyc +0 -0
  808. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/__pycache__/six.cpython-312.pyc +0 -0
  809. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  810. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/__init__.cpython-312.pyc +0 -0
  811. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/makefile.cpython-312.pyc +0 -0
  812. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/__pycache__/weakref_finalize.cpython-312.pyc +0 -0
  813. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
  814. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +155 -0
  815. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/packages/six.py +1076 -0
  816. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/poolmanager.py +540 -0
  817. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/request.py +191 -0
  818. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/response.py +879 -0
  819. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
  820. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/__init__.cpython-312.pyc +0 -0
  821. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/connection.cpython-312.pyc +0 -0
  822. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/proxy.cpython-312.pyc +0 -0
  823. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/queue.cpython-312.pyc +0 -0
  824. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/request.cpython-312.pyc +0 -0
  825. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/response.cpython-312.pyc +0 -0
  826. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/retry.cpython-312.pyc +0 -0
  827. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_.cpython-312.pyc +0 -0
  828. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssl_match_hostname.cpython-312.pyc +0 -0
  829. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/ssltransport.cpython-312.pyc +0 -0
  830. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/timeout.cpython-312.pyc +0 -0
  831. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/url.cpython-312.pyc +0 -0
  832. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/__pycache__/wait.cpython-312.pyc +0 -0
  833. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/connection.py +149 -0
  834. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
  835. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
  836. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/request.py +137 -0
  837. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
  838. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/retry.py +622 -0
  839. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_.py +504 -0
  840. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
  841. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
  842. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/timeout.py +271 -0
  843. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/url.py +435 -0
  844. package/testenv/lib/python3.12/site-packages/pip/_vendor/urllib3/util/wait.py +152 -0
  845. package/testenv/lib/python3.12/site-packages/pip/_vendor/vendor.txt +18 -0
  846. package/testenv/lib/python3.12/site-packages/pip/py.typed +4 -0
  847. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/AUTHORS.txt +806 -0
  848. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/INSTALLER +1 -0
  849. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/LICENSE.txt +20 -0
  850. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/METADATA +90 -0
  851. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/RECORD +848 -0
  852. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/REQUESTED +0 -0
  853. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/WHEEL +5 -0
  854. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/entry_points.txt +3 -0
  855. package/testenv/lib/python3.12/site-packages/pip-25.0.dist-info/top_level.txt +1 -0
  856. package/testenv/lib/python3.12/site-packages/pxz/__init__.py +50 -0
  857. package/testenv/lib/python3.12/site-packages/pxz/__pycache__/__init__.cpython-312.pyc +0 -0
  858. package/testenv/lib/python3.12/site-packages/pxz-1.1.14.dist-info/INSTALLER +1 -0
  859. package/testenv/lib/python3.12/site-packages/pxz-1.1.14.dist-info/METADATA +20 -0
  860. package/testenv/lib/python3.12/site-packages/pxz-1.1.14.dist-info/RECORD +8 -0
  861. package/testenv/lib/python3.12/site-packages/pxz-1.1.14.dist-info/REQUESTED +0 -0
  862. package/testenv/lib/python3.12/site-packages/pxz-1.1.14.dist-info/WHEEL +5 -0
  863. package/testenv/lib/python3.12/site-packages/pxz-1.1.14.dist-info/top_level.txt +1 -0
  864. package/testenv/pyvenv.cfg +5 -0
  865. package/README.md +0 -5
@@ -0,0 +1,2661 @@
1
+ import inspect
2
+ import os
3
+ import sys
4
+ import threading
5
+ import zlib
6
+ from abc import ABC, abstractmethod
7
+ from dataclasses import dataclass, field
8
+ from datetime import datetime
9
+ from functools import wraps
10
+ from getpass import getpass
11
+ from html import escape
12
+ from inspect import isclass
13
+ from itertools import islice
14
+ from math import ceil
15
+ from time import monotonic
16
+ from types import FrameType, ModuleType, TracebackType
17
+ from typing import (
18
+ IO,
19
+ TYPE_CHECKING,
20
+ Any,
21
+ Callable,
22
+ Dict,
23
+ Iterable,
24
+ List,
25
+ Mapping,
26
+ NamedTuple,
27
+ Optional,
28
+ TextIO,
29
+ Tuple,
30
+ Type,
31
+ Union,
32
+ cast,
33
+ )
34
+
35
+ from pip._vendor.rich._null_file import NULL_FILE
36
+
37
+ if sys.version_info >= (3, 8):
38
+ from typing import Literal, Protocol, runtime_checkable
39
+ else:
40
+ from pip._vendor.typing_extensions import (
41
+ Literal,
42
+ Protocol,
43
+ runtime_checkable,
44
+ ) # pragma: no cover
45
+
46
+ from . import errors, themes
47
+ from ._emoji_replace import _emoji_replace
48
+ from ._export_format import CONSOLE_HTML_FORMAT, CONSOLE_SVG_FORMAT
49
+ from ._fileno import get_fileno
50
+ from ._log_render import FormatTimeCallable, LogRender
51
+ from .align import Align, AlignMethod
52
+ from .color import ColorSystem, blend_rgb
53
+ from .control import Control
54
+ from .emoji import EmojiVariant
55
+ from .highlighter import NullHighlighter, ReprHighlighter
56
+ from .markup import render as render_markup
57
+ from .measure import Measurement, measure_renderables
58
+ from .pager import Pager, SystemPager
59
+ from .pretty import Pretty, is_expandable
60
+ from .protocol import rich_cast
61
+ from .region import Region
62
+ from .scope import render_scope
63
+ from .screen import Screen
64
+ from .segment import Segment
65
+ from .style import Style, StyleType
66
+ from .styled import Styled
67
+ from .terminal_theme import DEFAULT_TERMINAL_THEME, SVG_EXPORT_THEME, TerminalTheme
68
+ from .text import Text, TextType
69
+ from .theme import Theme, ThemeStack
70
+
71
+ if TYPE_CHECKING:
72
+ from ._windows import WindowsConsoleFeatures
73
+ from .live import Live
74
+ from .status import Status
75
+
76
+ JUPYTER_DEFAULT_COLUMNS = 115
77
+ JUPYTER_DEFAULT_LINES = 100
78
+ WINDOWS = sys.platform == "win32"
79
+
80
+ HighlighterType = Callable[[Union[str, "Text"]], "Text"]
81
+ JustifyMethod = Literal["default", "left", "center", "right", "full"]
82
+ OverflowMethod = Literal["fold", "crop", "ellipsis", "ignore"]
83
+
84
+
85
+ class NoChange:
86
+ pass
87
+
88
+
89
+ NO_CHANGE = NoChange()
90
+
91
+ try:
92
+ _STDIN_FILENO = sys.__stdin__.fileno() # type: ignore[union-attr]
93
+ except Exception:
94
+ _STDIN_FILENO = 0
95
+ try:
96
+ _STDOUT_FILENO = sys.__stdout__.fileno() # type: ignore[union-attr]
97
+ except Exception:
98
+ _STDOUT_FILENO = 1
99
+ try:
100
+ _STDERR_FILENO = sys.__stderr__.fileno() # type: ignore[union-attr]
101
+ except Exception:
102
+ _STDERR_FILENO = 2
103
+
104
+ _STD_STREAMS = (_STDIN_FILENO, _STDOUT_FILENO, _STDERR_FILENO)
105
+ _STD_STREAMS_OUTPUT = (_STDOUT_FILENO, _STDERR_FILENO)
106
+
107
+
108
+ _TERM_COLORS = {
109
+ "kitty": ColorSystem.EIGHT_BIT,
110
+ "256color": ColorSystem.EIGHT_BIT,
111
+ "16color": ColorSystem.STANDARD,
112
+ }
113
+
114
+
115
+ class ConsoleDimensions(NamedTuple):
116
+ """Size of the terminal."""
117
+
118
+ width: int
119
+ """The width of the console in 'cells'."""
120
+ height: int
121
+ """The height of the console in lines."""
122
+
123
+
124
+ @dataclass
125
+ class ConsoleOptions:
126
+ """Options for __rich_console__ method."""
127
+
128
+ size: ConsoleDimensions
129
+ """Size of console."""
130
+ legacy_windows: bool
131
+ """legacy_windows: flag for legacy windows."""
132
+ min_width: int
133
+ """Minimum width of renderable."""
134
+ max_width: int
135
+ """Maximum width of renderable."""
136
+ is_terminal: bool
137
+ """True if the target is a terminal, otherwise False."""
138
+ encoding: str
139
+ """Encoding of terminal."""
140
+ max_height: int
141
+ """Height of container (starts as terminal)"""
142
+ justify: Optional[JustifyMethod] = None
143
+ """Justify value override for renderable."""
144
+ overflow: Optional[OverflowMethod] = None
145
+ """Overflow value override for renderable."""
146
+ no_wrap: Optional[bool] = False
147
+ """Disable wrapping for text."""
148
+ highlight: Optional[bool] = None
149
+ """Highlight override for render_str."""
150
+ markup: Optional[bool] = None
151
+ """Enable markup when rendering strings."""
152
+ height: Optional[int] = None
153
+
154
+ @property
155
+ def ascii_only(self) -> bool:
156
+ """Check if renderables should use ascii only."""
157
+ return not self.encoding.startswith("utf")
158
+
159
+ def copy(self) -> "ConsoleOptions":
160
+ """Return a copy of the options.
161
+
162
+ Returns:
163
+ ConsoleOptions: a copy of self.
164
+ """
165
+ options: ConsoleOptions = ConsoleOptions.__new__(ConsoleOptions)
166
+ options.__dict__ = self.__dict__.copy()
167
+ return options
168
+
169
+ def update(
170
+ self,
171
+ *,
172
+ width: Union[int, NoChange] = NO_CHANGE,
173
+ min_width: Union[int, NoChange] = NO_CHANGE,
174
+ max_width: Union[int, NoChange] = NO_CHANGE,
175
+ justify: Union[Optional[JustifyMethod], NoChange] = NO_CHANGE,
176
+ overflow: Union[Optional[OverflowMethod], NoChange] = NO_CHANGE,
177
+ no_wrap: Union[Optional[bool], NoChange] = NO_CHANGE,
178
+ highlight: Union[Optional[bool], NoChange] = NO_CHANGE,
179
+ markup: Union[Optional[bool], NoChange] = NO_CHANGE,
180
+ height: Union[Optional[int], NoChange] = NO_CHANGE,
181
+ ) -> "ConsoleOptions":
182
+ """Update values, return a copy."""
183
+ options = self.copy()
184
+ if not isinstance(width, NoChange):
185
+ options.min_width = options.max_width = max(0, width)
186
+ if not isinstance(min_width, NoChange):
187
+ options.min_width = min_width
188
+ if not isinstance(max_width, NoChange):
189
+ options.max_width = max_width
190
+ if not isinstance(justify, NoChange):
191
+ options.justify = justify
192
+ if not isinstance(overflow, NoChange):
193
+ options.overflow = overflow
194
+ if not isinstance(no_wrap, NoChange):
195
+ options.no_wrap = no_wrap
196
+ if not isinstance(highlight, NoChange):
197
+ options.highlight = highlight
198
+ if not isinstance(markup, NoChange):
199
+ options.markup = markup
200
+ if not isinstance(height, NoChange):
201
+ if height is not None:
202
+ options.max_height = height
203
+ options.height = None if height is None else max(0, height)
204
+ return options
205
+
206
+ def update_width(self, width: int) -> "ConsoleOptions":
207
+ """Update just the width, return a copy.
208
+
209
+ Args:
210
+ width (int): New width (sets both min_width and max_width)
211
+
212
+ Returns:
213
+ ~ConsoleOptions: New console options instance.
214
+ """
215
+ options = self.copy()
216
+ options.min_width = options.max_width = max(0, width)
217
+ return options
218
+
219
+ def update_height(self, height: int) -> "ConsoleOptions":
220
+ """Update the height, and return a copy.
221
+
222
+ Args:
223
+ height (int): New height
224
+
225
+ Returns:
226
+ ~ConsoleOptions: New Console options instance.
227
+ """
228
+ options = self.copy()
229
+ options.max_height = options.height = height
230
+ return options
231
+
232
+ def reset_height(self) -> "ConsoleOptions":
233
+ """Return a copy of the options with height set to ``None``.
234
+
235
+ Returns:
236
+ ~ConsoleOptions: New console options instance.
237
+ """
238
+ options = self.copy()
239
+ options.height = None
240
+ return options
241
+
242
+ def update_dimensions(self, width: int, height: int) -> "ConsoleOptions":
243
+ """Update the width and height, and return a copy.
244
+
245
+ Args:
246
+ width (int): New width (sets both min_width and max_width).
247
+ height (int): New height.
248
+
249
+ Returns:
250
+ ~ConsoleOptions: New console options instance.
251
+ """
252
+ options = self.copy()
253
+ options.min_width = options.max_width = max(0, width)
254
+ options.height = options.max_height = height
255
+ return options
256
+
257
+
258
+ @runtime_checkable
259
+ class RichCast(Protocol):
260
+ """An object that may be 'cast' to a console renderable."""
261
+
262
+ def __rich__(
263
+ self,
264
+ ) -> Union["ConsoleRenderable", "RichCast", str]: # pragma: no cover
265
+ ...
266
+
267
+
268
+ @runtime_checkable
269
+ class ConsoleRenderable(Protocol):
270
+ """An object that supports the console protocol."""
271
+
272
+ def __rich_console__(
273
+ self, console: "Console", options: "ConsoleOptions"
274
+ ) -> "RenderResult": # pragma: no cover
275
+ ...
276
+
277
+
278
+ # A type that may be rendered by Console.
279
+ RenderableType = Union[ConsoleRenderable, RichCast, str]
280
+ """A string or any object that may be rendered by Rich."""
281
+
282
+ # The result of calling a __rich_console__ method.
283
+ RenderResult = Iterable[Union[RenderableType, Segment]]
284
+
285
+ _null_highlighter = NullHighlighter()
286
+
287
+
288
+ class CaptureError(Exception):
289
+ """An error in the Capture context manager."""
290
+
291
+
292
+ class NewLine:
293
+ """A renderable to generate new line(s)"""
294
+
295
+ def __init__(self, count: int = 1) -> None:
296
+ self.count = count
297
+
298
+ def __rich_console__(
299
+ self, console: "Console", options: "ConsoleOptions"
300
+ ) -> Iterable[Segment]:
301
+ yield Segment("\n" * self.count)
302
+
303
+
304
+ class ScreenUpdate:
305
+ """Render a list of lines at a given offset."""
306
+
307
+ def __init__(self, lines: List[List[Segment]], x: int, y: int) -> None:
308
+ self._lines = lines
309
+ self.x = x
310
+ self.y = y
311
+
312
+ def __rich_console__(
313
+ self, console: "Console", options: ConsoleOptions
314
+ ) -> RenderResult:
315
+ x = self.x
316
+ move_to = Control.move_to
317
+ for offset, line in enumerate(self._lines, self.y):
318
+ yield move_to(x, offset)
319
+ yield from line
320
+
321
+
322
+ class Capture:
323
+ """Context manager to capture the result of printing to the console.
324
+ See :meth:`~rich.console.Console.capture` for how to use.
325
+
326
+ Args:
327
+ console (Console): A console instance to capture output.
328
+ """
329
+
330
+ def __init__(self, console: "Console") -> None:
331
+ self._console = console
332
+ self._result: Optional[str] = None
333
+
334
+ def __enter__(self) -> "Capture":
335
+ self._console.begin_capture()
336
+ return self
337
+
338
+ def __exit__(
339
+ self,
340
+ exc_type: Optional[Type[BaseException]],
341
+ exc_val: Optional[BaseException],
342
+ exc_tb: Optional[TracebackType],
343
+ ) -> None:
344
+ self._result = self._console.end_capture()
345
+
346
+ def get(self) -> str:
347
+ """Get the result of the capture."""
348
+ if self._result is None:
349
+ raise CaptureError(
350
+ "Capture result is not available until context manager exits."
351
+ )
352
+ return self._result
353
+
354
+
355
+ class ThemeContext:
356
+ """A context manager to use a temporary theme. See :meth:`~rich.console.Console.use_theme` for usage."""
357
+
358
+ def __init__(self, console: "Console", theme: Theme, inherit: bool = True) -> None:
359
+ self.console = console
360
+ self.theme = theme
361
+ self.inherit = inherit
362
+
363
+ def __enter__(self) -> "ThemeContext":
364
+ self.console.push_theme(self.theme)
365
+ return self
366
+
367
+ def __exit__(
368
+ self,
369
+ exc_type: Optional[Type[BaseException]],
370
+ exc_val: Optional[BaseException],
371
+ exc_tb: Optional[TracebackType],
372
+ ) -> None:
373
+ self.console.pop_theme()
374
+
375
+
376
+ class PagerContext:
377
+ """A context manager that 'pages' content. See :meth:`~rich.console.Console.pager` for usage."""
378
+
379
+ def __init__(
380
+ self,
381
+ console: "Console",
382
+ pager: Optional[Pager] = None,
383
+ styles: bool = False,
384
+ links: bool = False,
385
+ ) -> None:
386
+ self._console = console
387
+ self.pager = SystemPager() if pager is None else pager
388
+ self.styles = styles
389
+ self.links = links
390
+
391
+ def __enter__(self) -> "PagerContext":
392
+ self._console._enter_buffer()
393
+ return self
394
+
395
+ def __exit__(
396
+ self,
397
+ exc_type: Optional[Type[BaseException]],
398
+ exc_val: Optional[BaseException],
399
+ exc_tb: Optional[TracebackType],
400
+ ) -> None:
401
+ if exc_type is None:
402
+ with self._console._lock:
403
+ buffer: List[Segment] = self._console._buffer[:]
404
+ del self._console._buffer[:]
405
+ segments: Iterable[Segment] = buffer
406
+ if not self.styles:
407
+ segments = Segment.strip_styles(segments)
408
+ elif not self.links:
409
+ segments = Segment.strip_links(segments)
410
+ content = self._console._render_buffer(segments)
411
+ self.pager.show(content)
412
+ self._console._exit_buffer()
413
+
414
+
415
+ class ScreenContext:
416
+ """A context manager that enables an alternative screen. See :meth:`~rich.console.Console.screen` for usage."""
417
+
418
+ def __init__(
419
+ self, console: "Console", hide_cursor: bool, style: StyleType = ""
420
+ ) -> None:
421
+ self.console = console
422
+ self.hide_cursor = hide_cursor
423
+ self.screen = Screen(style=style)
424
+ self._changed = False
425
+
426
+ def update(
427
+ self, *renderables: RenderableType, style: Optional[StyleType] = None
428
+ ) -> None:
429
+ """Update the screen.
430
+
431
+ Args:
432
+ renderable (RenderableType, optional): Optional renderable to replace current renderable,
433
+ or None for no change. Defaults to None.
434
+ style: (Style, optional): Replacement style, or None for no change. Defaults to None.
435
+ """
436
+ if renderables:
437
+ self.screen.renderable = (
438
+ Group(*renderables) if len(renderables) > 1 else renderables[0]
439
+ )
440
+ if style is not None:
441
+ self.screen.style = style
442
+ self.console.print(self.screen, end="")
443
+
444
+ def __enter__(self) -> "ScreenContext":
445
+ self._changed = self.console.set_alt_screen(True)
446
+ if self._changed and self.hide_cursor:
447
+ self.console.show_cursor(False)
448
+ return self
449
+
450
+ def __exit__(
451
+ self,
452
+ exc_type: Optional[Type[BaseException]],
453
+ exc_val: Optional[BaseException],
454
+ exc_tb: Optional[TracebackType],
455
+ ) -> None:
456
+ if self._changed:
457
+ self.console.set_alt_screen(False)
458
+ if self.hide_cursor:
459
+ self.console.show_cursor(True)
460
+
461
+
462
+ class Group:
463
+ """Takes a group of renderables and returns a renderable object that renders the group.
464
+
465
+ Args:
466
+ renderables (Iterable[RenderableType]): An iterable of renderable objects.
467
+ fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
468
+ """
469
+
470
+ def __init__(self, *renderables: "RenderableType", fit: bool = True) -> None:
471
+ self._renderables = renderables
472
+ self.fit = fit
473
+ self._render: Optional[List[RenderableType]] = None
474
+
475
+ @property
476
+ def renderables(self) -> List["RenderableType"]:
477
+ if self._render is None:
478
+ self._render = list(self._renderables)
479
+ return self._render
480
+
481
+ def __rich_measure__(
482
+ self, console: "Console", options: "ConsoleOptions"
483
+ ) -> "Measurement":
484
+ if self.fit:
485
+ return measure_renderables(console, options, self.renderables)
486
+ else:
487
+ return Measurement(options.max_width, options.max_width)
488
+
489
+ def __rich_console__(
490
+ self, console: "Console", options: "ConsoleOptions"
491
+ ) -> RenderResult:
492
+ yield from self.renderables
493
+
494
+
495
+ def group(fit: bool = True) -> Callable[..., Callable[..., Group]]:
496
+ """A decorator that turns an iterable of renderables in to a group.
497
+
498
+ Args:
499
+ fit (bool, optional): Fit dimension of group to contents, or fill available space. Defaults to True.
500
+ """
501
+
502
+ def decorator(
503
+ method: Callable[..., Iterable[RenderableType]]
504
+ ) -> Callable[..., Group]:
505
+ """Convert a method that returns an iterable of renderables in to a Group."""
506
+
507
+ @wraps(method)
508
+ def _replace(*args: Any, **kwargs: Any) -> Group:
509
+ renderables = method(*args, **kwargs)
510
+ return Group(*renderables, fit=fit)
511
+
512
+ return _replace
513
+
514
+ return decorator
515
+
516
+
517
+ def _is_jupyter() -> bool: # pragma: no cover
518
+ """Check if we're running in a Jupyter notebook."""
519
+ try:
520
+ get_ipython # type: ignore[name-defined]
521
+ except NameError:
522
+ return False
523
+ ipython = get_ipython() # type: ignore[name-defined]
524
+ shell = ipython.__class__.__name__
525
+ if (
526
+ "google.colab" in str(ipython.__class__)
527
+ or os.getenv("DATABRICKS_RUNTIME_VERSION")
528
+ or shell == "ZMQInteractiveShell"
529
+ ):
530
+ return True # Jupyter notebook or qtconsole
531
+ elif shell == "TerminalInteractiveShell":
532
+ return False # Terminal running IPython
533
+ else:
534
+ return False # Other type (?)
535
+
536
+
537
+ COLOR_SYSTEMS = {
538
+ "standard": ColorSystem.STANDARD,
539
+ "256": ColorSystem.EIGHT_BIT,
540
+ "truecolor": ColorSystem.TRUECOLOR,
541
+ "windows": ColorSystem.WINDOWS,
542
+ }
543
+
544
+ _COLOR_SYSTEMS_NAMES = {system: name for name, system in COLOR_SYSTEMS.items()}
545
+
546
+
547
+ @dataclass
548
+ class ConsoleThreadLocals(threading.local):
549
+ """Thread local values for Console context."""
550
+
551
+ theme_stack: ThemeStack
552
+ buffer: List[Segment] = field(default_factory=list)
553
+ buffer_index: int = 0
554
+
555
+
556
+ class RenderHook(ABC):
557
+ """Provides hooks in to the render process."""
558
+
559
+ @abstractmethod
560
+ def process_renderables(
561
+ self, renderables: List[ConsoleRenderable]
562
+ ) -> List[ConsoleRenderable]:
563
+ """Called with a list of objects to render.
564
+
565
+ This method can return a new list of renderables, or modify and return the same list.
566
+
567
+ Args:
568
+ renderables (List[ConsoleRenderable]): A number of renderable objects.
569
+
570
+ Returns:
571
+ List[ConsoleRenderable]: A replacement list of renderables.
572
+ """
573
+
574
+
575
+ _windows_console_features: Optional["WindowsConsoleFeatures"] = None
576
+
577
+
578
+ def get_windows_console_features() -> "WindowsConsoleFeatures": # pragma: no cover
579
+ global _windows_console_features
580
+ if _windows_console_features is not None:
581
+ return _windows_console_features
582
+ from ._windows import get_windows_console_features
583
+
584
+ _windows_console_features = get_windows_console_features()
585
+ return _windows_console_features
586
+
587
+
588
+ def detect_legacy_windows() -> bool:
589
+ """Detect legacy Windows."""
590
+ return WINDOWS and not get_windows_console_features().vt
591
+
592
+
593
+ class Console:
594
+ """A high level console interface.
595
+
596
+ Args:
597
+ color_system (str, optional): The color system supported by your terminal,
598
+ either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect.
599
+ force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None.
600
+ force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None.
601
+ force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None.
602
+ soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False.
603
+ theme (Theme, optional): An optional style theme object, or ``None`` for default theme.
604
+ stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False.
605
+ file (IO, optional): A file object where the console should write to. Defaults to stdout.
606
+ quiet (bool, Optional): Boolean to suppress all output. Defaults to False.
607
+ width (int, optional): The width of the terminal. Leave as default to auto-detect width.
608
+ height (int, optional): The height of the terminal. Leave as default to auto-detect height.
609
+ style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None.
610
+ no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None.
611
+ tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8.
612
+ record (bool, optional): Boolean to enable recording of terminal output,
613
+ required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False.
614
+ markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True.
615
+ emoji (bool, optional): Enable emoji code. Defaults to True.
616
+ emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.
617
+ highlight (bool, optional): Enable automatic highlighting. Defaults to True.
618
+ log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True.
619
+ log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True.
620
+ log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ".
621
+ highlighter (HighlighterType, optional): Default highlighter.
622
+ legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``.
623
+ safe_box (bool, optional): Restrict box options that don't render on legacy Windows.
624
+ get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log),
625
+ or None for datetime.now.
626
+ get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic.
627
+ """
628
+
629
+ _environ: Mapping[str, str] = os.environ
630
+
631
+ def __init__(
632
+ self,
633
+ *,
634
+ color_system: Optional[
635
+ Literal["auto", "standard", "256", "truecolor", "windows"]
636
+ ] = "auto",
637
+ force_terminal: Optional[bool] = None,
638
+ force_jupyter: Optional[bool] = None,
639
+ force_interactive: Optional[bool] = None,
640
+ soft_wrap: bool = False,
641
+ theme: Optional[Theme] = None,
642
+ stderr: bool = False,
643
+ file: Optional[IO[str]] = None,
644
+ quiet: bool = False,
645
+ width: Optional[int] = None,
646
+ height: Optional[int] = None,
647
+ style: Optional[StyleType] = None,
648
+ no_color: Optional[bool] = None,
649
+ tab_size: int = 8,
650
+ record: bool = False,
651
+ markup: bool = True,
652
+ emoji: bool = True,
653
+ emoji_variant: Optional[EmojiVariant] = None,
654
+ highlight: bool = True,
655
+ log_time: bool = True,
656
+ log_path: bool = True,
657
+ log_time_format: Union[str, FormatTimeCallable] = "[%X]",
658
+ highlighter: Optional["HighlighterType"] = ReprHighlighter(),
659
+ legacy_windows: Optional[bool] = None,
660
+ safe_box: bool = True,
661
+ get_datetime: Optional[Callable[[], datetime]] = None,
662
+ get_time: Optional[Callable[[], float]] = None,
663
+ _environ: Optional[Mapping[str, str]] = None,
664
+ ):
665
+ # Copy of os.environ allows us to replace it for testing
666
+ if _environ is not None:
667
+ self._environ = _environ
668
+
669
+ self.is_jupyter = _is_jupyter() if force_jupyter is None else force_jupyter
670
+ if self.is_jupyter:
671
+ if width is None:
672
+ jupyter_columns = self._environ.get("JUPYTER_COLUMNS")
673
+ if jupyter_columns is not None and jupyter_columns.isdigit():
674
+ width = int(jupyter_columns)
675
+ else:
676
+ width = JUPYTER_DEFAULT_COLUMNS
677
+ if height is None:
678
+ jupyter_lines = self._environ.get("JUPYTER_LINES")
679
+ if jupyter_lines is not None and jupyter_lines.isdigit():
680
+ height = int(jupyter_lines)
681
+ else:
682
+ height = JUPYTER_DEFAULT_LINES
683
+
684
+ self.tab_size = tab_size
685
+ self.record = record
686
+ self._markup = markup
687
+ self._emoji = emoji
688
+ self._emoji_variant: Optional[EmojiVariant] = emoji_variant
689
+ self._highlight = highlight
690
+ self.legacy_windows: bool = (
691
+ (detect_legacy_windows() and not self.is_jupyter)
692
+ if legacy_windows is None
693
+ else legacy_windows
694
+ )
695
+
696
+ if width is None:
697
+ columns = self._environ.get("COLUMNS")
698
+ if columns is not None and columns.isdigit():
699
+ width = int(columns) - self.legacy_windows
700
+ if height is None:
701
+ lines = self._environ.get("LINES")
702
+ if lines is not None and lines.isdigit():
703
+ height = int(lines)
704
+
705
+ self.soft_wrap = soft_wrap
706
+ self._width = width
707
+ self._height = height
708
+
709
+ self._color_system: Optional[ColorSystem]
710
+
711
+ self._force_terminal = None
712
+ if force_terminal is not None:
713
+ self._force_terminal = force_terminal
714
+
715
+ self._file = file
716
+ self.quiet = quiet
717
+ self.stderr = stderr
718
+
719
+ if color_system is None:
720
+ self._color_system = None
721
+ elif color_system == "auto":
722
+ self._color_system = self._detect_color_system()
723
+ else:
724
+ self._color_system = COLOR_SYSTEMS[color_system]
725
+
726
+ self._lock = threading.RLock()
727
+ self._log_render = LogRender(
728
+ show_time=log_time,
729
+ show_path=log_path,
730
+ time_format=log_time_format,
731
+ )
732
+ self.highlighter: HighlighterType = highlighter or _null_highlighter
733
+ self.safe_box = safe_box
734
+ self.get_datetime = get_datetime or datetime.now
735
+ self.get_time = get_time or monotonic
736
+ self.style = style
737
+ self.no_color = (
738
+ no_color if no_color is not None else "NO_COLOR" in self._environ
739
+ )
740
+ self.is_interactive = (
741
+ (self.is_terminal and not self.is_dumb_terminal)
742
+ if force_interactive is None
743
+ else force_interactive
744
+ )
745
+
746
+ self._record_buffer_lock = threading.RLock()
747
+ self._thread_locals = ConsoleThreadLocals(
748
+ theme_stack=ThemeStack(themes.DEFAULT if theme is None else theme)
749
+ )
750
+ self._record_buffer: List[Segment] = []
751
+ self._render_hooks: List[RenderHook] = []
752
+ self._live: Optional["Live"] = None
753
+ self._is_alt_screen = False
754
+
755
+ def __repr__(self) -> str:
756
+ return f"<console width={self.width} {self._color_system!s}>"
757
+
758
+ @property
759
+ def file(self) -> IO[str]:
760
+ """Get the file object to write to."""
761
+ file = self._file or (sys.stderr if self.stderr else sys.stdout)
762
+ file = getattr(file, "rich_proxied_file", file)
763
+ if file is None:
764
+ file = NULL_FILE
765
+ return file
766
+
767
+ @file.setter
768
+ def file(self, new_file: IO[str]) -> None:
769
+ """Set a new file object."""
770
+ self._file = new_file
771
+
772
+ @property
773
+ def _buffer(self) -> List[Segment]:
774
+ """Get a thread local buffer."""
775
+ return self._thread_locals.buffer
776
+
777
+ @property
778
+ def _buffer_index(self) -> int:
779
+ """Get a thread local buffer."""
780
+ return self._thread_locals.buffer_index
781
+
782
+ @_buffer_index.setter
783
+ def _buffer_index(self, value: int) -> None:
784
+ self._thread_locals.buffer_index = value
785
+
786
+ @property
787
+ def _theme_stack(self) -> ThemeStack:
788
+ """Get the thread local theme stack."""
789
+ return self._thread_locals.theme_stack
790
+
791
+ def _detect_color_system(self) -> Optional[ColorSystem]:
792
+ """Detect color system from env vars."""
793
+ if self.is_jupyter:
794
+ return ColorSystem.TRUECOLOR
795
+ if not self.is_terminal or self.is_dumb_terminal:
796
+ return None
797
+ if WINDOWS: # pragma: no cover
798
+ if self.legacy_windows: # pragma: no cover
799
+ return ColorSystem.WINDOWS
800
+ windows_console_features = get_windows_console_features()
801
+ return (
802
+ ColorSystem.TRUECOLOR
803
+ if windows_console_features.truecolor
804
+ else ColorSystem.EIGHT_BIT
805
+ )
806
+ else:
807
+ color_term = self._environ.get("COLORTERM", "").strip().lower()
808
+ if color_term in ("truecolor", "24bit"):
809
+ return ColorSystem.TRUECOLOR
810
+ term = self._environ.get("TERM", "").strip().lower()
811
+ _term_name, _hyphen, colors = term.rpartition("-")
812
+ color_system = _TERM_COLORS.get(colors, ColorSystem.STANDARD)
813
+ return color_system
814
+
815
+ def _enter_buffer(self) -> None:
816
+ """Enter in to a buffer context, and buffer all output."""
817
+ self._buffer_index += 1
818
+
819
+ def _exit_buffer(self) -> None:
820
+ """Leave buffer context, and render content if required."""
821
+ self._buffer_index -= 1
822
+ self._check_buffer()
823
+
824
+ def set_live(self, live: "Live") -> None:
825
+ """Set Live instance. Used by Live context manager.
826
+
827
+ Args:
828
+ live (Live): Live instance using this Console.
829
+
830
+ Raises:
831
+ errors.LiveError: If this Console has a Live context currently active.
832
+ """
833
+ with self._lock:
834
+ if self._live is not None:
835
+ raise errors.LiveError("Only one live display may be active at once")
836
+ self._live = live
837
+
838
+ def clear_live(self) -> None:
839
+ """Clear the Live instance."""
840
+ with self._lock:
841
+ self._live = None
842
+
843
+ def push_render_hook(self, hook: RenderHook) -> None:
844
+ """Add a new render hook to the stack.
845
+
846
+ Args:
847
+ hook (RenderHook): Render hook instance.
848
+ """
849
+ with self._lock:
850
+ self._render_hooks.append(hook)
851
+
852
+ def pop_render_hook(self) -> None:
853
+ """Pop the last renderhook from the stack."""
854
+ with self._lock:
855
+ self._render_hooks.pop()
856
+
857
+ def __enter__(self) -> "Console":
858
+ """Own context manager to enter buffer context."""
859
+ self._enter_buffer()
860
+ return self
861
+
862
+ def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> None:
863
+ """Exit buffer context."""
864
+ self._exit_buffer()
865
+
866
+ def begin_capture(self) -> None:
867
+ """Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output."""
868
+ self._enter_buffer()
869
+
870
+ def end_capture(self) -> str:
871
+ """End capture mode and return captured string.
872
+
873
+ Returns:
874
+ str: Console output.
875
+ """
876
+ render_result = self._render_buffer(self._buffer)
877
+ del self._buffer[:]
878
+ self._exit_buffer()
879
+ return render_result
880
+
881
+ def push_theme(self, theme: Theme, *, inherit: bool = True) -> None:
882
+ """Push a new theme on to the top of the stack, replacing the styles from the previous theme.
883
+ Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather
884
+ than calling this method directly.
885
+
886
+ Args:
887
+ theme (Theme): A theme instance.
888
+ inherit (bool, optional): Inherit existing styles. Defaults to True.
889
+ """
890
+ self._theme_stack.push_theme(theme, inherit=inherit)
891
+
892
+ def pop_theme(self) -> None:
893
+ """Remove theme from top of stack, restoring previous theme."""
894
+ self._theme_stack.pop_theme()
895
+
896
+ def use_theme(self, theme: Theme, *, inherit: bool = True) -> ThemeContext:
897
+ """Use a different theme for the duration of the context manager.
898
+
899
+ Args:
900
+ theme (Theme): Theme instance to user.
901
+ inherit (bool, optional): Inherit existing console styles. Defaults to True.
902
+
903
+ Returns:
904
+ ThemeContext: [description]
905
+ """
906
+ return ThemeContext(self, theme, inherit)
907
+
908
+ @property
909
+ def color_system(self) -> Optional[str]:
910
+ """Get color system string.
911
+
912
+ Returns:
913
+ Optional[str]: "standard", "256" or "truecolor".
914
+ """
915
+
916
+ if self._color_system is not None:
917
+ return _COLOR_SYSTEMS_NAMES[self._color_system]
918
+ else:
919
+ return None
920
+
921
+ @property
922
+ def encoding(self) -> str:
923
+ """Get the encoding of the console file, e.g. ``"utf-8"``.
924
+
925
+ Returns:
926
+ str: A standard encoding string.
927
+ """
928
+ return (getattr(self.file, "encoding", "utf-8") or "utf-8").lower()
929
+
930
+ @property
931
+ def is_terminal(self) -> bool:
932
+ """Check if the console is writing to a terminal.
933
+
934
+ Returns:
935
+ bool: True if the console writing to a device capable of
936
+ understanding terminal codes, otherwise False.
937
+ """
938
+ if self._force_terminal is not None:
939
+ return self._force_terminal
940
+
941
+ if hasattr(sys.stdin, "__module__") and sys.stdin.__module__.startswith(
942
+ "idlelib"
943
+ ):
944
+ # Return False for Idle which claims to be a tty but can't handle ansi codes
945
+ return False
946
+
947
+ if self.is_jupyter:
948
+ # return False for Jupyter, which may have FORCE_COLOR set
949
+ return False
950
+
951
+ # If FORCE_COLOR env var has any value at all, we assume a terminal.
952
+ force_color = self._environ.get("FORCE_COLOR")
953
+ if force_color is not None:
954
+ self._force_terminal = True
955
+ return True
956
+
957
+ isatty: Optional[Callable[[], bool]] = getattr(self.file, "isatty", None)
958
+ try:
959
+ return False if isatty is None else isatty()
960
+ except ValueError:
961
+ # in some situation (at the end of a pytest run for example) isatty() can raise
962
+ # ValueError: I/O operation on closed file
963
+ # return False because we aren't in a terminal anymore
964
+ return False
965
+
966
+ @property
967
+ def is_dumb_terminal(self) -> bool:
968
+ """Detect dumb terminal.
969
+
970
+ Returns:
971
+ bool: True if writing to a dumb terminal, otherwise False.
972
+
973
+ """
974
+ _term = self._environ.get("TERM", "")
975
+ is_dumb = _term.lower() in ("dumb", "unknown")
976
+ return self.is_terminal and is_dumb
977
+
978
+ @property
979
+ def options(self) -> ConsoleOptions:
980
+ """Get default console options."""
981
+ return ConsoleOptions(
982
+ max_height=self.size.height,
983
+ size=self.size,
984
+ legacy_windows=self.legacy_windows,
985
+ min_width=1,
986
+ max_width=self.width,
987
+ encoding=self.encoding,
988
+ is_terminal=self.is_terminal,
989
+ )
990
+
991
+ @property
992
+ def size(self) -> ConsoleDimensions:
993
+ """Get the size of the console.
994
+
995
+ Returns:
996
+ ConsoleDimensions: A named tuple containing the dimensions.
997
+ """
998
+
999
+ if self._width is not None and self._height is not None:
1000
+ return ConsoleDimensions(self._width - self.legacy_windows, self._height)
1001
+
1002
+ if self.is_dumb_terminal:
1003
+ return ConsoleDimensions(80, 25)
1004
+
1005
+ width: Optional[int] = None
1006
+ height: Optional[int] = None
1007
+
1008
+ streams = _STD_STREAMS_OUTPUT if WINDOWS else _STD_STREAMS
1009
+ for file_descriptor in streams:
1010
+ try:
1011
+ width, height = os.get_terminal_size(file_descriptor)
1012
+ except (AttributeError, ValueError, OSError): # Probably not a terminal
1013
+ pass
1014
+ else:
1015
+ break
1016
+
1017
+ columns = self._environ.get("COLUMNS")
1018
+ if columns is not None and columns.isdigit():
1019
+ width = int(columns)
1020
+ lines = self._environ.get("LINES")
1021
+ if lines is not None and lines.isdigit():
1022
+ height = int(lines)
1023
+
1024
+ # get_terminal_size can report 0, 0 if run from pseudo-terminal
1025
+ width = width or 80
1026
+ height = height or 25
1027
+ return ConsoleDimensions(
1028
+ width - self.legacy_windows if self._width is None else self._width,
1029
+ height if self._height is None else self._height,
1030
+ )
1031
+
1032
+ @size.setter
1033
+ def size(self, new_size: Tuple[int, int]) -> None:
1034
+ """Set a new size for the terminal.
1035
+
1036
+ Args:
1037
+ new_size (Tuple[int, int]): New width and height.
1038
+ """
1039
+ width, height = new_size
1040
+ self._width = width
1041
+ self._height = height
1042
+
1043
+ @property
1044
+ def width(self) -> int:
1045
+ """Get the width of the console.
1046
+
1047
+ Returns:
1048
+ int: The width (in characters) of the console.
1049
+ """
1050
+ return self.size.width
1051
+
1052
+ @width.setter
1053
+ def width(self, width: int) -> None:
1054
+ """Set width.
1055
+
1056
+ Args:
1057
+ width (int): New width.
1058
+ """
1059
+ self._width = width
1060
+
1061
+ @property
1062
+ def height(self) -> int:
1063
+ """Get the height of the console.
1064
+
1065
+ Returns:
1066
+ int: The height (in lines) of the console.
1067
+ """
1068
+ return self.size.height
1069
+
1070
+ @height.setter
1071
+ def height(self, height: int) -> None:
1072
+ """Set height.
1073
+
1074
+ Args:
1075
+ height (int): new height.
1076
+ """
1077
+ self._height = height
1078
+
1079
+ def bell(self) -> None:
1080
+ """Play a 'bell' sound (if supported by the terminal)."""
1081
+ self.control(Control.bell())
1082
+
1083
+ def capture(self) -> Capture:
1084
+ """A context manager to *capture* the result of print() or log() in a string,
1085
+ rather than writing it to the console.
1086
+
1087
+ Example:
1088
+ >>> from rich.console import Console
1089
+ >>> console = Console()
1090
+ >>> with console.capture() as capture:
1091
+ ... console.print("[bold magenta]Hello World[/]")
1092
+ >>> print(capture.get())
1093
+
1094
+ Returns:
1095
+ Capture: Context manager with disables writing to the terminal.
1096
+ """
1097
+ capture = Capture(self)
1098
+ return capture
1099
+
1100
+ def pager(
1101
+ self, pager: Optional[Pager] = None, styles: bool = False, links: bool = False
1102
+ ) -> PagerContext:
1103
+ """A context manager to display anything printed within a "pager". The pager application
1104
+ is defined by the system and will typically support at least pressing a key to scroll.
1105
+
1106
+ Args:
1107
+ pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None.
1108
+ styles (bool, optional): Show styles in pager. Defaults to False.
1109
+ links (bool, optional): Show links in pager. Defaults to False.
1110
+
1111
+ Example:
1112
+ >>> from rich.console import Console
1113
+ >>> from rich.__main__ import make_test_card
1114
+ >>> console = Console()
1115
+ >>> with console.pager():
1116
+ console.print(make_test_card())
1117
+
1118
+ Returns:
1119
+ PagerContext: A context manager.
1120
+ """
1121
+ return PagerContext(self, pager=pager, styles=styles, links=links)
1122
+
1123
+ def line(self, count: int = 1) -> None:
1124
+ """Write new line(s).
1125
+
1126
+ Args:
1127
+ count (int, optional): Number of new lines. Defaults to 1.
1128
+ """
1129
+
1130
+ assert count >= 0, "count must be >= 0"
1131
+ self.print(NewLine(count))
1132
+
1133
+ def clear(self, home: bool = True) -> None:
1134
+ """Clear the screen.
1135
+
1136
+ Args:
1137
+ home (bool, optional): Also move the cursor to 'home' position. Defaults to True.
1138
+ """
1139
+ if home:
1140
+ self.control(Control.clear(), Control.home())
1141
+ else:
1142
+ self.control(Control.clear())
1143
+
1144
+ def status(
1145
+ self,
1146
+ status: RenderableType,
1147
+ *,
1148
+ spinner: str = "dots",
1149
+ spinner_style: StyleType = "status.spinner",
1150
+ speed: float = 1.0,
1151
+ refresh_per_second: float = 12.5,
1152
+ ) -> "Status":
1153
+ """Display a status and spinner.
1154
+
1155
+ Args:
1156
+ status (RenderableType): A status renderable (str or Text typically).
1157
+ spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots".
1158
+ spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner".
1159
+ speed (float, optional): Speed factor for spinner animation. Defaults to 1.0.
1160
+ refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5.
1161
+
1162
+ Returns:
1163
+ Status: A Status object that may be used as a context manager.
1164
+ """
1165
+ from .status import Status
1166
+
1167
+ status_renderable = Status(
1168
+ status,
1169
+ console=self,
1170
+ spinner=spinner,
1171
+ spinner_style=spinner_style,
1172
+ speed=speed,
1173
+ refresh_per_second=refresh_per_second,
1174
+ )
1175
+ return status_renderable
1176
+
1177
+ def show_cursor(self, show: bool = True) -> bool:
1178
+ """Show or hide the cursor.
1179
+
1180
+ Args:
1181
+ show (bool, optional): Set visibility of the cursor.
1182
+ """
1183
+ if self.is_terminal:
1184
+ self.control(Control.show_cursor(show))
1185
+ return True
1186
+ return False
1187
+
1188
+ def set_alt_screen(self, enable: bool = True) -> bool:
1189
+ """Enables alternative screen mode.
1190
+
1191
+ Note, if you enable this mode, you should ensure that is disabled before
1192
+ the application exits. See :meth:`~rich.Console.screen` for a context manager
1193
+ that handles this for you.
1194
+
1195
+ Args:
1196
+ enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True.
1197
+
1198
+ Returns:
1199
+ bool: True if the control codes were written.
1200
+
1201
+ """
1202
+ changed = False
1203
+ if self.is_terminal and not self.legacy_windows:
1204
+ self.control(Control.alt_screen(enable))
1205
+ changed = True
1206
+ self._is_alt_screen = enable
1207
+ return changed
1208
+
1209
+ @property
1210
+ def is_alt_screen(self) -> bool:
1211
+ """Check if the alt screen was enabled.
1212
+
1213
+ Returns:
1214
+ bool: True if the alt screen was enabled, otherwise False.
1215
+ """
1216
+ return self._is_alt_screen
1217
+
1218
+ def set_window_title(self, title: str) -> bool:
1219
+ """Set the title of the console terminal window.
1220
+
1221
+ Warning: There is no means within Rich of "resetting" the window title to its
1222
+ previous value, meaning the title you set will persist even after your application
1223
+ exits.
1224
+
1225
+ ``fish`` shell resets the window title before and after each command by default,
1226
+ negating this issue. Windows Terminal and command prompt will also reset the title for you.
1227
+ Most other shells and terminals, however, do not do this.
1228
+
1229
+ Some terminals may require configuration changes before you can set the title.
1230
+ Some terminals may not support setting the title at all.
1231
+
1232
+ Other software (including the terminal itself, the shell, custom prompts, plugins, etc.)
1233
+ may also set the terminal window title. This could result in whatever value you write
1234
+ using this method being overwritten.
1235
+
1236
+ Args:
1237
+ title (str): The new title of the terminal window.
1238
+
1239
+ Returns:
1240
+ bool: True if the control code to change the terminal title was
1241
+ written, otherwise False. Note that a return value of True
1242
+ does not guarantee that the window title has actually changed,
1243
+ since the feature may be unsupported/disabled in some terminals.
1244
+ """
1245
+ if self.is_terminal:
1246
+ self.control(Control.title(title))
1247
+ return True
1248
+ return False
1249
+
1250
+ def screen(
1251
+ self, hide_cursor: bool = True, style: Optional[StyleType] = None
1252
+ ) -> "ScreenContext":
1253
+ """Context manager to enable and disable 'alternative screen' mode.
1254
+
1255
+ Args:
1256
+ hide_cursor (bool, optional): Also hide the cursor. Defaults to False.
1257
+ style (Style, optional): Optional style for screen. Defaults to None.
1258
+
1259
+ Returns:
1260
+ ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit.
1261
+ """
1262
+ return ScreenContext(self, hide_cursor=hide_cursor, style=style or "")
1263
+
1264
+ def measure(
1265
+ self, renderable: RenderableType, *, options: Optional[ConsoleOptions] = None
1266
+ ) -> Measurement:
1267
+ """Measure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains
1268
+ information regarding the number of characters required to print the renderable.
1269
+
1270
+ Args:
1271
+ renderable (RenderableType): Any renderable or string.
1272
+ options (Optional[ConsoleOptions], optional): Options to use when measuring, or None
1273
+ to use default options. Defaults to None.
1274
+
1275
+ Returns:
1276
+ Measurement: A measurement of the renderable.
1277
+ """
1278
+ measurement = Measurement.get(self, options or self.options, renderable)
1279
+ return measurement
1280
+
1281
+ def render(
1282
+ self, renderable: RenderableType, options: Optional[ConsoleOptions] = None
1283
+ ) -> Iterable[Segment]:
1284
+ """Render an object in to an iterable of `Segment` instances.
1285
+
1286
+ This method contains the logic for rendering objects with the console protocol.
1287
+ You are unlikely to need to use it directly, unless you are extending the library.
1288
+
1289
+ Args:
1290
+ renderable (RenderableType): An object supporting the console protocol, or
1291
+ an object that may be converted to a string.
1292
+ options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None.
1293
+
1294
+ Returns:
1295
+ Iterable[Segment]: An iterable of segments that may be rendered.
1296
+ """
1297
+
1298
+ _options = options or self.options
1299
+ if _options.max_width < 1:
1300
+ # No space to render anything. This prevents potential recursion errors.
1301
+ return
1302
+ render_iterable: RenderResult
1303
+
1304
+ renderable = rich_cast(renderable)
1305
+ if hasattr(renderable, "__rich_console__") and not isclass(renderable):
1306
+ render_iterable = renderable.__rich_console__(self, _options)
1307
+ elif isinstance(renderable, str):
1308
+ text_renderable = self.render_str(
1309
+ renderable, highlight=_options.highlight, markup=_options.markup
1310
+ )
1311
+ render_iterable = text_renderable.__rich_console__(self, _options)
1312
+ else:
1313
+ raise errors.NotRenderableError(
1314
+ f"Unable to render {renderable!r}; "
1315
+ "A str, Segment or object with __rich_console__ method is required"
1316
+ )
1317
+
1318
+ try:
1319
+ iter_render = iter(render_iterable)
1320
+ except TypeError:
1321
+ raise errors.NotRenderableError(
1322
+ f"object {render_iterable!r} is not renderable"
1323
+ )
1324
+ _Segment = Segment
1325
+ _options = _options.reset_height()
1326
+ for render_output in iter_render:
1327
+ if isinstance(render_output, _Segment):
1328
+ yield render_output
1329
+ else:
1330
+ yield from self.render(render_output, _options)
1331
+
1332
+ def render_lines(
1333
+ self,
1334
+ renderable: RenderableType,
1335
+ options: Optional[ConsoleOptions] = None,
1336
+ *,
1337
+ style: Optional[Style] = None,
1338
+ pad: bool = True,
1339
+ new_lines: bool = False,
1340
+ ) -> List[List[Segment]]:
1341
+ """Render objects in to a list of lines.
1342
+
1343
+ The output of render_lines is useful when further formatting of rendered console text
1344
+ is required, such as the Panel class which draws a border around any renderable object.
1345
+
1346
+ Args:
1347
+ renderable (RenderableType): Any object renderable in the console.
1348
+ options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``.
1349
+ style (Style, optional): Optional style to apply to renderables. Defaults to ``None``.
1350
+ pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``.
1351
+ new_lines (bool, optional): Include "\n" characters at end of lines.
1352
+
1353
+ Returns:
1354
+ List[List[Segment]]: A list of lines, where a line is a list of Segment objects.
1355
+ """
1356
+ with self._lock:
1357
+ render_options = options or self.options
1358
+ _rendered = self.render(renderable, render_options)
1359
+ if style:
1360
+ _rendered = Segment.apply_style(_rendered, style)
1361
+
1362
+ render_height = render_options.height
1363
+ if render_height is not None:
1364
+ render_height = max(0, render_height)
1365
+
1366
+ lines = list(
1367
+ islice(
1368
+ Segment.split_and_crop_lines(
1369
+ _rendered,
1370
+ render_options.max_width,
1371
+ include_new_lines=new_lines,
1372
+ pad=pad,
1373
+ style=style,
1374
+ ),
1375
+ None,
1376
+ render_height,
1377
+ )
1378
+ )
1379
+ if render_options.height is not None:
1380
+ extra_lines = render_options.height - len(lines)
1381
+ if extra_lines > 0:
1382
+ pad_line = [
1383
+ (
1384
+ [
1385
+ Segment(" " * render_options.max_width, style),
1386
+ Segment("\n"),
1387
+ ]
1388
+ if new_lines
1389
+ else [Segment(" " * render_options.max_width, style)]
1390
+ )
1391
+ ]
1392
+ lines.extend(pad_line * extra_lines)
1393
+
1394
+ return lines
1395
+
1396
+ def render_str(
1397
+ self,
1398
+ text: str,
1399
+ *,
1400
+ style: Union[str, Style] = "",
1401
+ justify: Optional[JustifyMethod] = None,
1402
+ overflow: Optional[OverflowMethod] = None,
1403
+ emoji: Optional[bool] = None,
1404
+ markup: Optional[bool] = None,
1405
+ highlight: Optional[bool] = None,
1406
+ highlighter: Optional[HighlighterType] = None,
1407
+ ) -> "Text":
1408
+ """Convert a string to a Text instance. This is called automatically if
1409
+ you print or log a string.
1410
+
1411
+ Args:
1412
+ text (str): Text to render.
1413
+ style (Union[str, Style], optional): Style to apply to rendered text.
1414
+ justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``.
1415
+ overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``.
1416
+ emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default.
1417
+ markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default.
1418
+ highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default.
1419
+ highlighter (HighlighterType, optional): Optional highlighter to apply.
1420
+ Returns:
1421
+ ConsoleRenderable: Renderable object.
1422
+
1423
+ """
1424
+ emoji_enabled = emoji or (emoji is None and self._emoji)
1425
+ markup_enabled = markup or (markup is None and self._markup)
1426
+ highlight_enabled = highlight or (highlight is None and self._highlight)
1427
+
1428
+ if markup_enabled:
1429
+ rich_text = render_markup(
1430
+ text,
1431
+ style=style,
1432
+ emoji=emoji_enabled,
1433
+ emoji_variant=self._emoji_variant,
1434
+ )
1435
+ rich_text.justify = justify
1436
+ rich_text.overflow = overflow
1437
+ else:
1438
+ rich_text = Text(
1439
+ (
1440
+ _emoji_replace(text, default_variant=self._emoji_variant)
1441
+ if emoji_enabled
1442
+ else text
1443
+ ),
1444
+ justify=justify,
1445
+ overflow=overflow,
1446
+ style=style,
1447
+ )
1448
+
1449
+ _highlighter = (highlighter or self.highlighter) if highlight_enabled else None
1450
+ if _highlighter is not None:
1451
+ highlight_text = _highlighter(str(rich_text))
1452
+ highlight_text.copy_styles(rich_text)
1453
+ return highlight_text
1454
+
1455
+ return rich_text
1456
+
1457
+ def get_style(
1458
+ self, name: Union[str, Style], *, default: Optional[Union[Style, str]] = None
1459
+ ) -> Style:
1460
+ """Get a Style instance by its theme name or parse a definition.
1461
+
1462
+ Args:
1463
+ name (str): The name of a style or a style definition.
1464
+
1465
+ Returns:
1466
+ Style: A Style object.
1467
+
1468
+ Raises:
1469
+ MissingStyle: If no style could be parsed from name.
1470
+
1471
+ """
1472
+ if isinstance(name, Style):
1473
+ return name
1474
+
1475
+ try:
1476
+ style = self._theme_stack.get(name)
1477
+ if style is None:
1478
+ style = Style.parse(name)
1479
+ return style.copy() if style.link else style
1480
+ except errors.StyleSyntaxError as error:
1481
+ if default is not None:
1482
+ return self.get_style(default)
1483
+ raise errors.MissingStyle(
1484
+ f"Failed to get style {name!r}; {error}"
1485
+ ) from None
1486
+
1487
+ def _collect_renderables(
1488
+ self,
1489
+ objects: Iterable[Any],
1490
+ sep: str,
1491
+ end: str,
1492
+ *,
1493
+ justify: Optional[JustifyMethod] = None,
1494
+ emoji: Optional[bool] = None,
1495
+ markup: Optional[bool] = None,
1496
+ highlight: Optional[bool] = None,
1497
+ ) -> List[ConsoleRenderable]:
1498
+ """Combine a number of renderables and text into one renderable.
1499
+
1500
+ Args:
1501
+ objects (Iterable[Any]): Anything that Rich can render.
1502
+ sep (str): String to write between print data.
1503
+ end (str): String to write at end of print data.
1504
+ justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
1505
+ emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default.
1506
+ markup (Optional[bool], optional): Enable markup, or ``None`` to use console default.
1507
+ highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default.
1508
+
1509
+ Returns:
1510
+ List[ConsoleRenderable]: A list of things to render.
1511
+ """
1512
+ renderables: List[ConsoleRenderable] = []
1513
+ _append = renderables.append
1514
+ text: List[Text] = []
1515
+ append_text = text.append
1516
+
1517
+ append = _append
1518
+ if justify in ("left", "center", "right"):
1519
+
1520
+ def align_append(renderable: RenderableType) -> None:
1521
+ _append(Align(renderable, cast(AlignMethod, justify)))
1522
+
1523
+ append = align_append
1524
+
1525
+ _highlighter: HighlighterType = _null_highlighter
1526
+ if highlight or (highlight is None and self._highlight):
1527
+ _highlighter = self.highlighter
1528
+
1529
+ def check_text() -> None:
1530
+ if text:
1531
+ sep_text = Text(sep, justify=justify, end=end)
1532
+ append(sep_text.join(text))
1533
+ text.clear()
1534
+
1535
+ for renderable in objects:
1536
+ renderable = rich_cast(renderable)
1537
+ if isinstance(renderable, str):
1538
+ append_text(
1539
+ self.render_str(
1540
+ renderable,
1541
+ emoji=emoji,
1542
+ markup=markup,
1543
+ highlight=highlight,
1544
+ highlighter=_highlighter,
1545
+ )
1546
+ )
1547
+ elif isinstance(renderable, Text):
1548
+ append_text(renderable)
1549
+ elif isinstance(renderable, ConsoleRenderable):
1550
+ check_text()
1551
+ append(renderable)
1552
+ elif is_expandable(renderable):
1553
+ check_text()
1554
+ append(Pretty(renderable, highlighter=_highlighter))
1555
+ else:
1556
+ append_text(_highlighter(str(renderable)))
1557
+
1558
+ check_text()
1559
+
1560
+ if self.style is not None:
1561
+ style = self.get_style(self.style)
1562
+ renderables = [Styled(renderable, style) for renderable in renderables]
1563
+
1564
+ return renderables
1565
+
1566
+ def rule(
1567
+ self,
1568
+ title: TextType = "",
1569
+ *,
1570
+ characters: str = "─",
1571
+ style: Union[str, Style] = "rule.line",
1572
+ align: AlignMethod = "center",
1573
+ ) -> None:
1574
+ """Draw a line with optional centered title.
1575
+
1576
+ Args:
1577
+ title (str, optional): Text to render over the rule. Defaults to "".
1578
+ characters (str, optional): Character(s) to form the line. Defaults to "─".
1579
+ style (str, optional): Style of line. Defaults to "rule.line".
1580
+ align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center".
1581
+ """
1582
+ from .rule import Rule
1583
+
1584
+ rule = Rule(title=title, characters=characters, style=style, align=align)
1585
+ self.print(rule)
1586
+
1587
+ def control(self, *control: Control) -> None:
1588
+ """Insert non-printing control codes.
1589
+
1590
+ Args:
1591
+ control_codes (str): Control codes, such as those that may move the cursor.
1592
+ """
1593
+ if not self.is_dumb_terminal:
1594
+ with self:
1595
+ self._buffer.extend(_control.segment for _control in control)
1596
+
1597
+ def out(
1598
+ self,
1599
+ *objects: Any,
1600
+ sep: str = " ",
1601
+ end: str = "\n",
1602
+ style: Optional[Union[str, Style]] = None,
1603
+ highlight: Optional[bool] = None,
1604
+ ) -> None:
1605
+ """Output to the terminal. This is a low-level way of writing to the terminal which unlike
1606
+ :meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will
1607
+ optionally apply highlighting and a basic style.
1608
+
1609
+ Args:
1610
+ sep (str, optional): String to write between print data. Defaults to " ".
1611
+ end (str, optional): String to write at end of print data. Defaults to "\\\\n".
1612
+ style (Union[str, Style], optional): A style to apply to output. Defaults to None.
1613
+ highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use
1614
+ console default. Defaults to ``None``.
1615
+ """
1616
+ raw_output: str = sep.join(str(_object) for _object in objects)
1617
+ self.print(
1618
+ raw_output,
1619
+ style=style,
1620
+ highlight=highlight,
1621
+ emoji=False,
1622
+ markup=False,
1623
+ no_wrap=True,
1624
+ overflow="ignore",
1625
+ crop=False,
1626
+ end=end,
1627
+ )
1628
+
1629
+ def print(
1630
+ self,
1631
+ *objects: Any,
1632
+ sep: str = " ",
1633
+ end: str = "\n",
1634
+ style: Optional[Union[str, Style]] = None,
1635
+ justify: Optional[JustifyMethod] = None,
1636
+ overflow: Optional[OverflowMethod] = None,
1637
+ no_wrap: Optional[bool] = None,
1638
+ emoji: Optional[bool] = None,
1639
+ markup: Optional[bool] = None,
1640
+ highlight: Optional[bool] = None,
1641
+ width: Optional[int] = None,
1642
+ height: Optional[int] = None,
1643
+ crop: bool = True,
1644
+ soft_wrap: Optional[bool] = None,
1645
+ new_line_start: bool = False,
1646
+ ) -> None:
1647
+ """Print to the console.
1648
+
1649
+ Args:
1650
+ objects (positional args): Objects to log to the terminal.
1651
+ sep (str, optional): String to write between print data. Defaults to " ".
1652
+ end (str, optional): String to write at end of print data. Defaults to "\\\\n".
1653
+ style (Union[str, Style], optional): A style to apply to output. Defaults to None.
1654
+ justify (str, optional): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``.
1655
+ overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None.
1656
+ no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to None.
1657
+ emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to ``None``.
1658
+ markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to ``None``.
1659
+ highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``.
1660
+ width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``.
1661
+ crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True.
1662
+ soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for
1663
+ Console default. Defaults to ``None``.
1664
+ new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``.
1665
+ """
1666
+ if not objects:
1667
+ objects = (NewLine(),)
1668
+
1669
+ if soft_wrap is None:
1670
+ soft_wrap = self.soft_wrap
1671
+ if soft_wrap:
1672
+ if no_wrap is None:
1673
+ no_wrap = True
1674
+ if overflow is None:
1675
+ overflow = "ignore"
1676
+ crop = False
1677
+ render_hooks = self._render_hooks[:]
1678
+ with self:
1679
+ renderables = self._collect_renderables(
1680
+ objects,
1681
+ sep,
1682
+ end,
1683
+ justify=justify,
1684
+ emoji=emoji,
1685
+ markup=markup,
1686
+ highlight=highlight,
1687
+ )
1688
+ for hook in render_hooks:
1689
+ renderables = hook.process_renderables(renderables)
1690
+ render_options = self.options.update(
1691
+ justify=justify,
1692
+ overflow=overflow,
1693
+ width=min(width, self.width) if width is not None else NO_CHANGE,
1694
+ height=height,
1695
+ no_wrap=no_wrap,
1696
+ markup=markup,
1697
+ highlight=highlight,
1698
+ )
1699
+
1700
+ new_segments: List[Segment] = []
1701
+ extend = new_segments.extend
1702
+ render = self.render
1703
+ if style is None:
1704
+ for renderable in renderables:
1705
+ extend(render(renderable, render_options))
1706
+ else:
1707
+ for renderable in renderables:
1708
+ extend(
1709
+ Segment.apply_style(
1710
+ render(renderable, render_options), self.get_style(style)
1711
+ )
1712
+ )
1713
+ if new_line_start:
1714
+ if (
1715
+ len("".join(segment.text for segment in new_segments).splitlines())
1716
+ > 1
1717
+ ):
1718
+ new_segments.insert(0, Segment.line())
1719
+ if crop:
1720
+ buffer_extend = self._buffer.extend
1721
+ for line in Segment.split_and_crop_lines(
1722
+ new_segments, self.width, pad=False
1723
+ ):
1724
+ buffer_extend(line)
1725
+ else:
1726
+ self._buffer.extend(new_segments)
1727
+
1728
+ def print_json(
1729
+ self,
1730
+ json: Optional[str] = None,
1731
+ *,
1732
+ data: Any = None,
1733
+ indent: Union[None, int, str] = 2,
1734
+ highlight: bool = True,
1735
+ skip_keys: bool = False,
1736
+ ensure_ascii: bool = False,
1737
+ check_circular: bool = True,
1738
+ allow_nan: bool = True,
1739
+ default: Optional[Callable[[Any], Any]] = None,
1740
+ sort_keys: bool = False,
1741
+ ) -> None:
1742
+ """Pretty prints JSON. Output will be valid JSON.
1743
+
1744
+ Args:
1745
+ json (Optional[str]): A string containing JSON.
1746
+ data (Any): If json is not supplied, then encode this data.
1747
+ indent (Union[None, int, str], optional): Number of spaces to indent. Defaults to 2.
1748
+ highlight (bool, optional): Enable highlighting of output: Defaults to True.
1749
+ skip_keys (bool, optional): Skip keys not of a basic type. Defaults to False.
1750
+ ensure_ascii (bool, optional): Escape all non-ascii characters. Defaults to False.
1751
+ check_circular (bool, optional): Check for circular references. Defaults to True.
1752
+ allow_nan (bool, optional): Allow NaN and Infinity values. Defaults to True.
1753
+ default (Callable, optional): A callable that converts values that can not be encoded
1754
+ in to something that can be JSON encoded. Defaults to None.
1755
+ sort_keys (bool, optional): Sort dictionary keys. Defaults to False.
1756
+ """
1757
+ from pip._vendor.rich.json import JSON
1758
+
1759
+ if json is None:
1760
+ json_renderable = JSON.from_data(
1761
+ data,
1762
+ indent=indent,
1763
+ highlight=highlight,
1764
+ skip_keys=skip_keys,
1765
+ ensure_ascii=ensure_ascii,
1766
+ check_circular=check_circular,
1767
+ allow_nan=allow_nan,
1768
+ default=default,
1769
+ sort_keys=sort_keys,
1770
+ )
1771
+ else:
1772
+ if not isinstance(json, str):
1773
+ raise TypeError(
1774
+ f"json must be str. Did you mean print_json(data={json!r}) ?"
1775
+ )
1776
+ json_renderable = JSON(
1777
+ json,
1778
+ indent=indent,
1779
+ highlight=highlight,
1780
+ skip_keys=skip_keys,
1781
+ ensure_ascii=ensure_ascii,
1782
+ check_circular=check_circular,
1783
+ allow_nan=allow_nan,
1784
+ default=default,
1785
+ sort_keys=sort_keys,
1786
+ )
1787
+ self.print(json_renderable, soft_wrap=True)
1788
+
1789
+ def update_screen(
1790
+ self,
1791
+ renderable: RenderableType,
1792
+ *,
1793
+ region: Optional[Region] = None,
1794
+ options: Optional[ConsoleOptions] = None,
1795
+ ) -> None:
1796
+ """Update the screen at a given offset.
1797
+
1798
+ Args:
1799
+ renderable (RenderableType): A Rich renderable.
1800
+ region (Region, optional): Region of screen to update, or None for entire screen. Defaults to None.
1801
+ x (int, optional): x offset. Defaults to 0.
1802
+ y (int, optional): y offset. Defaults to 0.
1803
+
1804
+ Raises:
1805
+ errors.NoAltScreen: If the Console isn't in alt screen mode.
1806
+
1807
+ """
1808
+ if not self.is_alt_screen:
1809
+ raise errors.NoAltScreen("Alt screen must be enabled to call update_screen")
1810
+ render_options = options or self.options
1811
+ if region is None:
1812
+ x = y = 0
1813
+ render_options = render_options.update_dimensions(
1814
+ render_options.max_width, render_options.height or self.height
1815
+ )
1816
+ else:
1817
+ x, y, width, height = region
1818
+ render_options = render_options.update_dimensions(width, height)
1819
+
1820
+ lines = self.render_lines(renderable, options=render_options)
1821
+ self.update_screen_lines(lines, x, y)
1822
+
1823
+ def update_screen_lines(
1824
+ self, lines: List[List[Segment]], x: int = 0, y: int = 0
1825
+ ) -> None:
1826
+ """Update lines of the screen at a given offset.
1827
+
1828
+ Args:
1829
+ lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`).
1830
+ x (int, optional): x offset (column no). Defaults to 0.
1831
+ y (int, optional): y offset (column no). Defaults to 0.
1832
+
1833
+ Raises:
1834
+ errors.NoAltScreen: If the Console isn't in alt screen mode.
1835
+ """
1836
+ if not self.is_alt_screen:
1837
+ raise errors.NoAltScreen("Alt screen must be enabled to call update_screen")
1838
+ screen_update = ScreenUpdate(lines, x, y)
1839
+ segments = self.render(screen_update)
1840
+ self._buffer.extend(segments)
1841
+ self._check_buffer()
1842
+
1843
+ def print_exception(
1844
+ self,
1845
+ *,
1846
+ width: Optional[int] = 100,
1847
+ extra_lines: int = 3,
1848
+ theme: Optional[str] = None,
1849
+ word_wrap: bool = False,
1850
+ show_locals: bool = False,
1851
+ suppress: Iterable[Union[str, ModuleType]] = (),
1852
+ max_frames: int = 100,
1853
+ ) -> None:
1854
+ """Prints a rich render of the last exception and traceback.
1855
+
1856
+ Args:
1857
+ width (Optional[int], optional): Number of characters used to render code. Defaults to 100.
1858
+ extra_lines (int, optional): Additional lines of code to render. Defaults to 3.
1859
+ theme (str, optional): Override pygments theme used in traceback
1860
+ word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False.
1861
+ show_locals (bool, optional): Enable display of local variables. Defaults to False.
1862
+ suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.
1863
+ max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
1864
+ """
1865
+ from .traceback import Traceback
1866
+
1867
+ traceback = Traceback(
1868
+ width=width,
1869
+ extra_lines=extra_lines,
1870
+ theme=theme,
1871
+ word_wrap=word_wrap,
1872
+ show_locals=show_locals,
1873
+ suppress=suppress,
1874
+ max_frames=max_frames,
1875
+ )
1876
+ self.print(traceback)
1877
+
1878
+ @staticmethod
1879
+ def _caller_frame_info(
1880
+ offset: int,
1881
+ currentframe: Callable[[], Optional[FrameType]] = inspect.currentframe,
1882
+ ) -> Tuple[str, int, Dict[str, Any]]:
1883
+ """Get caller frame information.
1884
+
1885
+ Args:
1886
+ offset (int): the caller offset within the current frame stack.
1887
+ currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to
1888
+ retrieve the current frame. Defaults to ``inspect.currentframe``.
1889
+
1890
+ Returns:
1891
+ Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and
1892
+ the dictionary of local variables associated with the caller frame.
1893
+
1894
+ Raises:
1895
+ RuntimeError: If the stack offset is invalid.
1896
+ """
1897
+ # Ignore the frame of this local helper
1898
+ offset += 1
1899
+
1900
+ frame = currentframe()
1901
+ if frame is not None:
1902
+ # Use the faster currentframe where implemented
1903
+ while offset and frame is not None:
1904
+ frame = frame.f_back
1905
+ offset -= 1
1906
+ assert frame is not None
1907
+ return frame.f_code.co_filename, frame.f_lineno, frame.f_locals
1908
+ else:
1909
+ # Fallback to the slower stack
1910
+ frame_info = inspect.stack()[offset]
1911
+ return frame_info.filename, frame_info.lineno, frame_info.frame.f_locals
1912
+
1913
+ def log(
1914
+ self,
1915
+ *objects: Any,
1916
+ sep: str = " ",
1917
+ end: str = "\n",
1918
+ style: Optional[Union[str, Style]] = None,
1919
+ justify: Optional[JustifyMethod] = None,
1920
+ emoji: Optional[bool] = None,
1921
+ markup: Optional[bool] = None,
1922
+ highlight: Optional[bool] = None,
1923
+ log_locals: bool = False,
1924
+ _stack_offset: int = 1,
1925
+ ) -> None:
1926
+ """Log rich content to the terminal.
1927
+
1928
+ Args:
1929
+ objects (positional args): Objects to log to the terminal.
1930
+ sep (str, optional): String to write between print data. Defaults to " ".
1931
+ end (str, optional): String to write at end of print data. Defaults to "\\\\n".
1932
+ style (Union[str, Style], optional): A style to apply to output. Defaults to None.
1933
+ justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``.
1934
+ emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None.
1935
+ markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None.
1936
+ highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None.
1937
+ log_locals (bool, optional): Boolean to enable logging of locals where ``log()``
1938
+ was called. Defaults to False.
1939
+ _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1.
1940
+ """
1941
+ if not objects:
1942
+ objects = (NewLine(),)
1943
+
1944
+ render_hooks = self._render_hooks[:]
1945
+
1946
+ with self:
1947
+ renderables = self._collect_renderables(
1948
+ objects,
1949
+ sep,
1950
+ end,
1951
+ justify=justify,
1952
+ emoji=emoji,
1953
+ markup=markup,
1954
+ highlight=highlight,
1955
+ )
1956
+ if style is not None:
1957
+ renderables = [Styled(renderable, style) for renderable in renderables]
1958
+
1959
+ filename, line_no, locals = self._caller_frame_info(_stack_offset)
1960
+ link_path = None if filename.startswith("<") else os.path.abspath(filename)
1961
+ path = filename.rpartition(os.sep)[-1]
1962
+ if log_locals:
1963
+ locals_map = {
1964
+ key: value
1965
+ for key, value in locals.items()
1966
+ if not key.startswith("__")
1967
+ }
1968
+ renderables.append(render_scope(locals_map, title="[i]locals"))
1969
+
1970
+ renderables = [
1971
+ self._log_render(
1972
+ self,
1973
+ renderables,
1974
+ log_time=self.get_datetime(),
1975
+ path=path,
1976
+ line_no=line_no,
1977
+ link_path=link_path,
1978
+ )
1979
+ ]
1980
+ for hook in render_hooks:
1981
+ renderables = hook.process_renderables(renderables)
1982
+ new_segments: List[Segment] = []
1983
+ extend = new_segments.extend
1984
+ render = self.render
1985
+ render_options = self.options
1986
+ for renderable in renderables:
1987
+ extend(render(renderable, render_options))
1988
+ buffer_extend = self._buffer.extend
1989
+ for line in Segment.split_and_crop_lines(
1990
+ new_segments, self.width, pad=False
1991
+ ):
1992
+ buffer_extend(line)
1993
+
1994
+ def on_broken_pipe(self) -> None:
1995
+ """This function is called when a `BrokenPipeError` is raised.
1996
+
1997
+ This can occur when piping Textual output in Linux and macOS.
1998
+ The default implementation is to exit the app, but you could implement
1999
+ this method in a subclass to change the behavior.
2000
+
2001
+ See https://docs.python.org/3/library/signal.html#note-on-sigpipe for details.
2002
+ """
2003
+ self.quiet = True
2004
+ devnull = os.open(os.devnull, os.O_WRONLY)
2005
+ os.dup2(devnull, sys.stdout.fileno())
2006
+ raise SystemExit(1)
2007
+
2008
+ def _check_buffer(self) -> None:
2009
+ """Check if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False)
2010
+ Rendering is supported on Windows, Unix and Jupyter environments. For
2011
+ legacy Windows consoles, the win32 API is called directly.
2012
+ This method will also record what it renders if recording is enabled via Console.record.
2013
+ """
2014
+ if self.quiet:
2015
+ del self._buffer[:]
2016
+ return
2017
+
2018
+ try:
2019
+ self._write_buffer()
2020
+ except BrokenPipeError:
2021
+ self.on_broken_pipe()
2022
+
2023
+ def _write_buffer(self) -> None:
2024
+ """Write the buffer to the output file."""
2025
+
2026
+ with self._lock:
2027
+ if self.record and not self._buffer_index:
2028
+ with self._record_buffer_lock:
2029
+ self._record_buffer.extend(self._buffer[:])
2030
+
2031
+ if self._buffer_index == 0:
2032
+ if self.is_jupyter: # pragma: no cover
2033
+ from .jupyter import display
2034
+
2035
+ display(self._buffer, self._render_buffer(self._buffer[:]))
2036
+ del self._buffer[:]
2037
+ else:
2038
+ if WINDOWS:
2039
+ use_legacy_windows_render = False
2040
+ if self.legacy_windows:
2041
+ fileno = get_fileno(self.file)
2042
+ if fileno is not None:
2043
+ use_legacy_windows_render = (
2044
+ fileno in _STD_STREAMS_OUTPUT
2045
+ )
2046
+
2047
+ if use_legacy_windows_render:
2048
+ from pip._vendor.rich._win32_console import LegacyWindowsTerm
2049
+ from pip._vendor.rich._windows_renderer import legacy_windows_render
2050
+
2051
+ buffer = self._buffer[:]
2052
+ if self.no_color and self._color_system:
2053
+ buffer = list(Segment.remove_color(buffer))
2054
+
2055
+ legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
2056
+ else:
2057
+ # Either a non-std stream on legacy Windows, or modern Windows.
2058
+ text = self._render_buffer(self._buffer[:])
2059
+ # https://bugs.python.org/issue37871
2060
+ # https://github.com/python/cpython/issues/82052
2061
+ # We need to avoid writing more than 32Kb in a single write, due to the above bug
2062
+ write = self.file.write
2063
+ # Worse case scenario, every character is 4 bytes of utf-8
2064
+ MAX_WRITE = 32 * 1024 // 4
2065
+ try:
2066
+ if len(text) <= MAX_WRITE:
2067
+ write(text)
2068
+ else:
2069
+ batch: List[str] = []
2070
+ batch_append = batch.append
2071
+ size = 0
2072
+ for line in text.splitlines(True):
2073
+ if size + len(line) > MAX_WRITE and batch:
2074
+ write("".join(batch))
2075
+ batch.clear()
2076
+ size = 0
2077
+ batch_append(line)
2078
+ size += len(line)
2079
+ if batch:
2080
+ write("".join(batch))
2081
+ batch.clear()
2082
+ except UnicodeEncodeError as error:
2083
+ error.reason = f"{error.reason}\n*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***"
2084
+ raise
2085
+ else:
2086
+ text = self._render_buffer(self._buffer[:])
2087
+ try:
2088
+ self.file.write(text)
2089
+ except UnicodeEncodeError as error:
2090
+ error.reason = f"{error.reason}\n*** You may need to add PYTHONIOENCODING=utf-8 to your environment ***"
2091
+ raise
2092
+
2093
+ self.file.flush()
2094
+ del self._buffer[:]
2095
+
2096
+ def _render_buffer(self, buffer: Iterable[Segment]) -> str:
2097
+ """Render buffered output, and clear buffer."""
2098
+ output: List[str] = []
2099
+ append = output.append
2100
+ color_system = self._color_system
2101
+ legacy_windows = self.legacy_windows
2102
+ not_terminal = not self.is_terminal
2103
+ if self.no_color and color_system:
2104
+ buffer = Segment.remove_color(buffer)
2105
+ for text, style, control in buffer:
2106
+ if style:
2107
+ append(
2108
+ style.render(
2109
+ text,
2110
+ color_system=color_system,
2111
+ legacy_windows=legacy_windows,
2112
+ )
2113
+ )
2114
+ elif not (not_terminal and control):
2115
+ append(text)
2116
+
2117
+ rendered = "".join(output)
2118
+ return rendered
2119
+
2120
+ def input(
2121
+ self,
2122
+ prompt: TextType = "",
2123
+ *,
2124
+ markup: bool = True,
2125
+ emoji: bool = True,
2126
+ password: bool = False,
2127
+ stream: Optional[TextIO] = None,
2128
+ ) -> str:
2129
+ """Displays a prompt and waits for input from the user. The prompt may contain color / style.
2130
+
2131
+ It works in the same way as Python's builtin :func:`input` function and provides elaborate line editing and history features if Python's builtin :mod:`readline` module is previously loaded.
2132
+
2133
+ Args:
2134
+ prompt (Union[str, Text]): Text to render in the prompt.
2135
+ markup (bool, optional): Enable console markup (requires a str prompt). Defaults to True.
2136
+ emoji (bool, optional): Enable emoji (requires a str prompt). Defaults to True.
2137
+ password: (bool, optional): Hide typed text. Defaults to False.
2138
+ stream: (TextIO, optional): Optional file to read input from (rather than stdin). Defaults to None.
2139
+
2140
+ Returns:
2141
+ str: Text read from stdin.
2142
+ """
2143
+ if prompt:
2144
+ self.print(prompt, markup=markup, emoji=emoji, end="")
2145
+ if password:
2146
+ result = getpass("", stream=stream)
2147
+ else:
2148
+ if stream:
2149
+ result = stream.readline()
2150
+ else:
2151
+ result = input()
2152
+ return result
2153
+
2154
+ def export_text(self, *, clear: bool = True, styles: bool = False) -> str:
2155
+ """Generate text from console contents (requires record=True argument in constructor).
2156
+
2157
+ Args:
2158
+ clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
2159
+ styles (bool, optional): If ``True``, ansi escape codes will be included. ``False`` for plain text.
2160
+ Defaults to ``False``.
2161
+
2162
+ Returns:
2163
+ str: String containing console contents.
2164
+
2165
+ """
2166
+ assert (
2167
+ self.record
2168
+ ), "To export console contents set record=True in the constructor or instance"
2169
+
2170
+ with self._record_buffer_lock:
2171
+ if styles:
2172
+ text = "".join(
2173
+ (style.render(text) if style else text)
2174
+ for text, style, _ in self._record_buffer
2175
+ )
2176
+ else:
2177
+ text = "".join(
2178
+ segment.text
2179
+ for segment in self._record_buffer
2180
+ if not segment.control
2181
+ )
2182
+ if clear:
2183
+ del self._record_buffer[:]
2184
+ return text
2185
+
2186
+ def save_text(self, path: str, *, clear: bool = True, styles: bool = False) -> None:
2187
+ """Generate text from console and save to a given location (requires record=True argument in constructor).
2188
+
2189
+ Args:
2190
+ path (str): Path to write text files.
2191
+ clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
2192
+ styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text.
2193
+ Defaults to ``False``.
2194
+
2195
+ """
2196
+ text = self.export_text(clear=clear, styles=styles)
2197
+ with open(path, "w", encoding="utf-8") as write_file:
2198
+ write_file.write(text)
2199
+
2200
+ def export_html(
2201
+ self,
2202
+ *,
2203
+ theme: Optional[TerminalTheme] = None,
2204
+ clear: bool = True,
2205
+ code_format: Optional[str] = None,
2206
+ inline_styles: bool = False,
2207
+ ) -> str:
2208
+ """Generate HTML from console contents (requires record=True argument in constructor).
2209
+
2210
+ Args:
2211
+ theme (TerminalTheme, optional): TerminalTheme object containing console colors.
2212
+ clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
2213
+ code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
2214
+ '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
2215
+ inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
2216
+ larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
2217
+ Defaults to False.
2218
+
2219
+ Returns:
2220
+ str: String containing console contents as HTML.
2221
+ """
2222
+ assert (
2223
+ self.record
2224
+ ), "To export console contents set record=True in the constructor or instance"
2225
+ fragments: List[str] = []
2226
+ append = fragments.append
2227
+ _theme = theme or DEFAULT_TERMINAL_THEME
2228
+ stylesheet = ""
2229
+
2230
+ render_code_format = CONSOLE_HTML_FORMAT if code_format is None else code_format
2231
+
2232
+ with self._record_buffer_lock:
2233
+ if inline_styles:
2234
+ for text, style, _ in Segment.filter_control(
2235
+ Segment.simplify(self._record_buffer)
2236
+ ):
2237
+ text = escape(text)
2238
+ if style:
2239
+ rule = style.get_html_style(_theme)
2240
+ if style.link:
2241
+ text = f'<a href="{style.link}">{text}</a>'
2242
+ text = f'<span style="{rule}">{text}</span>' if rule else text
2243
+ append(text)
2244
+ else:
2245
+ styles: Dict[str, int] = {}
2246
+ for text, style, _ in Segment.filter_control(
2247
+ Segment.simplify(self._record_buffer)
2248
+ ):
2249
+ text = escape(text)
2250
+ if style:
2251
+ rule = style.get_html_style(_theme)
2252
+ style_number = styles.setdefault(rule, len(styles) + 1)
2253
+ if style.link:
2254
+ text = f'<a class="r{style_number}" href="{style.link}">{text}</a>'
2255
+ else:
2256
+ text = f'<span class="r{style_number}">{text}</span>'
2257
+ append(text)
2258
+ stylesheet_rules: List[str] = []
2259
+ stylesheet_append = stylesheet_rules.append
2260
+ for style_rule, style_number in styles.items():
2261
+ if style_rule:
2262
+ stylesheet_append(f".r{style_number} {{{style_rule}}}")
2263
+ stylesheet = "\n".join(stylesheet_rules)
2264
+
2265
+ rendered_code = render_code_format.format(
2266
+ code="".join(fragments),
2267
+ stylesheet=stylesheet,
2268
+ foreground=_theme.foreground_color.hex,
2269
+ background=_theme.background_color.hex,
2270
+ )
2271
+ if clear:
2272
+ del self._record_buffer[:]
2273
+ return rendered_code
2274
+
2275
+ def save_html(
2276
+ self,
2277
+ path: str,
2278
+ *,
2279
+ theme: Optional[TerminalTheme] = None,
2280
+ clear: bool = True,
2281
+ code_format: str = CONSOLE_HTML_FORMAT,
2282
+ inline_styles: bool = False,
2283
+ ) -> None:
2284
+ """Generate HTML from console contents and write to a file (requires record=True argument in constructor).
2285
+
2286
+ Args:
2287
+ path (str): Path to write html file.
2288
+ theme (TerminalTheme, optional): TerminalTheme object containing console colors.
2289
+ clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``.
2290
+ code_format (str, optional): Format string to render HTML. In addition to '{foreground}',
2291
+ '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``.
2292
+ inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files
2293
+ larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag.
2294
+ Defaults to False.
2295
+
2296
+ """
2297
+ html = self.export_html(
2298
+ theme=theme,
2299
+ clear=clear,
2300
+ code_format=code_format,
2301
+ inline_styles=inline_styles,
2302
+ )
2303
+ with open(path, "w", encoding="utf-8") as write_file:
2304
+ write_file.write(html)
2305
+
2306
+ def export_svg(
2307
+ self,
2308
+ *,
2309
+ title: str = "Rich",
2310
+ theme: Optional[TerminalTheme] = None,
2311
+ clear: bool = True,
2312
+ code_format: str = CONSOLE_SVG_FORMAT,
2313
+ font_aspect_ratio: float = 0.61,
2314
+ unique_id: Optional[str] = None,
2315
+ ) -> str:
2316
+ """
2317
+ Generate an SVG from the console contents (requires record=True in Console constructor).
2318
+
2319
+ Args:
2320
+ title (str, optional): The title of the tab in the output image
2321
+ theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
2322
+ clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
2323
+ code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
2324
+ into the string in order to form the final SVG output. The default template used and the variables
2325
+ injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
2326
+ font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
2327
+ string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
2328
+ If you aren't specifying a different font inside ``code_format``, you probably don't need this.
2329
+ unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
2330
+ ids). If not set, this defaults to a computed value based on the recorded content.
2331
+ """
2332
+
2333
+ from pip._vendor.rich.cells import cell_len
2334
+
2335
+ style_cache: Dict[Style, str] = {}
2336
+
2337
+ def get_svg_style(style: Style) -> str:
2338
+ """Convert a Style to CSS rules for SVG."""
2339
+ if style in style_cache:
2340
+ return style_cache[style]
2341
+ css_rules = []
2342
+ color = (
2343
+ _theme.foreground_color
2344
+ if (style.color is None or style.color.is_default)
2345
+ else style.color.get_truecolor(_theme)
2346
+ )
2347
+ bgcolor = (
2348
+ _theme.background_color
2349
+ if (style.bgcolor is None or style.bgcolor.is_default)
2350
+ else style.bgcolor.get_truecolor(_theme)
2351
+ )
2352
+ if style.reverse:
2353
+ color, bgcolor = bgcolor, color
2354
+ if style.dim:
2355
+ color = blend_rgb(color, bgcolor, 0.4)
2356
+ css_rules.append(f"fill: {color.hex}")
2357
+ if style.bold:
2358
+ css_rules.append("font-weight: bold")
2359
+ if style.italic:
2360
+ css_rules.append("font-style: italic;")
2361
+ if style.underline:
2362
+ css_rules.append("text-decoration: underline;")
2363
+ if style.strike:
2364
+ css_rules.append("text-decoration: line-through;")
2365
+
2366
+ css = ";".join(css_rules)
2367
+ style_cache[style] = css
2368
+ return css
2369
+
2370
+ _theme = theme or SVG_EXPORT_THEME
2371
+
2372
+ width = self.width
2373
+ char_height = 20
2374
+ char_width = char_height * font_aspect_ratio
2375
+ line_height = char_height * 1.22
2376
+
2377
+ margin_top = 1
2378
+ margin_right = 1
2379
+ margin_bottom = 1
2380
+ margin_left = 1
2381
+
2382
+ padding_top = 40
2383
+ padding_right = 8
2384
+ padding_bottom = 8
2385
+ padding_left = 8
2386
+
2387
+ padding_width = padding_left + padding_right
2388
+ padding_height = padding_top + padding_bottom
2389
+ margin_width = margin_left + margin_right
2390
+ margin_height = margin_top + margin_bottom
2391
+
2392
+ text_backgrounds: List[str] = []
2393
+ text_group: List[str] = []
2394
+ classes: Dict[str, int] = {}
2395
+ style_no = 1
2396
+
2397
+ def escape_text(text: str) -> str:
2398
+ """HTML escape text and replace spaces with nbsp."""
2399
+ return escape(text).replace(" ", "&#160;")
2400
+
2401
+ def make_tag(
2402
+ name: str, content: Optional[str] = None, **attribs: object
2403
+ ) -> str:
2404
+ """Make a tag from name, content, and attributes."""
2405
+
2406
+ def stringify(value: object) -> str:
2407
+ if isinstance(value, (float)):
2408
+ return format(value, "g")
2409
+ return str(value)
2410
+
2411
+ tag_attribs = " ".join(
2412
+ f'{k.lstrip("_").replace("_", "-")}="{stringify(v)}"'
2413
+ for k, v in attribs.items()
2414
+ )
2415
+ return (
2416
+ f"<{name} {tag_attribs}>{content}</{name}>"
2417
+ if content
2418
+ else f"<{name} {tag_attribs}/>"
2419
+ )
2420
+
2421
+ with self._record_buffer_lock:
2422
+ segments = list(Segment.filter_control(self._record_buffer))
2423
+ if clear:
2424
+ self._record_buffer.clear()
2425
+
2426
+ if unique_id is None:
2427
+ unique_id = "terminal-" + str(
2428
+ zlib.adler32(
2429
+ ("".join(repr(segment) for segment in segments)).encode(
2430
+ "utf-8",
2431
+ "ignore",
2432
+ )
2433
+ + title.encode("utf-8", "ignore")
2434
+ )
2435
+ )
2436
+ y = 0
2437
+ for y, line in enumerate(Segment.split_and_crop_lines(segments, length=width)):
2438
+ x = 0
2439
+ for text, style, _control in line:
2440
+ style = style or Style()
2441
+ rules = get_svg_style(style)
2442
+ if rules not in classes:
2443
+ classes[rules] = style_no
2444
+ style_no += 1
2445
+ class_name = f"r{classes[rules]}"
2446
+
2447
+ if style.reverse:
2448
+ has_background = True
2449
+ background = (
2450
+ _theme.foreground_color.hex
2451
+ if style.color is None
2452
+ else style.color.get_truecolor(_theme).hex
2453
+ )
2454
+ else:
2455
+ bgcolor = style.bgcolor
2456
+ has_background = bgcolor is not None and not bgcolor.is_default
2457
+ background = (
2458
+ _theme.background_color.hex
2459
+ if style.bgcolor is None
2460
+ else style.bgcolor.get_truecolor(_theme).hex
2461
+ )
2462
+
2463
+ text_length = cell_len(text)
2464
+ if has_background:
2465
+ text_backgrounds.append(
2466
+ make_tag(
2467
+ "rect",
2468
+ fill=background,
2469
+ x=x * char_width,
2470
+ y=y * line_height + 1.5,
2471
+ width=char_width * text_length,
2472
+ height=line_height + 0.25,
2473
+ shape_rendering="crispEdges",
2474
+ )
2475
+ )
2476
+
2477
+ if text != " " * len(text):
2478
+ text_group.append(
2479
+ make_tag(
2480
+ "text",
2481
+ escape_text(text),
2482
+ _class=f"{unique_id}-{class_name}",
2483
+ x=x * char_width,
2484
+ y=y * line_height + char_height,
2485
+ textLength=char_width * len(text),
2486
+ clip_path=f"url(#{unique_id}-line-{y})",
2487
+ )
2488
+ )
2489
+ x += cell_len(text)
2490
+
2491
+ line_offsets = [line_no * line_height + 1.5 for line_no in range(y)]
2492
+ lines = "\n".join(
2493
+ f"""<clipPath id="{unique_id}-line-{line_no}">
2494
+ {make_tag("rect", x=0, y=offset, width=char_width * width, height=line_height + 0.25)}
2495
+ </clipPath>"""
2496
+ for line_no, offset in enumerate(line_offsets)
2497
+ )
2498
+
2499
+ styles = "\n".join(
2500
+ f".{unique_id}-r{rule_no} {{ {css} }}" for css, rule_no in classes.items()
2501
+ )
2502
+ backgrounds = "".join(text_backgrounds)
2503
+ matrix = "".join(text_group)
2504
+
2505
+ terminal_width = ceil(width * char_width + padding_width)
2506
+ terminal_height = (y + 1) * line_height + padding_height
2507
+ chrome = make_tag(
2508
+ "rect",
2509
+ fill=_theme.background_color.hex,
2510
+ stroke="rgba(255,255,255,0.35)",
2511
+ stroke_width="1",
2512
+ x=margin_left,
2513
+ y=margin_top,
2514
+ width=terminal_width,
2515
+ height=terminal_height,
2516
+ rx=8,
2517
+ )
2518
+
2519
+ title_color = _theme.foreground_color.hex
2520
+ if title:
2521
+ chrome += make_tag(
2522
+ "text",
2523
+ escape_text(title),
2524
+ _class=f"{unique_id}-title",
2525
+ fill=title_color,
2526
+ text_anchor="middle",
2527
+ x=terminal_width // 2,
2528
+ y=margin_top + char_height + 6,
2529
+ )
2530
+ chrome += f"""
2531
+ <g transform="translate(26,22)">
2532
+ <circle cx="0" cy="0" r="7" fill="#ff5f57"/>
2533
+ <circle cx="22" cy="0" r="7" fill="#febc2e"/>
2534
+ <circle cx="44" cy="0" r="7" fill="#28c840"/>
2535
+ </g>
2536
+ """
2537
+
2538
+ svg = code_format.format(
2539
+ unique_id=unique_id,
2540
+ char_width=char_width,
2541
+ char_height=char_height,
2542
+ line_height=line_height,
2543
+ terminal_width=char_width * width - 1,
2544
+ terminal_height=(y + 1) * line_height - 1,
2545
+ width=terminal_width + margin_width,
2546
+ height=terminal_height + margin_height,
2547
+ terminal_x=margin_left + padding_left,
2548
+ terminal_y=margin_top + padding_top,
2549
+ styles=styles,
2550
+ chrome=chrome,
2551
+ backgrounds=backgrounds,
2552
+ matrix=matrix,
2553
+ lines=lines,
2554
+ )
2555
+ return svg
2556
+
2557
+ def save_svg(
2558
+ self,
2559
+ path: str,
2560
+ *,
2561
+ title: str = "Rich",
2562
+ theme: Optional[TerminalTheme] = None,
2563
+ clear: bool = True,
2564
+ code_format: str = CONSOLE_SVG_FORMAT,
2565
+ font_aspect_ratio: float = 0.61,
2566
+ unique_id: Optional[str] = None,
2567
+ ) -> None:
2568
+ """Generate an SVG file from the console contents (requires record=True in Console constructor).
2569
+
2570
+ Args:
2571
+ path (str): The path to write the SVG to.
2572
+ title (str, optional): The title of the tab in the output image
2573
+ theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal
2574
+ clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``
2575
+ code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables
2576
+ into the string in order to form the final SVG output. The default template used and the variables
2577
+ injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable.
2578
+ font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format``
2579
+ string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font).
2580
+ If you aren't specifying a different font inside ``code_format``, you probably don't need this.
2581
+ unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node
2582
+ ids). If not set, this defaults to a computed value based on the recorded content.
2583
+ """
2584
+ svg = self.export_svg(
2585
+ title=title,
2586
+ theme=theme,
2587
+ clear=clear,
2588
+ code_format=code_format,
2589
+ font_aspect_ratio=font_aspect_ratio,
2590
+ unique_id=unique_id,
2591
+ )
2592
+ with open(path, "w", encoding="utf-8") as write_file:
2593
+ write_file.write(svg)
2594
+
2595
+
2596
+ def _svg_hash(svg_main_code: str) -> str:
2597
+ """Returns a unique hash for the given SVG main code.
2598
+
2599
+ Args:
2600
+ svg_main_code (str): The content we're going to inject in the SVG envelope.
2601
+
2602
+ Returns:
2603
+ str: a hash of the given content
2604
+ """
2605
+ return str(zlib.adler32(svg_main_code.encode()))
2606
+
2607
+
2608
+ if __name__ == "__main__": # pragma: no cover
2609
+ console = Console(record=True)
2610
+
2611
+ console.log(
2612
+ "JSONRPC [i]request[/i]",
2613
+ 5,
2614
+ 1.3,
2615
+ True,
2616
+ False,
2617
+ None,
2618
+ {
2619
+ "jsonrpc": "2.0",
2620
+ "method": "subtract",
2621
+ "params": {"minuend": 42, "subtrahend": 23},
2622
+ "id": 3,
2623
+ },
2624
+ )
2625
+
2626
+ console.log("Hello, World!", "{'a': 1}", repr(console))
2627
+
2628
+ console.print(
2629
+ {
2630
+ "name": None,
2631
+ "empty": [],
2632
+ "quiz": {
2633
+ "sport": {
2634
+ "answered": True,
2635
+ "q1": {
2636
+ "question": "Which one is correct team name in NBA?",
2637
+ "options": [
2638
+ "New York Bulls",
2639
+ "Los Angeles Kings",
2640
+ "Golden State Warriors",
2641
+ "Huston Rocket",
2642
+ ],
2643
+ "answer": "Huston Rocket",
2644
+ },
2645
+ },
2646
+ "maths": {
2647
+ "answered": False,
2648
+ "q1": {
2649
+ "question": "5 + 7 = ?",
2650
+ "options": [10, 11, 12, 13],
2651
+ "answer": 12,
2652
+ },
2653
+ "q2": {
2654
+ "question": "12 - 8 = ?",
2655
+ "options": [1, 2, 3, 4],
2656
+ "answer": 4,
2657
+ },
2658
+ },
2659
+ },
2660
+ }
2661
+ )