cli-ih 0.6.3.1__py3-none-any.whl → 0.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. cli_ih/__init__.py +1 -0
  2. cli_ih/asyncClient.py +109 -10
  3. cli_ih/client.py +110 -18
  4. cli_ih/utils.py +51 -0
  5. cli_ih-0.7.1.dist-info/METADATA +100 -0
  6. cli_ih-0.7.1.dist-info/RECORD +9 -0
  7. {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.1.dist-info}/top_level.txt +0 -1
  8. cli_ih-0.6.3.1.dist-info/METADATA +0 -86
  9. cli_ih-0.6.3.1.dist-info/RECORD +0 -425
  10. venv/Lib/site-packages/__editable___cli_ih_0_6_3_1_finder.py +0 -85
  11. venv/Lib/site-packages/pip/__init__.py +0 -13
  12. venv/Lib/site-packages/pip/__main__.py +0 -24
  13. venv/Lib/site-packages/pip/__pip-runner__.py +0 -50
  14. venv/Lib/site-packages/pip/_internal/__init__.py +0 -18
  15. venv/Lib/site-packages/pip/_internal/build_env.py +0 -349
  16. venv/Lib/site-packages/pip/_internal/cache.py +0 -291
  17. venv/Lib/site-packages/pip/_internal/cli/__init__.py +0 -3
  18. venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +0 -184
  19. venv/Lib/site-packages/pip/_internal/cli/base_command.py +0 -244
  20. venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +0 -1138
  21. venv/Lib/site-packages/pip/_internal/cli/command_context.py +0 -28
  22. venv/Lib/site-packages/pip/_internal/cli/index_command.py +0 -175
  23. venv/Lib/site-packages/pip/_internal/cli/main.py +0 -80
  24. venv/Lib/site-packages/pip/_internal/cli/main_parser.py +0 -134
  25. venv/Lib/site-packages/pip/_internal/cli/parser.py +0 -298
  26. venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +0 -151
  27. venv/Lib/site-packages/pip/_internal/cli/req_command.py +0 -351
  28. venv/Lib/site-packages/pip/_internal/cli/spinners.py +0 -235
  29. venv/Lib/site-packages/pip/_internal/cli/status_codes.py +0 -6
  30. venv/Lib/site-packages/pip/_internal/commands/__init__.py +0 -139
  31. venv/Lib/site-packages/pip/_internal/commands/cache.py +0 -231
  32. venv/Lib/site-packages/pip/_internal/commands/check.py +0 -66
  33. venv/Lib/site-packages/pip/_internal/commands/completion.py +0 -135
  34. venv/Lib/site-packages/pip/_internal/commands/configuration.py +0 -288
  35. venv/Lib/site-packages/pip/_internal/commands/debug.py +0 -203
  36. venv/Lib/site-packages/pip/_internal/commands/download.py +0 -145
  37. venv/Lib/site-packages/pip/_internal/commands/freeze.py +0 -107
  38. venv/Lib/site-packages/pip/_internal/commands/hash.py +0 -58
  39. venv/Lib/site-packages/pip/_internal/commands/help.py +0 -40
  40. venv/Lib/site-packages/pip/_internal/commands/index.py +0 -159
  41. venv/Lib/site-packages/pip/_internal/commands/inspect.py +0 -92
  42. venv/Lib/site-packages/pip/_internal/commands/install.py +0 -798
  43. venv/Lib/site-packages/pip/_internal/commands/list.py +0 -400
  44. venv/Lib/site-packages/pip/_internal/commands/lock.py +0 -170
  45. venv/Lib/site-packages/pip/_internal/commands/search.py +0 -178
  46. venv/Lib/site-packages/pip/_internal/commands/show.py +0 -231
  47. venv/Lib/site-packages/pip/_internal/commands/uninstall.py +0 -113
  48. venv/Lib/site-packages/pip/_internal/commands/wheel.py +0 -181
  49. venv/Lib/site-packages/pip/_internal/configuration.py +0 -397
  50. venv/Lib/site-packages/pip/_internal/distributions/__init__.py +0 -21
  51. venv/Lib/site-packages/pip/_internal/distributions/base.py +0 -55
  52. venv/Lib/site-packages/pip/_internal/distributions/installed.py +0 -33
  53. venv/Lib/site-packages/pip/_internal/distributions/sdist.py +0 -165
  54. venv/Lib/site-packages/pip/_internal/distributions/wheel.py +0 -44
  55. venv/Lib/site-packages/pip/_internal/exceptions.py +0 -881
  56. venv/Lib/site-packages/pip/_internal/index/__init__.py +0 -1
  57. venv/Lib/site-packages/pip/_internal/index/collector.py +0 -489
  58. venv/Lib/site-packages/pip/_internal/index/package_finder.py +0 -1059
  59. venv/Lib/site-packages/pip/_internal/index/sources.py +0 -287
  60. venv/Lib/site-packages/pip/_internal/locations/__init__.py +0 -441
  61. venv/Lib/site-packages/pip/_internal/locations/_distutils.py +0 -173
  62. venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +0 -215
  63. venv/Lib/site-packages/pip/_internal/locations/base.py +0 -82
  64. venv/Lib/site-packages/pip/_internal/main.py +0 -12
  65. venv/Lib/site-packages/pip/_internal/metadata/__init__.py +0 -164
  66. venv/Lib/site-packages/pip/_internal/metadata/_json.py +0 -87
  67. venv/Lib/site-packages/pip/_internal/metadata/base.py +0 -685
  68. venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +0 -6
  69. venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +0 -87
  70. venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +0 -223
  71. venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +0 -143
  72. venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +0 -298
  73. venv/Lib/site-packages/pip/_internal/models/__init__.py +0 -1
  74. venv/Lib/site-packages/pip/_internal/models/candidate.py +0 -25
  75. venv/Lib/site-packages/pip/_internal/models/direct_url.py +0 -227
  76. venv/Lib/site-packages/pip/_internal/models/format_control.py +0 -78
  77. venv/Lib/site-packages/pip/_internal/models/index.py +0 -28
  78. venv/Lib/site-packages/pip/_internal/models/installation_report.py +0 -57
  79. venv/Lib/site-packages/pip/_internal/models/link.py +0 -613
  80. venv/Lib/site-packages/pip/_internal/models/pylock.py +0 -188
  81. venv/Lib/site-packages/pip/_internal/models/scheme.py +0 -25
  82. venv/Lib/site-packages/pip/_internal/models/search_scope.py +0 -126
  83. venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +0 -53
  84. venv/Lib/site-packages/pip/_internal/models/target_python.py +0 -122
  85. venv/Lib/site-packages/pip/_internal/models/wheel.py +0 -141
  86. venv/Lib/site-packages/pip/_internal/network/__init__.py +0 -1
  87. venv/Lib/site-packages/pip/_internal/network/auth.py +0 -564
  88. venv/Lib/site-packages/pip/_internal/network/cache.py +0 -133
  89. venv/Lib/site-packages/pip/_internal/network/download.py +0 -342
  90. venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +0 -213
  91. venv/Lib/site-packages/pip/_internal/network/session.py +0 -528
  92. venv/Lib/site-packages/pip/_internal/network/utils.py +0 -98
  93. venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +0 -61
  94. venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
  95. venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  96. venv/Lib/site-packages/pip/_internal/operations/build/build_tracker.py +0 -140
  97. venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +0 -38
  98. venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +0 -41
  99. venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +0 -73
  100. venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +0 -38
  101. venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +0 -47
  102. venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +0 -119
  103. venv/Lib/site-packages/pip/_internal/operations/check.py +0 -175
  104. venv/Lib/site-packages/pip/_internal/operations/freeze.py +0 -259
  105. venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +0 -1
  106. venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +0 -48
  107. venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +0 -746
  108. venv/Lib/site-packages/pip/_internal/operations/prepare.py +0 -742
  109. venv/Lib/site-packages/pip/_internal/pyproject.py +0 -182
  110. venv/Lib/site-packages/pip/_internal/req/__init__.py +0 -105
  111. venv/Lib/site-packages/pip/_internal/req/constructors.py +0 -562
  112. venv/Lib/site-packages/pip/_internal/req/req_dependency_group.py +0 -75
  113. venv/Lib/site-packages/pip/_internal/req/req_file.py +0 -620
  114. venv/Lib/site-packages/pip/_internal/req/req_install.py +0 -937
  115. venv/Lib/site-packages/pip/_internal/req/req_set.py +0 -81
  116. venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +0 -639
  117. venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
  118. venv/Lib/site-packages/pip/_internal/resolution/base.py +0 -20
  119. venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  120. venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +0 -598
  121. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  122. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +0 -142
  123. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -582
  124. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +0 -814
  125. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +0 -166
  126. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +0 -276
  127. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +0 -85
  128. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +0 -247
  129. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +0 -336
  130. venv/Lib/site-packages/pip/_internal/self_outdated_check.py +0 -254
  131. venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
  132. venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +0 -109
  133. venv/Lib/site-packages/pip/_internal/utils/_log.py +0 -38
  134. venv/Lib/site-packages/pip/_internal/utils/appdirs.py +0 -52
  135. venv/Lib/site-packages/pip/_internal/utils/compat.py +0 -85
  136. venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +0 -201
  137. venv/Lib/site-packages/pip/_internal/utils/datetime.py +0 -10
  138. venv/Lib/site-packages/pip/_internal/utils/deprecation.py +0 -126
  139. venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +0 -87
  140. venv/Lib/site-packages/pip/_internal/utils/egg_link.py +0 -81
  141. venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +0 -88
  142. venv/Lib/site-packages/pip/_internal/utils/filesystem.py +0 -152
  143. venv/Lib/site-packages/pip/_internal/utils/filetypes.py +0 -24
  144. venv/Lib/site-packages/pip/_internal/utils/glibc.py +0 -102
  145. venv/Lib/site-packages/pip/_internal/utils/hashes.py +0 -150
  146. venv/Lib/site-packages/pip/_internal/utils/logging.py +0 -364
  147. venv/Lib/site-packages/pip/_internal/utils/misc.py +0 -765
  148. venv/Lib/site-packages/pip/_internal/utils/packaging.py +0 -44
  149. venv/Lib/site-packages/pip/_internal/utils/retry.py +0 -45
  150. venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +0 -149
  151. venv/Lib/site-packages/pip/_internal/utils/subprocess.py +0 -248
  152. venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +0 -294
  153. venv/Lib/site-packages/pip/_internal/utils/unpacking.py +0 -337
  154. venv/Lib/site-packages/pip/_internal/utils/urls.py +0 -55
  155. venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +0 -105
  156. venv/Lib/site-packages/pip/_internal/utils/wheel.py +0 -132
  157. venv/Lib/site-packages/pip/_internal/vcs/__init__.py +0 -15
  158. venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +0 -130
  159. venv/Lib/site-packages/pip/_internal/vcs/git.py +0 -571
  160. venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +0 -186
  161. venv/Lib/site-packages/pip/_internal/vcs/subversion.py +0 -335
  162. venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +0 -693
  163. venv/Lib/site-packages/pip/_internal/wheel_builder.py +0 -334
  164. venv/Lib/site-packages/pip/_vendor/__init__.py +0 -117
  165. venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +0 -29
  166. venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +0 -70
  167. venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +0 -168
  168. venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +0 -75
  169. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +0 -8
  170. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +0 -145
  171. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +0 -48
  172. venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +0 -511
  173. venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +0 -119
  174. venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +0 -157
  175. venv/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
  176. venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +0 -146
  177. venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +0 -43
  178. venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +0 -4
  179. venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +0 -12
  180. venv/Lib/site-packages/pip/_vendor/certifi/core.py +0 -83
  181. venv/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
  182. venv/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py +0 -13
  183. venv/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py +0 -65
  184. venv/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py +0 -209
  185. venv/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +0 -59
  186. venv/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +0 -62
  187. venv/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +0 -9
  188. venv/Lib/site-packages/pip/_vendor/dependency_groups/py.typed +0 -0
  189. venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +0 -33
  190. venv/Lib/site-packages/pip/_vendor/distlib/compat.py +0 -1137
  191. venv/Lib/site-packages/pip/_vendor/distlib/resources.py +0 -358
  192. venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +0 -447
  193. venv/Lib/site-packages/pip/_vendor/distlib/util.py +0 -1984
  194. venv/Lib/site-packages/pip/_vendor/distro/__init__.py +0 -54
  195. venv/Lib/site-packages/pip/_vendor/distro/__main__.py +0 -4
  196. venv/Lib/site-packages/pip/_vendor/distro/distro.py +0 -1403
  197. venv/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
  198. venv/Lib/site-packages/pip/_vendor/idna/__init__.py +0 -45
  199. venv/Lib/site-packages/pip/_vendor/idna/codec.py +0 -122
  200. venv/Lib/site-packages/pip/_vendor/idna/compat.py +0 -15
  201. venv/Lib/site-packages/pip/_vendor/idna/core.py +0 -437
  202. venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +0 -4243
  203. venv/Lib/site-packages/pip/_vendor/idna/intranges.py +0 -57
  204. venv/Lib/site-packages/pip/_vendor/idna/package_data.py +0 -1
  205. venv/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
  206. venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +0 -8681
  207. venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +0 -55
  208. venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +0 -48
  209. venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +0 -170
  210. venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +0 -929
  211. venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +0 -15
  212. venv/Lib/site-packages/pip/_vendor/packaging/_elffile.py +0 -109
  213. venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +0 -262
  214. venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +0 -85
  215. venv/Lib/site-packages/pip/_vendor/packaging/_parser.py +0 -353
  216. venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +0 -61
  217. venv/Lib/site-packages/pip/_vendor/packaging/_tokenizer.py +0 -195
  218. venv/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py +0 -145
  219. venv/Lib/site-packages/pip/_vendor/packaging/licenses/_spdx.py +0 -759
  220. venv/Lib/site-packages/pip/_vendor/packaging/markers.py +0 -362
  221. venv/Lib/site-packages/pip/_vendor/packaging/metadata.py +0 -862
  222. venv/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
  223. venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +0 -91
  224. venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +0 -1019
  225. venv/Lib/site-packages/pip/_vendor/packaging/tags.py +0 -656
  226. venv/Lib/site-packages/pip/_vendor/packaging/utils.py +0 -163
  227. venv/Lib/site-packages/pip/_vendor/packaging/version.py +0 -582
  228. venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +0 -3676
  229. venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +0 -631
  230. venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +0 -55
  231. venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +0 -249
  232. venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +0 -299
  233. venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +0 -144
  234. venv/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
  235. venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +0 -272
  236. venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +0 -21
  237. venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +0 -272
  238. venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +0 -82
  239. venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +0 -17
  240. venv/Lib/site-packages/pip/_vendor/pygments/console.py +0 -70
  241. venv/Lib/site-packages/pip/_vendor/pygments/filter.py +0 -70
  242. venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +0 -940
  243. venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +0 -129
  244. venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +0 -157
  245. venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +0 -23
  246. venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +0 -963
  247. venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +0 -362
  248. venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +0 -602
  249. venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +0 -1201
  250. venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +0 -43
  251. venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +0 -72
  252. venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +0 -91
  253. venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +0 -104
  254. venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +0 -247
  255. venv/Lib/site-packages/pip/_vendor/pygments/style.py +0 -203
  256. venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +0 -61
  257. venv/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py +0 -54
  258. venv/Lib/site-packages/pip/_vendor/pygments/token.py +0 -214
  259. venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +0 -153
  260. venv/Lib/site-packages/pip/_vendor/pygments/util.py +0 -324
  261. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +0 -31
  262. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +0 -410
  263. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +0 -21
  264. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +0 -389
  265. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
  266. venv/Lib/site-packages/pip/_vendor/requests/__init__.py +0 -179
  267. venv/Lib/site-packages/pip/_vendor/requests/__version__.py +0 -14
  268. venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +0 -50
  269. venv/Lib/site-packages/pip/_vendor/requests/adapters.py +0 -719
  270. venv/Lib/site-packages/pip/_vendor/requests/api.py +0 -157
  271. venv/Lib/site-packages/pip/_vendor/requests/auth.py +0 -314
  272. venv/Lib/site-packages/pip/_vendor/requests/certs.py +0 -17
  273. venv/Lib/site-packages/pip/_vendor/requests/compat.py +0 -90
  274. venv/Lib/site-packages/pip/_vendor/requests/cookies.py +0 -561
  275. venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +0 -151
  276. venv/Lib/site-packages/pip/_vendor/requests/help.py +0 -127
  277. venv/Lib/site-packages/pip/_vendor/requests/hooks.py +0 -33
  278. venv/Lib/site-packages/pip/_vendor/requests/models.py +0 -1039
  279. venv/Lib/site-packages/pip/_vendor/requests/packages.py +0 -25
  280. venv/Lib/site-packages/pip/_vendor/requests/sessions.py +0 -831
  281. venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +0 -128
  282. venv/Lib/site-packages/pip/_vendor/requests/structures.py +0 -99
  283. venv/Lib/site-packages/pip/_vendor/requests/utils.py +0 -1086
  284. venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +0 -27
  285. venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +0 -196
  286. venv/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
  287. venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +0 -55
  288. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +0 -27
  289. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +0 -47
  290. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +0 -48
  291. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +0 -57
  292. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +0 -622
  293. venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +0 -209
  294. venv/Lib/site-packages/pip/_vendor/rich/__init__.py +0 -177
  295. venv/Lib/site-packages/pip/_vendor/rich/__main__.py +0 -245
  296. venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +0 -454
  297. venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +0 -3610
  298. venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +0 -32
  299. venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +0 -76
  300. venv/Lib/site-packages/pip/_vendor/rich/_extension.py +0 -10
  301. venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +0 -24
  302. venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +0 -268
  303. venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +0 -94
  304. venv/Lib/site-packages/pip/_vendor/rich/_loop.py +0 -43
  305. venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +0 -69
  306. venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +0 -309
  307. venv/Lib/site-packages/pip/_vendor/rich/_pick.py +0 -17
  308. venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +0 -153
  309. venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +0 -482
  310. venv/Lib/site-packages/pip/_vendor/rich/_stack.py +0 -16
  311. venv/Lib/site-packages/pip/_vendor/rich/_timer.py +0 -19
  312. venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +0 -661
  313. venv/Lib/site-packages/pip/_vendor/rich/_windows.py +0 -71
  314. venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +0 -56
  315. venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +0 -93
  316. venv/Lib/site-packages/pip/_vendor/rich/abc.py +0 -33
  317. venv/Lib/site-packages/pip/_vendor/rich/align.py +0 -306
  318. venv/Lib/site-packages/pip/_vendor/rich/ansi.py +0 -241
  319. venv/Lib/site-packages/pip/_vendor/rich/bar.py +0 -93
  320. venv/Lib/site-packages/pip/_vendor/rich/box.py +0 -474
  321. venv/Lib/site-packages/pip/_vendor/rich/cells.py +0 -174
  322. venv/Lib/site-packages/pip/_vendor/rich/color.py +0 -621
  323. venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +0 -38
  324. venv/Lib/site-packages/pip/_vendor/rich/columns.py +0 -187
  325. venv/Lib/site-packages/pip/_vendor/rich/console.py +0 -2680
  326. venv/Lib/site-packages/pip/_vendor/rich/constrain.py +0 -37
  327. venv/Lib/site-packages/pip/_vendor/rich/containers.py +0 -167
  328. venv/Lib/site-packages/pip/_vendor/rich/control.py +0 -219
  329. venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +0 -193
  330. venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +0 -39
  331. venv/Lib/site-packages/pip/_vendor/rich/emoji.py +0 -91
  332. venv/Lib/site-packages/pip/_vendor/rich/errors.py +0 -34
  333. venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +0 -57
  334. venv/Lib/site-packages/pip/_vendor/rich/filesize.py +0 -88
  335. venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +0 -232
  336. venv/Lib/site-packages/pip/_vendor/rich/json.py +0 -139
  337. venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +0 -101
  338. venv/Lib/site-packages/pip/_vendor/rich/layout.py +0 -442
  339. venv/Lib/site-packages/pip/_vendor/rich/live.py +0 -400
  340. venv/Lib/site-packages/pip/_vendor/rich/live_render.py +0 -106
  341. venv/Lib/site-packages/pip/_vendor/rich/logging.py +0 -297
  342. venv/Lib/site-packages/pip/_vendor/rich/markup.py +0 -251
  343. venv/Lib/site-packages/pip/_vendor/rich/measure.py +0 -151
  344. venv/Lib/site-packages/pip/_vendor/rich/padding.py +0 -141
  345. venv/Lib/site-packages/pip/_vendor/rich/pager.py +0 -34
  346. venv/Lib/site-packages/pip/_vendor/rich/palette.py +0 -100
  347. venv/Lib/site-packages/pip/_vendor/rich/panel.py +0 -317
  348. venv/Lib/site-packages/pip/_vendor/rich/pretty.py +0 -1016
  349. venv/Lib/site-packages/pip/_vendor/rich/progress.py +0 -1715
  350. venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +0 -223
  351. venv/Lib/site-packages/pip/_vendor/rich/prompt.py +0 -400
  352. venv/Lib/site-packages/pip/_vendor/rich/protocol.py +0 -42
  353. venv/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
  354. venv/Lib/site-packages/pip/_vendor/rich/region.py +0 -10
  355. venv/Lib/site-packages/pip/_vendor/rich/repr.py +0 -149
  356. venv/Lib/site-packages/pip/_vendor/rich/rule.py +0 -130
  357. venv/Lib/site-packages/pip/_vendor/rich/scope.py +0 -86
  358. venv/Lib/site-packages/pip/_vendor/rich/screen.py +0 -54
  359. venv/Lib/site-packages/pip/_vendor/rich/segment.py +0 -752
  360. venv/Lib/site-packages/pip/_vendor/rich/spinner.py +0 -132
  361. venv/Lib/site-packages/pip/_vendor/rich/status.py +0 -131
  362. venv/Lib/site-packages/pip/_vendor/rich/style.py +0 -796
  363. venv/Lib/site-packages/pip/_vendor/rich/styled.py +0 -42
  364. venv/Lib/site-packages/pip/_vendor/rich/syntax.py +0 -985
  365. venv/Lib/site-packages/pip/_vendor/rich/table.py +0 -1006
  366. venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +0 -153
  367. venv/Lib/site-packages/pip/_vendor/rich/text.py +0 -1361
  368. venv/Lib/site-packages/pip/_vendor/rich/theme.py +0 -115
  369. venv/Lib/site-packages/pip/_vendor/rich/themes.py +0 -5
  370. venv/Lib/site-packages/pip/_vendor/rich/traceback.py +0 -899
  371. venv/Lib/site-packages/pip/_vendor/rich/tree.py +0 -257
  372. venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +0 -8
  373. venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +0 -770
  374. venv/Lib/site-packages/pip/_vendor/tomli/_re.py +0 -112
  375. venv/Lib/site-packages/pip/_vendor/tomli/_types.py +0 -10
  376. venv/Lib/site-packages/pip/_vendor/tomli/py.typed +0 -1
  377. venv/Lib/site-packages/pip/_vendor/tomli_w/__init__.py +0 -4
  378. venv/Lib/site-packages/pip/_vendor/tomli_w/_writer.py +0 -229
  379. venv/Lib/site-packages/pip/_vendor/tomli_w/py.typed +0 -1
  380. venv/Lib/site-packages/pip/_vendor/truststore/__init__.py +0 -36
  381. venv/Lib/site-packages/pip/_vendor/truststore/_api.py +0 -333
  382. venv/Lib/site-packages/pip/_vendor/truststore/_macos.py +0 -571
  383. venv/Lib/site-packages/pip/_vendor/truststore/_openssl.py +0 -66
  384. venv/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py +0 -31
  385. venv/Lib/site-packages/pip/_vendor/truststore/_windows.py +0 -567
  386. venv/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
  387. venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +0 -102
  388. venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -355
  389. venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +0 -2
  390. venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +0 -572
  391. venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +0 -1140
  392. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  393. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +0 -36
  394. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  395. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +0 -519
  396. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +0 -397
  397. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +0 -314
  398. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +0 -130
  399. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +0 -518
  400. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +0 -920
  401. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +0 -216
  402. venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +0 -323
  403. venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +0 -274
  404. venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +0 -98
  405. venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
  406. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  407. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +0 -51
  408. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +0 -155
  409. venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +0 -1076
  410. venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +0 -540
  411. venv/Lib/site-packages/pip/_vendor/urllib3/request.py +0 -191
  412. venv/Lib/site-packages/pip/_vendor/urllib3/response.py +0 -879
  413. venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +0 -49
  414. venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +0 -149
  415. venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +0 -57
  416. venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +0 -22
  417. venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +0 -137
  418. venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +0 -107
  419. venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +0 -622
  420. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +0 -504
  421. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +0 -159
  422. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +0 -221
  423. venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +0 -271
  424. venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +0 -435
  425. venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +0 -152
  426. venv/Lib/site-packages/pip/py.typed +0 -4
  427. {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.1.dist-info}/WHEEL +0 -0
@@ -1,881 +0,0 @@
1
- """Exceptions used throughout package.
2
-
3
- This module MUST NOT try to import from anything within `pip._internal` to
4
- operate. This is expected to be importable from any/all files within the
5
- subpackage and, thus, should not depend on them.
6
- """
7
-
8
- from __future__ import annotations
9
-
10
- import configparser
11
- import contextlib
12
- import locale
13
- import logging
14
- import pathlib
15
- import re
16
- import sys
17
- from collections.abc import Iterator
18
- from itertools import chain, groupby, repeat
19
- from typing import TYPE_CHECKING, Literal
20
-
21
- from pip._vendor.packaging.requirements import InvalidRequirement
22
- from pip._vendor.packaging.version import InvalidVersion
23
- from pip._vendor.rich.console import Console, ConsoleOptions, RenderResult
24
- from pip._vendor.rich.markup import escape
25
- from pip._vendor.rich.text import Text
26
-
27
- if TYPE_CHECKING:
28
- from hashlib import _Hash
29
-
30
- from pip._vendor.requests.models import Request, Response
31
-
32
- from pip._internal.metadata import BaseDistribution
33
- from pip._internal.network.download import _FileDownload
34
- from pip._internal.req.req_install import InstallRequirement
35
-
36
- logger = logging.getLogger(__name__)
37
-
38
-
39
- #
40
- # Scaffolding
41
- #
42
- def _is_kebab_case(s: str) -> bool:
43
- return re.match(r"^[a-z]+(-[a-z]+)*$", s) is not None
44
-
45
-
46
- def _prefix_with_indent(
47
- s: Text | str,
48
- console: Console,
49
- *,
50
- prefix: str,
51
- indent: str,
52
- ) -> Text:
53
- if isinstance(s, Text):
54
- text = s
55
- else:
56
- text = console.render_str(s)
57
-
58
- return console.render_str(prefix, overflow="ignore") + console.render_str(
59
- f"\n{indent}", overflow="ignore"
60
- ).join(text.split(allow_blank=True))
61
-
62
-
63
- class PipError(Exception):
64
- """The base pip error."""
65
-
66
-
67
- class DiagnosticPipError(PipError):
68
- """An error, that presents diagnostic information to the user.
69
-
70
- This contains a bunch of logic, to enable pretty presentation of our error
71
- messages. Each error gets a unique reference. Each error can also include
72
- additional context, a hint and/or a note -- which are presented with the
73
- main error message in a consistent style.
74
-
75
- This is adapted from the error output styling in `sphinx-theme-builder`.
76
- """
77
-
78
- reference: str
79
-
80
- def __init__(
81
- self,
82
- *,
83
- kind: Literal["error", "warning"] = "error",
84
- reference: str | None = None,
85
- message: str | Text,
86
- context: str | Text | None,
87
- hint_stmt: str | Text | None,
88
- note_stmt: str | Text | None = None,
89
- link: str | None = None,
90
- ) -> None:
91
- # Ensure a proper reference is provided.
92
- if reference is None:
93
- assert hasattr(self, "reference"), "error reference not provided!"
94
- reference = self.reference
95
- assert _is_kebab_case(reference), "error reference must be kebab-case!"
96
-
97
- self.kind = kind
98
- self.reference = reference
99
-
100
- self.message = message
101
- self.context = context
102
-
103
- self.note_stmt = note_stmt
104
- self.hint_stmt = hint_stmt
105
-
106
- self.link = link
107
-
108
- super().__init__(f"<{self.__class__.__name__}: {self.reference}>")
109
-
110
- def __repr__(self) -> str:
111
- return (
112
- f"<{self.__class__.__name__}("
113
- f"reference={self.reference!r}, "
114
- f"message={self.message!r}, "
115
- f"context={self.context!r}, "
116
- f"note_stmt={self.note_stmt!r}, "
117
- f"hint_stmt={self.hint_stmt!r}"
118
- ")>"
119
- )
120
-
121
- def __rich_console__(
122
- self,
123
- console: Console,
124
- options: ConsoleOptions,
125
- ) -> RenderResult:
126
- colour = "red" if self.kind == "error" else "yellow"
127
-
128
- yield f"[{colour} bold]{self.kind}[/]: [bold]{self.reference}[/]"
129
- yield ""
130
-
131
- if not options.ascii_only:
132
- # Present the main message, with relevant context indented.
133
- if self.context is not None:
134
- yield _prefix_with_indent(
135
- self.message,
136
- console,
137
- prefix=f"[{colour}]×[/] ",
138
- indent=f"[{colour}]│[/] ",
139
- )
140
- yield _prefix_with_indent(
141
- self.context,
142
- console,
143
- prefix=f"[{colour}]╰─>[/] ",
144
- indent=f"[{colour}] [/] ",
145
- )
146
- else:
147
- yield _prefix_with_indent(
148
- self.message,
149
- console,
150
- prefix="[red]×[/] ",
151
- indent=" ",
152
- )
153
- else:
154
- yield self.message
155
- if self.context is not None:
156
- yield ""
157
- yield self.context
158
-
159
- if self.note_stmt is not None or self.hint_stmt is not None:
160
- yield ""
161
-
162
- if self.note_stmt is not None:
163
- yield _prefix_with_indent(
164
- self.note_stmt,
165
- console,
166
- prefix="[magenta bold]note[/]: ",
167
- indent=" ",
168
- )
169
- if self.hint_stmt is not None:
170
- yield _prefix_with_indent(
171
- self.hint_stmt,
172
- console,
173
- prefix="[cyan bold]hint[/]: ",
174
- indent=" ",
175
- )
176
-
177
- if self.link is not None:
178
- yield ""
179
- yield f"Link: {self.link}"
180
-
181
-
182
- #
183
- # Actual Errors
184
- #
185
- class ConfigurationError(PipError):
186
- """General exception in configuration"""
187
-
188
-
189
- class InstallationError(PipError):
190
- """General exception during installation"""
191
-
192
-
193
- class MissingPyProjectBuildRequires(DiagnosticPipError):
194
- """Raised when pyproject.toml has `build-system`, but no `build-system.requires`."""
195
-
196
- reference = "missing-pyproject-build-system-requires"
197
-
198
- def __init__(self, *, package: str) -> None:
199
- super().__init__(
200
- message=f"Can not process {escape(package)}",
201
- context=Text(
202
- "This package has an invalid pyproject.toml file.\n"
203
- "The [build-system] table is missing the mandatory `requires` key."
204
- ),
205
- note_stmt="This is an issue with the package mentioned above, not pip.",
206
- hint_stmt=Text("See PEP 518 for the detailed specification."),
207
- )
208
-
209
-
210
- class InvalidPyProjectBuildRequires(DiagnosticPipError):
211
- """Raised when pyproject.toml an invalid `build-system.requires`."""
212
-
213
- reference = "invalid-pyproject-build-system-requires"
214
-
215
- def __init__(self, *, package: str, reason: str) -> None:
216
- super().__init__(
217
- message=f"Can not process {escape(package)}",
218
- context=Text(
219
- "This package has an invalid `build-system.requires` key in "
220
- f"pyproject.toml.\n{reason}"
221
- ),
222
- note_stmt="This is an issue with the package mentioned above, not pip.",
223
- hint_stmt=Text("See PEP 518 for the detailed specification."),
224
- )
225
-
226
-
227
- class NoneMetadataError(PipError):
228
- """Raised when accessing a Distribution's "METADATA" or "PKG-INFO".
229
-
230
- This signifies an inconsistency, when the Distribution claims to have
231
- the metadata file (if not, raise ``FileNotFoundError`` instead), but is
232
- not actually able to produce its content. This may be due to permission
233
- errors.
234
- """
235
-
236
- def __init__(
237
- self,
238
- dist: BaseDistribution,
239
- metadata_name: str,
240
- ) -> None:
241
- """
242
- :param dist: A Distribution object.
243
- :param metadata_name: The name of the metadata being accessed
244
- (can be "METADATA" or "PKG-INFO").
245
- """
246
- self.dist = dist
247
- self.metadata_name = metadata_name
248
-
249
- def __str__(self) -> str:
250
- # Use `dist` in the error message because its stringification
251
- # includes more information, like the version and location.
252
- return f"None {self.metadata_name} metadata found for distribution: {self.dist}"
253
-
254
-
255
- class UserInstallationInvalid(InstallationError):
256
- """A --user install is requested on an environment without user site."""
257
-
258
- def __str__(self) -> str:
259
- return "User base directory is not specified"
260
-
261
-
262
- class InvalidSchemeCombination(InstallationError):
263
- def __str__(self) -> str:
264
- before = ", ".join(str(a) for a in self.args[:-1])
265
- return f"Cannot set {before} and {self.args[-1]} together"
266
-
267
-
268
- class DistributionNotFound(InstallationError):
269
- """Raised when a distribution cannot be found to satisfy a requirement"""
270
-
271
-
272
- class RequirementsFileParseError(InstallationError):
273
- """Raised when a general error occurs parsing a requirements file line."""
274
-
275
-
276
- class BestVersionAlreadyInstalled(PipError):
277
- """Raised when the most up-to-date version of a package is already
278
- installed."""
279
-
280
-
281
- class BadCommand(PipError):
282
- """Raised when virtualenv or a command is not found"""
283
-
284
-
285
- class CommandError(PipError):
286
- """Raised when there is an error in command-line arguments"""
287
-
288
-
289
- class PreviousBuildDirError(PipError):
290
- """Raised when there's a previous conflicting build directory"""
291
-
292
-
293
- class NetworkConnectionError(PipError):
294
- """HTTP connection error"""
295
-
296
- def __init__(
297
- self,
298
- error_msg: str,
299
- response: Response | None = None,
300
- request: Request | None = None,
301
- ) -> None:
302
- """
303
- Initialize NetworkConnectionError with `request` and `response`
304
- objects.
305
- """
306
- self.response = response
307
- self.request = request
308
- self.error_msg = error_msg
309
- if (
310
- self.response is not None
311
- and not self.request
312
- and hasattr(response, "request")
313
- ):
314
- self.request = self.response.request
315
- super().__init__(error_msg, response, request)
316
-
317
- def __str__(self) -> str:
318
- return str(self.error_msg)
319
-
320
-
321
- class InvalidWheelFilename(InstallationError):
322
- """Invalid wheel filename."""
323
-
324
-
325
- class UnsupportedWheel(InstallationError):
326
- """Unsupported wheel."""
327
-
328
-
329
- class InvalidWheel(InstallationError):
330
- """Invalid (e.g. corrupt) wheel."""
331
-
332
- def __init__(self, location: str, name: str):
333
- self.location = location
334
- self.name = name
335
-
336
- def __str__(self) -> str:
337
- return f"Wheel '{self.name}' located at {self.location} is invalid."
338
-
339
-
340
- class MetadataInconsistent(InstallationError):
341
- """Built metadata contains inconsistent information.
342
-
343
- This is raised when the metadata contains values (e.g. name and version)
344
- that do not match the information previously obtained from sdist filename,
345
- user-supplied ``#egg=`` value, or an install requirement name.
346
- """
347
-
348
- def __init__(
349
- self, ireq: InstallRequirement, field: str, f_val: str, m_val: str
350
- ) -> None:
351
- self.ireq = ireq
352
- self.field = field
353
- self.f_val = f_val
354
- self.m_val = m_val
355
-
356
- def __str__(self) -> str:
357
- return (
358
- f"Requested {self.ireq} has inconsistent {self.field}: "
359
- f"expected {self.f_val!r}, but metadata has {self.m_val!r}"
360
- )
361
-
362
-
363
- class MetadataInvalid(InstallationError):
364
- """Metadata is invalid."""
365
-
366
- def __init__(self, ireq: InstallRequirement, error: str) -> None:
367
- self.ireq = ireq
368
- self.error = error
369
-
370
- def __str__(self) -> str:
371
- return f"Requested {self.ireq} has invalid metadata: {self.error}"
372
-
373
-
374
- class InstallationSubprocessError(DiagnosticPipError, InstallationError):
375
- """A subprocess call failed."""
376
-
377
- reference = "subprocess-exited-with-error"
378
-
379
- def __init__(
380
- self,
381
- *,
382
- command_description: str,
383
- exit_code: int,
384
- output_lines: list[str] | None,
385
- ) -> None:
386
- if output_lines is None:
387
- output_prompt = Text("See above for output.")
388
- else:
389
- output_prompt = (
390
- Text.from_markup(f"[red][{len(output_lines)} lines of output][/]\n")
391
- + Text("".join(output_lines))
392
- + Text.from_markup(R"[red]\[end of output][/]")
393
- )
394
-
395
- super().__init__(
396
- message=(
397
- f"[green]{escape(command_description)}[/] did not run successfully.\n"
398
- f"exit code: {exit_code}"
399
- ),
400
- context=output_prompt,
401
- hint_stmt=None,
402
- note_stmt=(
403
- "This error originates from a subprocess, and is likely not a "
404
- "problem with pip."
405
- ),
406
- )
407
-
408
- self.command_description = command_description
409
- self.exit_code = exit_code
410
-
411
- def __str__(self) -> str:
412
- return f"{self.command_description} exited with {self.exit_code}"
413
-
414
-
415
- class MetadataGenerationFailed(InstallationSubprocessError, InstallationError):
416
- reference = "metadata-generation-failed"
417
-
418
- def __init__(
419
- self,
420
- *,
421
- package_details: str,
422
- ) -> None:
423
- super(InstallationSubprocessError, self).__init__(
424
- message="Encountered error while generating package metadata.",
425
- context=escape(package_details),
426
- hint_stmt="See above for details.",
427
- note_stmt="This is an issue with the package mentioned above, not pip.",
428
- )
429
-
430
- def __str__(self) -> str:
431
- return "metadata generation failed"
432
-
433
-
434
- class HashErrors(InstallationError):
435
- """Multiple HashError instances rolled into one for reporting"""
436
-
437
- def __init__(self) -> None:
438
- self.errors: list[HashError] = []
439
-
440
- def append(self, error: HashError) -> None:
441
- self.errors.append(error)
442
-
443
- def __str__(self) -> str:
444
- lines = []
445
- self.errors.sort(key=lambda e: e.order)
446
- for cls, errors_of_cls in groupby(self.errors, lambda e: e.__class__):
447
- lines.append(cls.head)
448
- lines.extend(e.body() for e in errors_of_cls)
449
- if lines:
450
- return "\n".join(lines)
451
- return ""
452
-
453
- def __bool__(self) -> bool:
454
- return bool(self.errors)
455
-
456
-
457
- class HashError(InstallationError):
458
- """
459
- A failure to verify a package against known-good hashes
460
-
461
- :cvar order: An int sorting hash exception classes by difficulty of
462
- recovery (lower being harder), so the user doesn't bother fretting
463
- about unpinned packages when he has deeper issues, like VCS
464
- dependencies, to deal with. Also keeps error reports in a
465
- deterministic order.
466
- :cvar head: A section heading for display above potentially many
467
- exceptions of this kind
468
- :ivar req: The InstallRequirement that triggered this error. This is
469
- pasted on after the exception is instantiated, because it's not
470
- typically available earlier.
471
-
472
- """
473
-
474
- req: InstallRequirement | None = None
475
- head = ""
476
- order: int = -1
477
-
478
- def body(self) -> str:
479
- """Return a summary of me for display under the heading.
480
-
481
- This default implementation simply prints a description of the
482
- triggering requirement.
483
-
484
- :param req: The InstallRequirement that provoked this error, with
485
- its link already populated by the resolver's _populate_link().
486
-
487
- """
488
- return f" {self._requirement_name()}"
489
-
490
- def __str__(self) -> str:
491
- return f"{self.head}\n{self.body()}"
492
-
493
- def _requirement_name(self) -> str:
494
- """Return a description of the requirement that triggered me.
495
-
496
- This default implementation returns long description of the req, with
497
- line numbers
498
-
499
- """
500
- return str(self.req) if self.req else "unknown package"
501
-
502
-
503
- class VcsHashUnsupported(HashError):
504
- """A hash was provided for a version-control-system-based requirement, but
505
- we don't have a method for hashing those."""
506
-
507
- order = 0
508
- head = (
509
- "Can't verify hashes for these requirements because we don't "
510
- "have a way to hash version control repositories:"
511
- )
512
-
513
-
514
- class DirectoryUrlHashUnsupported(HashError):
515
- """A hash was provided for a version-control-system-based requirement, but
516
- we don't have a method for hashing those."""
517
-
518
- order = 1
519
- head = (
520
- "Can't verify hashes for these file:// requirements because they "
521
- "point to directories:"
522
- )
523
-
524
-
525
- class HashMissing(HashError):
526
- """A hash was needed for a requirement but is absent."""
527
-
528
- order = 2
529
- head = (
530
- "Hashes are required in --require-hashes mode, but they are "
531
- "missing from some requirements. Here is a list of those "
532
- "requirements along with the hashes their downloaded archives "
533
- "actually had. Add lines like these to your requirements files to "
534
- "prevent tampering. (If you did not enable --require-hashes "
535
- "manually, note that it turns on automatically when any package "
536
- "has a hash.)"
537
- )
538
-
539
- def __init__(self, gotten_hash: str) -> None:
540
- """
541
- :param gotten_hash: The hash of the (possibly malicious) archive we
542
- just downloaded
543
- """
544
- self.gotten_hash = gotten_hash
545
-
546
- def body(self) -> str:
547
- # Dodge circular import.
548
- from pip._internal.utils.hashes import FAVORITE_HASH
549
-
550
- package = None
551
- if self.req:
552
- # In the case of URL-based requirements, display the original URL
553
- # seen in the requirements file rather than the package name,
554
- # so the output can be directly copied into the requirements file.
555
- package = (
556
- self.req.original_link
557
- if self.req.is_direct
558
- # In case someone feeds something downright stupid
559
- # to InstallRequirement's constructor.
560
- else getattr(self.req, "req", None)
561
- )
562
- return " {} --hash={}:{}".format(
563
- package or "unknown package", FAVORITE_HASH, self.gotten_hash
564
- )
565
-
566
-
567
- class HashUnpinned(HashError):
568
- """A requirement had a hash specified but was not pinned to a specific
569
- version."""
570
-
571
- order = 3
572
- head = (
573
- "In --require-hashes mode, all requirements must have their "
574
- "versions pinned with ==. These do not:"
575
- )
576
-
577
-
578
- class HashMismatch(HashError):
579
- """
580
- Distribution file hash values don't match.
581
-
582
- :ivar package_name: The name of the package that triggered the hash
583
- mismatch. Feel free to write to this after the exception is raise to
584
- improve its error message.
585
-
586
- """
587
-
588
- order = 4
589
- head = (
590
- "THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS "
591
- "FILE. If you have updated the package versions, please update "
592
- "the hashes. Otherwise, examine the package contents carefully; "
593
- "someone may have tampered with them."
594
- )
595
-
596
- def __init__(self, allowed: dict[str, list[str]], gots: dict[str, _Hash]) -> None:
597
- """
598
- :param allowed: A dict of algorithm names pointing to lists of allowed
599
- hex digests
600
- :param gots: A dict of algorithm names pointing to hashes we
601
- actually got from the files under suspicion
602
- """
603
- self.allowed = allowed
604
- self.gots = gots
605
-
606
- def body(self) -> str:
607
- return f" {self._requirement_name()}:\n{self._hash_comparison()}"
608
-
609
- def _hash_comparison(self) -> str:
610
- """
611
- Return a comparison of actual and expected hash values.
612
-
613
- Example::
614
-
615
- Expected sha256 abcdeabcdeabcdeabcdeabcdeabcdeabcdeabcdeabcde
616
- or 123451234512345123451234512345123451234512345
617
- Got bcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdefbcdef
618
-
619
- """
620
-
621
- def hash_then_or(hash_name: str) -> chain[str]:
622
- # For now, all the decent hashes have 6-char names, so we can get
623
- # away with hard-coding space literals.
624
- return chain([hash_name], repeat(" or"))
625
-
626
- lines: list[str] = []
627
- for hash_name, expecteds in self.allowed.items():
628
- prefix = hash_then_or(hash_name)
629
- lines.extend((f" Expected {next(prefix)} {e}") for e in expecteds)
630
- lines.append(
631
- f" Got {self.gots[hash_name].hexdigest()}\n"
632
- )
633
- return "\n".join(lines)
634
-
635
-
636
- class UnsupportedPythonVersion(InstallationError):
637
- """Unsupported python version according to Requires-Python package
638
- metadata."""
639
-
640
-
641
- class ConfigurationFileCouldNotBeLoaded(ConfigurationError):
642
- """When there are errors while loading a configuration file"""
643
-
644
- def __init__(
645
- self,
646
- reason: str = "could not be loaded",
647
- fname: str | None = None,
648
- error: configparser.Error | None = None,
649
- ) -> None:
650
- super().__init__(error)
651
- self.reason = reason
652
- self.fname = fname
653
- self.error = error
654
-
655
- def __str__(self) -> str:
656
- if self.fname is not None:
657
- message_part = f" in {self.fname}."
658
- else:
659
- assert self.error is not None
660
- message_part = f".\n{self.error}\n"
661
- return f"Configuration file {self.reason}{message_part}"
662
-
663
-
664
- _DEFAULT_EXTERNALLY_MANAGED_ERROR = f"""\
665
- The Python environment under {sys.prefix} is managed externally, and may not be
666
- manipulated by the user. Please use specific tooling from the distributor of
667
- the Python installation to interact with this environment instead.
668
- """
669
-
670
-
671
- class ExternallyManagedEnvironment(DiagnosticPipError):
672
- """The current environment is externally managed.
673
-
674
- This is raised when the current environment is externally managed, as
675
- defined by `PEP 668`_. The ``EXTERNALLY-MANAGED`` configuration is checked
676
- and displayed when the error is bubbled up to the user.
677
-
678
- :param error: The error message read from ``EXTERNALLY-MANAGED``.
679
- """
680
-
681
- reference = "externally-managed-environment"
682
-
683
- def __init__(self, error: str | None) -> None:
684
- if error is None:
685
- context = Text(_DEFAULT_EXTERNALLY_MANAGED_ERROR)
686
- else:
687
- context = Text(error)
688
- super().__init__(
689
- message="This environment is externally managed",
690
- context=context,
691
- note_stmt=(
692
- "If you believe this is a mistake, please contact your "
693
- "Python installation or OS distribution provider. "
694
- "You can override this, at the risk of breaking your Python "
695
- "installation or OS, by passing --break-system-packages."
696
- ),
697
- hint_stmt=Text("See PEP 668 for the detailed specification."),
698
- )
699
-
700
- @staticmethod
701
- def _iter_externally_managed_error_keys() -> Iterator[str]:
702
- # LC_MESSAGES is in POSIX, but not the C standard. The most common
703
- # platform that does not implement this category is Windows, where
704
- # using other categories for console message localization is equally
705
- # unreliable, so we fall back to the locale-less vendor message. This
706
- # can always be re-evaluated when a vendor proposes a new alternative.
707
- try:
708
- category = locale.LC_MESSAGES
709
- except AttributeError:
710
- lang: str | None = None
711
- else:
712
- lang, _ = locale.getlocale(category)
713
- if lang is not None:
714
- yield f"Error-{lang}"
715
- for sep in ("-", "_"):
716
- before, found, _ = lang.partition(sep)
717
- if not found:
718
- continue
719
- yield f"Error-{before}"
720
- yield "Error"
721
-
722
- @classmethod
723
- def from_config(
724
- cls,
725
- config: pathlib.Path | str,
726
- ) -> ExternallyManagedEnvironment:
727
- parser = configparser.ConfigParser(interpolation=None)
728
- try:
729
- parser.read(config, encoding="utf-8")
730
- section = parser["externally-managed"]
731
- for key in cls._iter_externally_managed_error_keys():
732
- with contextlib.suppress(KeyError):
733
- return cls(section[key])
734
- except KeyError:
735
- pass
736
- except (OSError, UnicodeDecodeError, configparser.ParsingError):
737
- from pip._internal.utils._log import VERBOSE
738
-
739
- exc_info = logger.isEnabledFor(VERBOSE)
740
- logger.warning("Failed to read %s", config, exc_info=exc_info)
741
- return cls(None)
742
-
743
-
744
- class UninstallMissingRecord(DiagnosticPipError):
745
- reference = "uninstall-no-record-file"
746
-
747
- def __init__(self, *, distribution: BaseDistribution) -> None:
748
- installer = distribution.installer
749
- if not installer or installer == "pip":
750
- dep = f"{distribution.raw_name}=={distribution.version}"
751
- hint = Text.assemble(
752
- "You might be able to recover from this via: ",
753
- (f"pip install --force-reinstall --no-deps {dep}", "green"),
754
- )
755
- else:
756
- hint = Text(
757
- f"The package was installed by {installer}. "
758
- "You should check if it can uninstall the package."
759
- )
760
-
761
- super().__init__(
762
- message=Text(f"Cannot uninstall {distribution}"),
763
- context=(
764
- "The package's contents are unknown: "
765
- f"no RECORD file was found for {distribution.raw_name}."
766
- ),
767
- hint_stmt=hint,
768
- )
769
-
770
-
771
- class LegacyDistutilsInstall(DiagnosticPipError):
772
- reference = "uninstall-distutils-installed-package"
773
-
774
- def __init__(self, *, distribution: BaseDistribution) -> None:
775
- super().__init__(
776
- message=Text(f"Cannot uninstall {distribution}"),
777
- context=(
778
- "It is a distutils installed project and thus we cannot accurately "
779
- "determine which files belong to it which would lead to only a partial "
780
- "uninstall."
781
- ),
782
- hint_stmt=None,
783
- )
784
-
785
-
786
- class InvalidInstalledPackage(DiagnosticPipError):
787
- reference = "invalid-installed-package"
788
-
789
- def __init__(
790
- self,
791
- *,
792
- dist: BaseDistribution,
793
- invalid_exc: InvalidRequirement | InvalidVersion,
794
- ) -> None:
795
- installed_location = dist.installed_location
796
-
797
- if isinstance(invalid_exc, InvalidRequirement):
798
- invalid_type = "requirement"
799
- else:
800
- invalid_type = "version"
801
-
802
- super().__init__(
803
- message=Text(
804
- f"Cannot process installed package {dist} "
805
- + (f"in {installed_location!r} " if installed_location else "")
806
- + f"because it has an invalid {invalid_type}:\n{invalid_exc.args[0]}"
807
- ),
808
- context=(
809
- "Starting with pip 24.1, packages with invalid "
810
- f"{invalid_type}s can not be processed."
811
- ),
812
- hint_stmt="To proceed this package must be uninstalled.",
813
- )
814
-
815
-
816
- class IncompleteDownloadError(DiagnosticPipError):
817
- """Raised when the downloader receives fewer bytes than advertised
818
- in the Content-Length header."""
819
-
820
- reference = "incomplete-download"
821
-
822
- def __init__(self, download: _FileDownload) -> None:
823
- # Dodge circular import.
824
- from pip._internal.utils.misc import format_size
825
-
826
- assert download.size is not None
827
- download_status = (
828
- f"{format_size(download.bytes_received)}/{format_size(download.size)}"
829
- )
830
- if download.reattempts:
831
- retry_status = f"after {download.reattempts + 1} attempts "
832
- hint = "Use --resume-retries to configure resume attempt limit."
833
- else:
834
- # Download retrying is not enabled.
835
- retry_status = ""
836
- hint = "Consider using --resume-retries to enable download resumption."
837
- message = Text(
838
- f"Download failed {retry_status}because not enough bytes "
839
- f"were received ({download_status})"
840
- )
841
-
842
- super().__init__(
843
- message=message,
844
- context=f"URL: {download.link.redacted_url}",
845
- hint_stmt=hint,
846
- note_stmt="This is an issue with network connectivity, not pip.",
847
- )
848
-
849
-
850
- class ResolutionTooDeepError(DiagnosticPipError):
851
- """Raised when the dependency resolver exceeds the maximum recursion depth."""
852
-
853
- reference = "resolution-too-deep"
854
-
855
- def __init__(self) -> None:
856
- super().__init__(
857
- message="Dependency resolution exceeded maximum depth",
858
- context=(
859
- "Pip cannot resolve the current dependencies as the dependency graph "
860
- "is too complex for pip to solve efficiently."
861
- ),
862
- hint_stmt=(
863
- "Try adding lower bounds to constrain your dependencies, "
864
- "for example: 'package>=2.0.0' instead of just 'package'. "
865
- ),
866
- link="https://pip.pypa.io/en/stable/topics/dependency-resolution/#handling-resolution-too-deep-errors",
867
- )
868
-
869
-
870
- class InstallWheelBuildError(DiagnosticPipError):
871
- reference = "failed-wheel-build-for-install"
872
-
873
- def __init__(self, failed: list[InstallRequirement]) -> None:
874
- super().__init__(
875
- message=(
876
- "Failed to build installable wheels for some "
877
- "pyproject.toml based projects"
878
- ),
879
- context=", ".join(r.name for r in failed), # type: ignore
880
- hint_stmt=None,
881
- )