cli-ih 0.6.3__py3-none-any.whl → 0.6.3.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 (424) hide show
  1. cli_ih/asyncClient.py +13 -7
  2. cli_ih/client.py +13 -6
  3. {cli_ih-0.6.3.dist-info → cli_ih-0.6.3.1.dist-info}/METADATA +1 -1
  4. cli_ih-0.6.3.1.dist-info/RECORD +425 -0
  5. {cli_ih-0.6.3.dist-info → cli_ih-0.6.3.1.dist-info}/WHEEL +1 -1
  6. {cli_ih-0.6.3.dist-info → cli_ih-0.6.3.1.dist-info}/top_level.txt +1 -0
  7. venv/Lib/site-packages/__editable___cli_ih_0_6_3_1_finder.py +85 -0
  8. venv/Lib/site-packages/pip/__init__.py +13 -0
  9. venv/Lib/site-packages/pip/__main__.py +24 -0
  10. venv/Lib/site-packages/pip/__pip-runner__.py +50 -0
  11. venv/Lib/site-packages/pip/_internal/__init__.py +18 -0
  12. venv/Lib/site-packages/pip/_internal/build_env.py +349 -0
  13. venv/Lib/site-packages/pip/_internal/cache.py +291 -0
  14. venv/Lib/site-packages/pip/_internal/cli/__init__.py +3 -0
  15. venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +184 -0
  16. venv/Lib/site-packages/pip/_internal/cli/base_command.py +244 -0
  17. venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +1138 -0
  18. venv/Lib/site-packages/pip/_internal/cli/command_context.py +28 -0
  19. venv/Lib/site-packages/pip/_internal/cli/index_command.py +175 -0
  20. venv/Lib/site-packages/pip/_internal/cli/main.py +80 -0
  21. venv/Lib/site-packages/pip/_internal/cli/main_parser.py +134 -0
  22. venv/Lib/site-packages/pip/_internal/cli/parser.py +298 -0
  23. venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +151 -0
  24. venv/Lib/site-packages/pip/_internal/cli/req_command.py +351 -0
  25. venv/Lib/site-packages/pip/_internal/cli/spinners.py +235 -0
  26. venv/Lib/site-packages/pip/_internal/cli/status_codes.py +6 -0
  27. venv/Lib/site-packages/pip/_internal/commands/__init__.py +139 -0
  28. venv/Lib/site-packages/pip/_internal/commands/cache.py +231 -0
  29. venv/Lib/site-packages/pip/_internal/commands/check.py +66 -0
  30. venv/Lib/site-packages/pip/_internal/commands/completion.py +135 -0
  31. venv/Lib/site-packages/pip/_internal/commands/configuration.py +288 -0
  32. venv/Lib/site-packages/pip/_internal/commands/debug.py +203 -0
  33. venv/Lib/site-packages/pip/_internal/commands/download.py +145 -0
  34. venv/Lib/site-packages/pip/_internal/commands/freeze.py +107 -0
  35. venv/Lib/site-packages/pip/_internal/commands/hash.py +58 -0
  36. venv/Lib/site-packages/pip/_internal/commands/help.py +40 -0
  37. venv/Lib/site-packages/pip/_internal/commands/index.py +159 -0
  38. venv/Lib/site-packages/pip/_internal/commands/inspect.py +92 -0
  39. venv/Lib/site-packages/pip/_internal/commands/install.py +798 -0
  40. venv/Lib/site-packages/pip/_internal/commands/list.py +400 -0
  41. venv/Lib/site-packages/pip/_internal/commands/lock.py +170 -0
  42. venv/Lib/site-packages/pip/_internal/commands/search.py +178 -0
  43. venv/Lib/site-packages/pip/_internal/commands/show.py +231 -0
  44. venv/Lib/site-packages/pip/_internal/commands/uninstall.py +113 -0
  45. venv/Lib/site-packages/pip/_internal/commands/wheel.py +181 -0
  46. venv/Lib/site-packages/pip/_internal/configuration.py +397 -0
  47. venv/Lib/site-packages/pip/_internal/distributions/__init__.py +21 -0
  48. venv/Lib/site-packages/pip/_internal/distributions/base.py +55 -0
  49. venv/Lib/site-packages/pip/_internal/distributions/installed.py +33 -0
  50. venv/Lib/site-packages/pip/_internal/distributions/sdist.py +165 -0
  51. venv/Lib/site-packages/pip/_internal/distributions/wheel.py +44 -0
  52. venv/Lib/site-packages/pip/_internal/exceptions.py +881 -0
  53. venv/Lib/site-packages/pip/_internal/index/__init__.py +1 -0
  54. venv/Lib/site-packages/pip/_internal/index/collector.py +489 -0
  55. venv/Lib/site-packages/pip/_internal/index/package_finder.py +1059 -0
  56. venv/Lib/site-packages/pip/_internal/index/sources.py +287 -0
  57. venv/Lib/site-packages/pip/_internal/locations/__init__.py +441 -0
  58. venv/Lib/site-packages/pip/_internal/locations/_distutils.py +173 -0
  59. venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +215 -0
  60. venv/Lib/site-packages/pip/_internal/locations/base.py +82 -0
  61. venv/Lib/site-packages/pip/_internal/main.py +12 -0
  62. venv/Lib/site-packages/pip/_internal/metadata/__init__.py +164 -0
  63. venv/Lib/site-packages/pip/_internal/metadata/_json.py +87 -0
  64. venv/Lib/site-packages/pip/_internal/metadata/base.py +685 -0
  65. venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +6 -0
  66. venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +87 -0
  67. venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +223 -0
  68. venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +143 -0
  69. venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +298 -0
  70. venv/Lib/site-packages/pip/_internal/models/__init__.py +1 -0
  71. venv/Lib/site-packages/pip/_internal/models/candidate.py +25 -0
  72. venv/Lib/site-packages/pip/_internal/models/direct_url.py +227 -0
  73. venv/Lib/site-packages/pip/_internal/models/format_control.py +78 -0
  74. venv/Lib/site-packages/pip/_internal/models/index.py +28 -0
  75. venv/Lib/site-packages/pip/_internal/models/installation_report.py +57 -0
  76. venv/Lib/site-packages/pip/_internal/models/link.py +613 -0
  77. venv/Lib/site-packages/pip/_internal/models/pylock.py +188 -0
  78. venv/Lib/site-packages/pip/_internal/models/scheme.py +25 -0
  79. venv/Lib/site-packages/pip/_internal/models/search_scope.py +126 -0
  80. venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +53 -0
  81. venv/Lib/site-packages/pip/_internal/models/target_python.py +122 -0
  82. venv/Lib/site-packages/pip/_internal/models/wheel.py +141 -0
  83. venv/Lib/site-packages/pip/_internal/network/__init__.py +1 -0
  84. venv/Lib/site-packages/pip/_internal/network/auth.py +564 -0
  85. venv/Lib/site-packages/pip/_internal/network/cache.py +133 -0
  86. venv/Lib/site-packages/pip/_internal/network/download.py +342 -0
  87. venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +213 -0
  88. venv/Lib/site-packages/pip/_internal/network/session.py +528 -0
  89. venv/Lib/site-packages/pip/_internal/network/utils.py +98 -0
  90. venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +61 -0
  91. venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
  92. venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  93. venv/Lib/site-packages/pip/_internal/operations/build/build_tracker.py +140 -0
  94. venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +38 -0
  95. venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +41 -0
  96. venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +73 -0
  97. venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +38 -0
  98. venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +47 -0
  99. venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +119 -0
  100. venv/Lib/site-packages/pip/_internal/operations/check.py +175 -0
  101. venv/Lib/site-packages/pip/_internal/operations/freeze.py +259 -0
  102. venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +1 -0
  103. venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +48 -0
  104. venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +746 -0
  105. venv/Lib/site-packages/pip/_internal/operations/prepare.py +742 -0
  106. venv/Lib/site-packages/pip/_internal/pyproject.py +182 -0
  107. venv/Lib/site-packages/pip/_internal/req/__init__.py +105 -0
  108. venv/Lib/site-packages/pip/_internal/req/constructors.py +562 -0
  109. venv/Lib/site-packages/pip/_internal/req/req_dependency_group.py +75 -0
  110. venv/Lib/site-packages/pip/_internal/req/req_file.py +620 -0
  111. venv/Lib/site-packages/pip/_internal/req/req_install.py +937 -0
  112. venv/Lib/site-packages/pip/_internal/req/req_set.py +81 -0
  113. venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +639 -0
  114. venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
  115. venv/Lib/site-packages/pip/_internal/resolution/base.py +20 -0
  116. venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  117. venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +598 -0
  118. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  119. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +142 -0
  120. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +582 -0
  121. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +814 -0
  122. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +166 -0
  123. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +276 -0
  124. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +85 -0
  125. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +247 -0
  126. venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +336 -0
  127. venv/Lib/site-packages/pip/_internal/self_outdated_check.py +254 -0
  128. venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
  129. venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
  130. venv/Lib/site-packages/pip/_internal/utils/_log.py +38 -0
  131. venv/Lib/site-packages/pip/_internal/utils/appdirs.py +52 -0
  132. venv/Lib/site-packages/pip/_internal/utils/compat.py +85 -0
  133. venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +201 -0
  134. venv/Lib/site-packages/pip/_internal/utils/datetime.py +10 -0
  135. venv/Lib/site-packages/pip/_internal/utils/deprecation.py +126 -0
  136. venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
  137. venv/Lib/site-packages/pip/_internal/utils/egg_link.py +81 -0
  138. venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +88 -0
  139. venv/Lib/site-packages/pip/_internal/utils/filesystem.py +152 -0
  140. venv/Lib/site-packages/pip/_internal/utils/filetypes.py +24 -0
  141. venv/Lib/site-packages/pip/_internal/utils/glibc.py +102 -0
  142. venv/Lib/site-packages/pip/_internal/utils/hashes.py +150 -0
  143. venv/Lib/site-packages/pip/_internal/utils/logging.py +364 -0
  144. venv/Lib/site-packages/pip/_internal/utils/misc.py +765 -0
  145. venv/Lib/site-packages/pip/_internal/utils/packaging.py +44 -0
  146. venv/Lib/site-packages/pip/_internal/utils/retry.py +45 -0
  147. venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +149 -0
  148. venv/Lib/site-packages/pip/_internal/utils/subprocess.py +248 -0
  149. venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +294 -0
  150. venv/Lib/site-packages/pip/_internal/utils/unpacking.py +337 -0
  151. venv/Lib/site-packages/pip/_internal/utils/urls.py +55 -0
  152. venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +105 -0
  153. venv/Lib/site-packages/pip/_internal/utils/wheel.py +132 -0
  154. venv/Lib/site-packages/pip/_internal/vcs/__init__.py +15 -0
  155. venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +130 -0
  156. venv/Lib/site-packages/pip/_internal/vcs/git.py +571 -0
  157. venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +186 -0
  158. venv/Lib/site-packages/pip/_internal/vcs/subversion.py +335 -0
  159. venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +693 -0
  160. venv/Lib/site-packages/pip/_internal/wheel_builder.py +334 -0
  161. venv/Lib/site-packages/pip/_vendor/__init__.py +117 -0
  162. venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +29 -0
  163. venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +70 -0
  164. venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +168 -0
  165. venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +75 -0
  166. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +8 -0
  167. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +145 -0
  168. venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +48 -0
  169. venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +511 -0
  170. venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +119 -0
  171. venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +157 -0
  172. venv/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
  173. venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +146 -0
  174. venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +43 -0
  175. venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +4 -0
  176. venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +12 -0
  177. venv/Lib/site-packages/pip/_vendor/certifi/core.py +83 -0
  178. venv/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
  179. venv/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py +13 -0
  180. venv/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py +65 -0
  181. venv/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py +209 -0
  182. venv/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +59 -0
  183. venv/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +62 -0
  184. venv/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +9 -0
  185. venv/Lib/site-packages/pip/_vendor/dependency_groups/py.typed +0 -0
  186. venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +33 -0
  187. venv/Lib/site-packages/pip/_vendor/distlib/compat.py +1137 -0
  188. venv/Lib/site-packages/pip/_vendor/distlib/resources.py +358 -0
  189. venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +447 -0
  190. venv/Lib/site-packages/pip/_vendor/distlib/util.py +1984 -0
  191. venv/Lib/site-packages/pip/_vendor/distro/__init__.py +54 -0
  192. venv/Lib/site-packages/pip/_vendor/distro/__main__.py +4 -0
  193. venv/Lib/site-packages/pip/_vendor/distro/distro.py +1403 -0
  194. venv/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
  195. venv/Lib/site-packages/pip/_vendor/idna/__init__.py +45 -0
  196. venv/Lib/site-packages/pip/_vendor/idna/codec.py +122 -0
  197. venv/Lib/site-packages/pip/_vendor/idna/compat.py +15 -0
  198. venv/Lib/site-packages/pip/_vendor/idna/core.py +437 -0
  199. venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +4243 -0
  200. venv/Lib/site-packages/pip/_vendor/idna/intranges.py +57 -0
  201. venv/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -0
  202. venv/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
  203. venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +8681 -0
  204. venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +55 -0
  205. venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  206. venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +170 -0
  207. venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +929 -0
  208. venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +15 -0
  209. venv/Lib/site-packages/pip/_vendor/packaging/_elffile.py +109 -0
  210. venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +262 -0
  211. venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +85 -0
  212. venv/Lib/site-packages/pip/_vendor/packaging/_parser.py +353 -0
  213. venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +61 -0
  214. venv/Lib/site-packages/pip/_vendor/packaging/_tokenizer.py +195 -0
  215. venv/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py +145 -0
  216. venv/Lib/site-packages/pip/_vendor/packaging/licenses/_spdx.py +759 -0
  217. venv/Lib/site-packages/pip/_vendor/packaging/markers.py +362 -0
  218. venv/Lib/site-packages/pip/_vendor/packaging/metadata.py +862 -0
  219. venv/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
  220. venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +91 -0
  221. venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +1019 -0
  222. venv/Lib/site-packages/pip/_vendor/packaging/tags.py +656 -0
  223. venv/Lib/site-packages/pip/_vendor/packaging/utils.py +163 -0
  224. venv/Lib/site-packages/pip/_vendor/packaging/version.py +582 -0
  225. venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +3676 -0
  226. venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +631 -0
  227. venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +55 -0
  228. venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +249 -0
  229. venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +299 -0
  230. venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +144 -0
  231. venv/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
  232. venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +272 -0
  233. venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +21 -0
  234. venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +272 -0
  235. venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +82 -0
  236. venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +17 -0
  237. venv/Lib/site-packages/pip/_vendor/pygments/console.py +70 -0
  238. venv/Lib/site-packages/pip/_vendor/pygments/filter.py +70 -0
  239. venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +940 -0
  240. venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +129 -0
  241. venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +157 -0
  242. venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
  243. venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +963 -0
  244. venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
  245. venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +602 -0
  246. venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +1201 -0
  247. venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +43 -0
  248. venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +72 -0
  249. venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +91 -0
  250. venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +104 -0
  251. venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +247 -0
  252. venv/Lib/site-packages/pip/_vendor/pygments/style.py +203 -0
  253. venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +61 -0
  254. venv/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py +54 -0
  255. venv/Lib/site-packages/pip/_vendor/pygments/token.py +214 -0
  256. venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +153 -0
  257. venv/Lib/site-packages/pip/_vendor/pygments/util.py +324 -0
  258. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +31 -0
  259. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +410 -0
  260. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +21 -0
  261. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +389 -0
  262. venv/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
  263. venv/Lib/site-packages/pip/_vendor/requests/__init__.py +179 -0
  264. venv/Lib/site-packages/pip/_vendor/requests/__version__.py +14 -0
  265. venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +50 -0
  266. venv/Lib/site-packages/pip/_vendor/requests/adapters.py +719 -0
  267. venv/Lib/site-packages/pip/_vendor/requests/api.py +157 -0
  268. venv/Lib/site-packages/pip/_vendor/requests/auth.py +314 -0
  269. venv/Lib/site-packages/pip/_vendor/requests/certs.py +17 -0
  270. venv/Lib/site-packages/pip/_vendor/requests/compat.py +90 -0
  271. venv/Lib/site-packages/pip/_vendor/requests/cookies.py +561 -0
  272. venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +151 -0
  273. venv/Lib/site-packages/pip/_vendor/requests/help.py +127 -0
  274. venv/Lib/site-packages/pip/_vendor/requests/hooks.py +33 -0
  275. venv/Lib/site-packages/pip/_vendor/requests/models.py +1039 -0
  276. venv/Lib/site-packages/pip/_vendor/requests/packages.py +25 -0
  277. venv/Lib/site-packages/pip/_vendor/requests/sessions.py +831 -0
  278. venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +128 -0
  279. venv/Lib/site-packages/pip/_vendor/requests/structures.py +99 -0
  280. venv/Lib/site-packages/pip/_vendor/requests/utils.py +1086 -0
  281. venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +27 -0
  282. venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +196 -0
  283. venv/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
  284. venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +55 -0
  285. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +27 -0
  286. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +47 -0
  287. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +48 -0
  288. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +57 -0
  289. venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +622 -0
  290. venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +209 -0
  291. venv/Lib/site-packages/pip/_vendor/rich/__init__.py +177 -0
  292. venv/Lib/site-packages/pip/_vendor/rich/__main__.py +245 -0
  293. venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +454 -0
  294. venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
  295. venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
  296. venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +76 -0
  297. venv/Lib/site-packages/pip/_vendor/rich/_extension.py +10 -0
  298. venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +24 -0
  299. venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +268 -0
  300. venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +94 -0
  301. venv/Lib/site-packages/pip/_vendor/rich/_loop.py +43 -0
  302. venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +69 -0
  303. venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +309 -0
  304. venv/Lib/site-packages/pip/_vendor/rich/_pick.py +17 -0
  305. venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +153 -0
  306. venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +482 -0
  307. venv/Lib/site-packages/pip/_vendor/rich/_stack.py +16 -0
  308. venv/Lib/site-packages/pip/_vendor/rich/_timer.py +19 -0
  309. venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +661 -0
  310. venv/Lib/site-packages/pip/_vendor/rich/_windows.py +71 -0
  311. venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
  312. venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +93 -0
  313. venv/Lib/site-packages/pip/_vendor/rich/abc.py +33 -0
  314. venv/Lib/site-packages/pip/_vendor/rich/align.py +306 -0
  315. venv/Lib/site-packages/pip/_vendor/rich/ansi.py +241 -0
  316. venv/Lib/site-packages/pip/_vendor/rich/bar.py +93 -0
  317. venv/Lib/site-packages/pip/_vendor/rich/box.py +474 -0
  318. venv/Lib/site-packages/pip/_vendor/rich/cells.py +174 -0
  319. venv/Lib/site-packages/pip/_vendor/rich/color.py +621 -0
  320. venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
  321. venv/Lib/site-packages/pip/_vendor/rich/columns.py +187 -0
  322. venv/Lib/site-packages/pip/_vendor/rich/console.py +2680 -0
  323. venv/Lib/site-packages/pip/_vendor/rich/constrain.py +37 -0
  324. venv/Lib/site-packages/pip/_vendor/rich/containers.py +167 -0
  325. venv/Lib/site-packages/pip/_vendor/rich/control.py +219 -0
  326. venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +193 -0
  327. venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +39 -0
  328. venv/Lib/site-packages/pip/_vendor/rich/emoji.py +91 -0
  329. venv/Lib/site-packages/pip/_vendor/rich/errors.py +34 -0
  330. venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
  331. venv/Lib/site-packages/pip/_vendor/rich/filesize.py +88 -0
  332. venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +232 -0
  333. venv/Lib/site-packages/pip/_vendor/rich/json.py +139 -0
  334. venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +101 -0
  335. venv/Lib/site-packages/pip/_vendor/rich/layout.py +442 -0
  336. venv/Lib/site-packages/pip/_vendor/rich/live.py +400 -0
  337. venv/Lib/site-packages/pip/_vendor/rich/live_render.py +106 -0
  338. venv/Lib/site-packages/pip/_vendor/rich/logging.py +297 -0
  339. venv/Lib/site-packages/pip/_vendor/rich/markup.py +251 -0
  340. venv/Lib/site-packages/pip/_vendor/rich/measure.py +151 -0
  341. venv/Lib/site-packages/pip/_vendor/rich/padding.py +141 -0
  342. venv/Lib/site-packages/pip/_vendor/rich/pager.py +34 -0
  343. venv/Lib/site-packages/pip/_vendor/rich/palette.py +100 -0
  344. venv/Lib/site-packages/pip/_vendor/rich/panel.py +317 -0
  345. venv/Lib/site-packages/pip/_vendor/rich/pretty.py +1016 -0
  346. venv/Lib/site-packages/pip/_vendor/rich/progress.py +1715 -0
  347. venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +223 -0
  348. venv/Lib/site-packages/pip/_vendor/rich/prompt.py +400 -0
  349. venv/Lib/site-packages/pip/_vendor/rich/protocol.py +42 -0
  350. venv/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
  351. venv/Lib/site-packages/pip/_vendor/rich/region.py +10 -0
  352. venv/Lib/site-packages/pip/_vendor/rich/repr.py +149 -0
  353. venv/Lib/site-packages/pip/_vendor/rich/rule.py +130 -0
  354. venv/Lib/site-packages/pip/_vendor/rich/scope.py +86 -0
  355. venv/Lib/site-packages/pip/_vendor/rich/screen.py +54 -0
  356. venv/Lib/site-packages/pip/_vendor/rich/segment.py +752 -0
  357. venv/Lib/site-packages/pip/_vendor/rich/spinner.py +132 -0
  358. venv/Lib/site-packages/pip/_vendor/rich/status.py +131 -0
  359. venv/Lib/site-packages/pip/_vendor/rich/style.py +796 -0
  360. venv/Lib/site-packages/pip/_vendor/rich/styled.py +42 -0
  361. venv/Lib/site-packages/pip/_vendor/rich/syntax.py +985 -0
  362. venv/Lib/site-packages/pip/_vendor/rich/table.py +1006 -0
  363. venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
  364. venv/Lib/site-packages/pip/_vendor/rich/text.py +1361 -0
  365. venv/Lib/site-packages/pip/_vendor/rich/theme.py +115 -0
  366. venv/Lib/site-packages/pip/_vendor/rich/themes.py +5 -0
  367. venv/Lib/site-packages/pip/_vendor/rich/traceback.py +899 -0
  368. venv/Lib/site-packages/pip/_vendor/rich/tree.py +257 -0
  369. venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +8 -0
  370. venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +770 -0
  371. venv/Lib/site-packages/pip/_vendor/tomli/_re.py +112 -0
  372. venv/Lib/site-packages/pip/_vendor/tomli/_types.py +10 -0
  373. venv/Lib/site-packages/pip/_vendor/tomli/py.typed +1 -0
  374. venv/Lib/site-packages/pip/_vendor/tomli_w/__init__.py +4 -0
  375. venv/Lib/site-packages/pip/_vendor/tomli_w/_writer.py +229 -0
  376. venv/Lib/site-packages/pip/_vendor/tomli_w/py.typed +1 -0
  377. venv/Lib/site-packages/pip/_vendor/truststore/__init__.py +36 -0
  378. venv/Lib/site-packages/pip/_vendor/truststore/_api.py +333 -0
  379. venv/Lib/site-packages/pip/_vendor/truststore/_macos.py +571 -0
  380. venv/Lib/site-packages/pip/_vendor/truststore/_openssl.py +66 -0
  381. venv/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py +31 -0
  382. venv/Lib/site-packages/pip/_vendor/truststore/_windows.py +567 -0
  383. venv/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
  384. venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +102 -0
  385. venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +355 -0
  386. venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +2 -0
  387. venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +572 -0
  388. venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +1140 -0
  389. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  390. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
  391. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  392. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
  393. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
  394. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
  395. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
  396. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +518 -0
  397. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +920 -0
  398. venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
  399. venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
  400. venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +274 -0
  401. venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
  402. venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
  403. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  404. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
  405. venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +155 -0
  406. venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +1076 -0
  407. venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +540 -0
  408. venv/Lib/site-packages/pip/_vendor/urllib3/request.py +191 -0
  409. venv/Lib/site-packages/pip/_vendor/urllib3/response.py +879 -0
  410. venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
  411. venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +149 -0
  412. venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
  413. venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
  414. venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +137 -0
  415. venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
  416. venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +622 -0
  417. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +504 -0
  418. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
  419. venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
  420. venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +271 -0
  421. venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +435 -0
  422. venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +152 -0
  423. venv/Lib/site-packages/pip/py.typed +4 -0
  424. cli_ih-0.6.3.dist-info/RECORD +0 -8
@@ -0,0 +1,1138 @@
1
+ """
2
+ shared options and groups
3
+
4
+ The principle here is to define options once, but *not* instantiate them
5
+ globally. One reason being that options with action='append' can carry state
6
+ between parses. pip parses general options twice internally, and shouldn't
7
+ pass on state. To be consistent, all options will follow this design.
8
+ """
9
+
10
+ # The following comment should be removed at some point in the future.
11
+ # mypy: strict-optional=False
12
+ from __future__ import annotations
13
+
14
+ import importlib.util
15
+ import logging
16
+ import os
17
+ import pathlib
18
+ import textwrap
19
+ from functools import partial
20
+ from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
21
+ from textwrap import dedent
22
+ from typing import Any, Callable
23
+
24
+ from pip._vendor.packaging.utils import canonicalize_name
25
+
26
+ from pip._internal.cli.parser import ConfigOptionParser
27
+ from pip._internal.exceptions import CommandError
28
+ from pip._internal.locations import USER_CACHE_DIR, get_src_prefix
29
+ from pip._internal.models.format_control import FormatControl
30
+ from pip._internal.models.index import PyPI
31
+ from pip._internal.models.target_python import TargetPython
32
+ from pip._internal.utils.hashes import STRONG_HASHES
33
+ from pip._internal.utils.misc import strtobool
34
+
35
+ logger = logging.getLogger(__name__)
36
+
37
+
38
+ def raise_option_error(parser: OptionParser, option: Option, msg: str) -> None:
39
+ """
40
+ Raise an option parsing error using parser.error().
41
+
42
+ Args:
43
+ parser: an OptionParser instance.
44
+ option: an Option instance.
45
+ msg: the error text.
46
+ """
47
+ msg = f"{option} error: {msg}"
48
+ msg = textwrap.fill(" ".join(msg.split()))
49
+ parser.error(msg)
50
+
51
+
52
+ def make_option_group(group: dict[str, Any], parser: ConfigOptionParser) -> OptionGroup:
53
+ """
54
+ Return an OptionGroup object
55
+ group -- assumed to be dict with 'name' and 'options' keys
56
+ parser -- an optparse Parser
57
+ """
58
+ option_group = OptionGroup(parser, group["name"])
59
+ for option in group["options"]:
60
+ option_group.add_option(option())
61
+ return option_group
62
+
63
+
64
+ def check_dist_restriction(options: Values, check_target: bool = False) -> None:
65
+ """Function for determining if custom platform options are allowed.
66
+
67
+ :param options: The OptionParser options.
68
+ :param check_target: Whether or not to check if --target is being used.
69
+ """
70
+ dist_restriction_set = any(
71
+ [
72
+ options.python_version,
73
+ options.platforms,
74
+ options.abis,
75
+ options.implementation,
76
+ ]
77
+ )
78
+
79
+ binary_only = FormatControl(set(), {":all:"})
80
+ sdist_dependencies_allowed = (
81
+ options.format_control != binary_only and not options.ignore_dependencies
82
+ )
83
+
84
+ # Installations or downloads using dist restrictions must not combine
85
+ # source distributions and dist-specific wheels, as they are not
86
+ # guaranteed to be locally compatible.
87
+ if dist_restriction_set and sdist_dependencies_allowed:
88
+ raise CommandError(
89
+ "When restricting platform and interpreter constraints using "
90
+ "--python-version, --platform, --abi, or --implementation, "
91
+ "either --no-deps must be set, or --only-binary=:all: must be "
92
+ "set and --no-binary must not be set (or must be set to "
93
+ ":none:)."
94
+ )
95
+
96
+ if check_target:
97
+ if not options.dry_run and dist_restriction_set and not options.target_dir:
98
+ raise CommandError(
99
+ "Can not use any platform or abi specific options unless "
100
+ "installing via '--target' or using '--dry-run'"
101
+ )
102
+
103
+
104
+ def _path_option_check(option: Option, opt: str, value: str) -> str:
105
+ return os.path.expanduser(value)
106
+
107
+
108
+ def _package_name_option_check(option: Option, opt: str, value: str) -> str:
109
+ return canonicalize_name(value)
110
+
111
+
112
+ class PipOption(Option):
113
+ TYPES = Option.TYPES + ("path", "package_name")
114
+ TYPE_CHECKER = Option.TYPE_CHECKER.copy()
115
+ TYPE_CHECKER["package_name"] = _package_name_option_check
116
+ TYPE_CHECKER["path"] = _path_option_check
117
+
118
+
119
+ ###########
120
+ # options #
121
+ ###########
122
+
123
+ help_: Callable[..., Option] = partial(
124
+ Option,
125
+ "-h",
126
+ "--help",
127
+ dest="help",
128
+ action="help",
129
+ help="Show help.",
130
+ )
131
+
132
+ debug_mode: Callable[..., Option] = partial(
133
+ Option,
134
+ "--debug",
135
+ dest="debug_mode",
136
+ action="store_true",
137
+ default=False,
138
+ help=(
139
+ "Let unhandled exceptions propagate outside the main subroutine, "
140
+ "instead of logging them to stderr."
141
+ ),
142
+ )
143
+
144
+ isolated_mode: Callable[..., Option] = partial(
145
+ Option,
146
+ "--isolated",
147
+ dest="isolated_mode",
148
+ action="store_true",
149
+ default=False,
150
+ help=(
151
+ "Run pip in an isolated mode, ignoring environment variables and user "
152
+ "configuration."
153
+ ),
154
+ )
155
+
156
+ require_virtualenv: Callable[..., Option] = partial(
157
+ Option,
158
+ "--require-virtualenv",
159
+ "--require-venv",
160
+ dest="require_venv",
161
+ action="store_true",
162
+ default=False,
163
+ help=(
164
+ "Allow pip to only run in a virtual environment; "
165
+ "exit with an error otherwise."
166
+ ),
167
+ )
168
+
169
+ override_externally_managed: Callable[..., Option] = partial(
170
+ Option,
171
+ "--break-system-packages",
172
+ dest="override_externally_managed",
173
+ action="store_true",
174
+ help="Allow pip to modify an EXTERNALLY-MANAGED Python installation",
175
+ )
176
+
177
+ python: Callable[..., Option] = partial(
178
+ Option,
179
+ "--python",
180
+ dest="python",
181
+ help="Run pip with the specified Python interpreter.",
182
+ )
183
+
184
+ verbose: Callable[..., Option] = partial(
185
+ Option,
186
+ "-v",
187
+ "--verbose",
188
+ dest="verbose",
189
+ action="count",
190
+ default=0,
191
+ help="Give more output. Option is additive, and can be used up to 3 times.",
192
+ )
193
+
194
+ no_color: Callable[..., Option] = partial(
195
+ Option,
196
+ "--no-color",
197
+ dest="no_color",
198
+ action="store_true",
199
+ default=False,
200
+ help="Suppress colored output.",
201
+ )
202
+
203
+ version: Callable[..., Option] = partial(
204
+ Option,
205
+ "-V",
206
+ "--version",
207
+ dest="version",
208
+ action="store_true",
209
+ help="Show version and exit.",
210
+ )
211
+
212
+ quiet: Callable[..., Option] = partial(
213
+ Option,
214
+ "-q",
215
+ "--quiet",
216
+ dest="quiet",
217
+ action="count",
218
+ default=0,
219
+ help=(
220
+ "Give less output. Option is additive, and can be used up to 3"
221
+ " times (corresponding to WARNING, ERROR, and CRITICAL logging"
222
+ " levels)."
223
+ ),
224
+ )
225
+
226
+ progress_bar: Callable[..., Option] = partial(
227
+ Option,
228
+ "--progress-bar",
229
+ dest="progress_bar",
230
+ type="choice",
231
+ choices=["auto", "on", "off", "raw"],
232
+ default="auto",
233
+ help=(
234
+ "Specify whether the progress bar should be used. In 'auto'"
235
+ " mode, --quiet will suppress all progress bars."
236
+ " [auto, on, off, raw] (default: auto)"
237
+ ),
238
+ )
239
+
240
+ log: Callable[..., Option] = partial(
241
+ PipOption,
242
+ "--log",
243
+ "--log-file",
244
+ "--local-log",
245
+ dest="log",
246
+ metavar="path",
247
+ type="path",
248
+ help="Path to a verbose appending log.",
249
+ )
250
+
251
+ no_input: Callable[..., Option] = partial(
252
+ Option,
253
+ # Don't ask for input
254
+ "--no-input",
255
+ dest="no_input",
256
+ action="store_true",
257
+ default=False,
258
+ help="Disable prompting for input.",
259
+ )
260
+
261
+ keyring_provider: Callable[..., Option] = partial(
262
+ Option,
263
+ "--keyring-provider",
264
+ dest="keyring_provider",
265
+ choices=["auto", "disabled", "import", "subprocess"],
266
+ default="auto",
267
+ help=(
268
+ "Enable the credential lookup via the keyring library if user input is allowed."
269
+ " Specify which mechanism to use [auto, disabled, import, subprocess]."
270
+ " (default: %default)"
271
+ ),
272
+ )
273
+
274
+ proxy: Callable[..., Option] = partial(
275
+ Option,
276
+ "--proxy",
277
+ dest="proxy",
278
+ type="str",
279
+ default="",
280
+ help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.",
281
+ )
282
+
283
+ retries: Callable[..., Option] = partial(
284
+ Option,
285
+ "--retries",
286
+ dest="retries",
287
+ type="int",
288
+ default=5,
289
+ help="Maximum attempts to establish a new HTTP connection. (default: %default)",
290
+ )
291
+
292
+ resume_retries: Callable[..., Option] = partial(
293
+ Option,
294
+ "--resume-retries",
295
+ dest="resume_retries",
296
+ type="int",
297
+ default=5,
298
+ help="Maximum attempts to resume or restart an incomplete download. "
299
+ "(default: %default)",
300
+ )
301
+
302
+ timeout: Callable[..., Option] = partial(
303
+ Option,
304
+ "--timeout",
305
+ "--default-timeout",
306
+ metavar="sec",
307
+ dest="timeout",
308
+ type="float",
309
+ default=15,
310
+ help="Set the socket timeout (default %default seconds).",
311
+ )
312
+
313
+
314
+ def exists_action() -> Option:
315
+ return Option(
316
+ # Option when path already exist
317
+ "--exists-action",
318
+ dest="exists_action",
319
+ type="choice",
320
+ choices=["s", "i", "w", "b", "a"],
321
+ default=[],
322
+ action="append",
323
+ metavar="action",
324
+ help="Default action when a path already exists: "
325
+ "(s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.",
326
+ )
327
+
328
+
329
+ cert: Callable[..., Option] = partial(
330
+ PipOption,
331
+ "--cert",
332
+ dest="cert",
333
+ type="path",
334
+ metavar="path",
335
+ help=(
336
+ "Path to PEM-encoded CA certificate bundle. "
337
+ "If provided, overrides the default. "
338
+ "See 'SSL Certificate Verification' in pip documentation "
339
+ "for more information."
340
+ ),
341
+ )
342
+
343
+ client_cert: Callable[..., Option] = partial(
344
+ PipOption,
345
+ "--client-cert",
346
+ dest="client_cert",
347
+ type="path",
348
+ default=None,
349
+ metavar="path",
350
+ help="Path to SSL client certificate, a single file containing the "
351
+ "private key and the certificate in PEM format.",
352
+ )
353
+
354
+ index_url: Callable[..., Option] = partial(
355
+ Option,
356
+ "-i",
357
+ "--index-url",
358
+ "--pypi-url",
359
+ dest="index_url",
360
+ metavar="URL",
361
+ default=PyPI.simple_url,
362
+ help="Base URL of the Python Package Index (default %default). "
363
+ "This should point to a repository compliant with PEP 503 "
364
+ "(the simple repository API) or a local directory laid out "
365
+ "in the same format.",
366
+ )
367
+
368
+
369
+ def extra_index_url() -> Option:
370
+ return Option(
371
+ "--extra-index-url",
372
+ dest="extra_index_urls",
373
+ metavar="URL",
374
+ action="append",
375
+ default=[],
376
+ help="Extra URLs of package indexes to use in addition to "
377
+ "--index-url. Should follow the same rules as "
378
+ "--index-url.",
379
+ )
380
+
381
+
382
+ no_index: Callable[..., Option] = partial(
383
+ Option,
384
+ "--no-index",
385
+ dest="no_index",
386
+ action="store_true",
387
+ default=False,
388
+ help="Ignore package index (only looking at --find-links URLs instead).",
389
+ )
390
+
391
+
392
+ def find_links() -> Option:
393
+ return Option(
394
+ "-f",
395
+ "--find-links",
396
+ dest="find_links",
397
+ action="append",
398
+ default=[],
399
+ metavar="url",
400
+ help="If a URL or path to an html file, then parse for links to "
401
+ "archives such as sdist (.tar.gz) or wheel (.whl) files. "
402
+ "If a local path or file:// URL that's a directory, "
403
+ "then look for archives in the directory listing. "
404
+ "Links to VCS project URLs are not supported.",
405
+ )
406
+
407
+
408
+ def trusted_host() -> Option:
409
+ return Option(
410
+ "--trusted-host",
411
+ dest="trusted_hosts",
412
+ action="append",
413
+ metavar="HOSTNAME",
414
+ default=[],
415
+ help="Mark this host or host:port pair as trusted, even though it "
416
+ "does not have valid or any HTTPS.",
417
+ )
418
+
419
+
420
+ def constraints() -> Option:
421
+ return Option(
422
+ "-c",
423
+ "--constraint",
424
+ dest="constraints",
425
+ action="append",
426
+ default=[],
427
+ metavar="file",
428
+ help="Constrain versions using the given constraints file. "
429
+ "This option can be used multiple times.",
430
+ )
431
+
432
+
433
+ def requirements() -> Option:
434
+ return Option(
435
+ "-r",
436
+ "--requirement",
437
+ dest="requirements",
438
+ action="append",
439
+ default=[],
440
+ metavar="file",
441
+ help="Install from the given requirements file. "
442
+ "This option can be used multiple times.",
443
+ )
444
+
445
+
446
+ def editable() -> Option:
447
+ return Option(
448
+ "-e",
449
+ "--editable",
450
+ dest="editables",
451
+ action="append",
452
+ default=[],
453
+ metavar="path/url",
454
+ help=(
455
+ "Install a project in editable mode (i.e. setuptools "
456
+ '"develop mode") from a local project path or a VCS url.'
457
+ ),
458
+ )
459
+
460
+
461
+ def _handle_src(option: Option, opt_str: str, value: str, parser: OptionParser) -> None:
462
+ value = os.path.abspath(value)
463
+ setattr(parser.values, option.dest, value)
464
+
465
+
466
+ src: Callable[..., Option] = partial(
467
+ PipOption,
468
+ "--src",
469
+ "--source",
470
+ "--source-dir",
471
+ "--source-directory",
472
+ dest="src_dir",
473
+ type="path",
474
+ metavar="dir",
475
+ default=get_src_prefix(),
476
+ action="callback",
477
+ callback=_handle_src,
478
+ help="Directory to check out editable projects into. "
479
+ 'The default in a virtualenv is "<venv path>/src". '
480
+ 'The default for global installs is "<current dir>/src".',
481
+ )
482
+
483
+
484
+ def _get_format_control(values: Values, option: Option) -> Any:
485
+ """Get a format_control object."""
486
+ return getattr(values, option.dest)
487
+
488
+
489
+ def _handle_no_binary(
490
+ option: Option, opt_str: str, value: str, parser: OptionParser
491
+ ) -> None:
492
+ existing = _get_format_control(parser.values, option)
493
+ FormatControl.handle_mutual_excludes(
494
+ value,
495
+ existing.no_binary,
496
+ existing.only_binary,
497
+ )
498
+
499
+
500
+ def _handle_only_binary(
501
+ option: Option, opt_str: str, value: str, parser: OptionParser
502
+ ) -> None:
503
+ existing = _get_format_control(parser.values, option)
504
+ FormatControl.handle_mutual_excludes(
505
+ value,
506
+ existing.only_binary,
507
+ existing.no_binary,
508
+ )
509
+
510
+
511
+ def no_binary() -> Option:
512
+ format_control = FormatControl(set(), set())
513
+ return Option(
514
+ "--no-binary",
515
+ dest="format_control",
516
+ action="callback",
517
+ callback=_handle_no_binary,
518
+ type="str",
519
+ default=format_control,
520
+ help="Do not use binary packages. Can be supplied multiple times, and "
521
+ 'each time adds to the existing value. Accepts either ":all:" to '
522
+ 'disable all binary packages, ":none:" to empty the set (notice '
523
+ "the colons), or one or more package names with commas between "
524
+ "them (no colons). Note that some packages are tricky to compile "
525
+ "and may fail to install when this option is used on them.",
526
+ )
527
+
528
+
529
+ def only_binary() -> Option:
530
+ format_control = FormatControl(set(), set())
531
+ return Option(
532
+ "--only-binary",
533
+ dest="format_control",
534
+ action="callback",
535
+ callback=_handle_only_binary,
536
+ type="str",
537
+ default=format_control,
538
+ help="Do not use source packages. Can be supplied multiple times, and "
539
+ 'each time adds to the existing value. Accepts either ":all:" to '
540
+ 'disable all source packages, ":none:" to empty the set, or one '
541
+ "or more package names with commas between them. Packages "
542
+ "without binary distributions will fail to install when this "
543
+ "option is used on them.",
544
+ )
545
+
546
+
547
+ platforms: Callable[..., Option] = partial(
548
+ Option,
549
+ "--platform",
550
+ dest="platforms",
551
+ metavar="platform",
552
+ action="append",
553
+ default=None,
554
+ help=(
555
+ "Only use wheels compatible with <platform>. Defaults to the "
556
+ "platform of the running system. Use this option multiple times to "
557
+ "specify multiple platforms supported by the target interpreter."
558
+ ),
559
+ )
560
+
561
+
562
+ # This was made a separate function for unit-testing purposes.
563
+ def _convert_python_version(value: str) -> tuple[tuple[int, ...], str | None]:
564
+ """
565
+ Convert a version string like "3", "37", or "3.7.3" into a tuple of ints.
566
+
567
+ :return: A 2-tuple (version_info, error_msg), where `error_msg` is
568
+ non-None if and only if there was a parsing error.
569
+ """
570
+ if not value:
571
+ # The empty string is the same as not providing a value.
572
+ return (None, None)
573
+
574
+ parts = value.split(".")
575
+ if len(parts) > 3:
576
+ return ((), "at most three version parts are allowed")
577
+
578
+ if len(parts) == 1:
579
+ # Then we are in the case of "3" or "37".
580
+ value = parts[0]
581
+ if len(value) > 1:
582
+ parts = [value[0], value[1:]]
583
+
584
+ try:
585
+ version_info = tuple(int(part) for part in parts)
586
+ except ValueError:
587
+ return ((), "each version part must be an integer")
588
+
589
+ return (version_info, None)
590
+
591
+
592
+ def _handle_python_version(
593
+ option: Option, opt_str: str, value: str, parser: OptionParser
594
+ ) -> None:
595
+ """
596
+ Handle a provided --python-version value.
597
+ """
598
+ version_info, error_msg = _convert_python_version(value)
599
+ if error_msg is not None:
600
+ msg = f"invalid --python-version value: {value!r}: {error_msg}"
601
+ raise_option_error(parser, option=option, msg=msg)
602
+
603
+ parser.values.python_version = version_info
604
+
605
+
606
+ python_version: Callable[..., Option] = partial(
607
+ Option,
608
+ "--python-version",
609
+ dest="python_version",
610
+ metavar="python_version",
611
+ action="callback",
612
+ callback=_handle_python_version,
613
+ type="str",
614
+ default=None,
615
+ help=dedent(
616
+ """\
617
+ The Python interpreter version to use for wheel and "Requires-Python"
618
+ compatibility checks. Defaults to a version derived from the running
619
+ interpreter. The version can be specified using up to three dot-separated
620
+ integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
621
+ version can also be given as a string without dots (e.g. "37" for 3.7.0).
622
+ """
623
+ ),
624
+ )
625
+
626
+
627
+ implementation: Callable[..., Option] = partial(
628
+ Option,
629
+ "--implementation",
630
+ dest="implementation",
631
+ metavar="implementation",
632
+ default=None,
633
+ help=(
634
+ "Only use wheels compatible with Python "
635
+ "implementation <implementation>, e.g. 'pp', 'jy', 'cp', "
636
+ " or 'ip'. If not specified, then the current "
637
+ "interpreter implementation is used. Use 'py' to force "
638
+ "implementation-agnostic wheels."
639
+ ),
640
+ )
641
+
642
+
643
+ abis: Callable[..., Option] = partial(
644
+ Option,
645
+ "--abi",
646
+ dest="abis",
647
+ metavar="abi",
648
+ action="append",
649
+ default=None,
650
+ help=(
651
+ "Only use wheels compatible with Python abi <abi>, e.g. 'pypy_41'. "
652
+ "If not specified, then the current interpreter abi tag is used. "
653
+ "Use this option multiple times to specify multiple abis supported "
654
+ "by the target interpreter. Generally you will need to specify "
655
+ "--implementation, --platform, and --python-version when using this "
656
+ "option."
657
+ ),
658
+ )
659
+
660
+
661
+ def add_target_python_options(cmd_opts: OptionGroup) -> None:
662
+ cmd_opts.add_option(platforms())
663
+ cmd_opts.add_option(python_version())
664
+ cmd_opts.add_option(implementation())
665
+ cmd_opts.add_option(abis())
666
+
667
+
668
+ def make_target_python(options: Values) -> TargetPython:
669
+ target_python = TargetPython(
670
+ platforms=options.platforms,
671
+ py_version_info=options.python_version,
672
+ abis=options.abis,
673
+ implementation=options.implementation,
674
+ )
675
+
676
+ return target_python
677
+
678
+
679
+ def prefer_binary() -> Option:
680
+ return Option(
681
+ "--prefer-binary",
682
+ dest="prefer_binary",
683
+ action="store_true",
684
+ default=False,
685
+ help=(
686
+ "Prefer binary packages over source packages, even if the "
687
+ "source packages are newer."
688
+ ),
689
+ )
690
+
691
+
692
+ cache_dir: Callable[..., Option] = partial(
693
+ PipOption,
694
+ "--cache-dir",
695
+ dest="cache_dir",
696
+ default=USER_CACHE_DIR,
697
+ metavar="dir",
698
+ type="path",
699
+ help="Store the cache data in <dir>.",
700
+ )
701
+
702
+
703
+ def _handle_no_cache_dir(
704
+ option: Option, opt: str, value: str, parser: OptionParser
705
+ ) -> None:
706
+ """
707
+ Process a value provided for the --no-cache-dir option.
708
+
709
+ This is an optparse.Option callback for the --no-cache-dir option.
710
+ """
711
+ # The value argument will be None if --no-cache-dir is passed via the
712
+ # command-line, since the option doesn't accept arguments. However,
713
+ # the value can be non-None if the option is triggered e.g. by an
714
+ # environment variable, like PIP_NO_CACHE_DIR=true.
715
+ if value is not None:
716
+ # Then parse the string value to get argument error-checking.
717
+ try:
718
+ strtobool(value)
719
+ except ValueError as exc:
720
+ raise_option_error(parser, option=option, msg=str(exc))
721
+
722
+ # Originally, setting PIP_NO_CACHE_DIR to a value that strtobool()
723
+ # converted to 0 (like "false" or "no") caused cache_dir to be disabled
724
+ # rather than enabled (logic would say the latter). Thus, we disable
725
+ # the cache directory not just on values that parse to True, but (for
726
+ # backwards compatibility reasons) also on values that parse to False.
727
+ # In other words, always set it to False if the option is provided in
728
+ # some (valid) form.
729
+ parser.values.cache_dir = False
730
+
731
+
732
+ no_cache: Callable[..., Option] = partial(
733
+ Option,
734
+ "--no-cache-dir",
735
+ dest="cache_dir",
736
+ action="callback",
737
+ callback=_handle_no_cache_dir,
738
+ help="Disable the cache.",
739
+ )
740
+
741
+ no_deps: Callable[..., Option] = partial(
742
+ Option,
743
+ "--no-deps",
744
+ "--no-dependencies",
745
+ dest="ignore_dependencies",
746
+ action="store_true",
747
+ default=False,
748
+ help="Don't install package dependencies.",
749
+ )
750
+
751
+
752
+ def _handle_dependency_group(
753
+ option: Option, opt: str, value: str, parser: OptionParser
754
+ ) -> None:
755
+ """
756
+ Process a value provided for the --group option.
757
+
758
+ Splits on the rightmost ":", and validates that the path (if present) ends
759
+ in `pyproject.toml`. Defaults the path to `pyproject.toml` when one is not given.
760
+
761
+ `:` cannot appear in dependency group names, so this is a safe and simple parse.
762
+
763
+ This is an optparse.Option callback for the dependency_groups option.
764
+ """
765
+ path, sep, groupname = value.rpartition(":")
766
+ if not sep:
767
+ path = "pyproject.toml"
768
+ else:
769
+ # check for 'pyproject.toml' filenames using pathlib
770
+ if pathlib.PurePath(path).name != "pyproject.toml":
771
+ msg = "group paths use 'pyproject.toml' filenames"
772
+ raise_option_error(parser, option=option, msg=msg)
773
+
774
+ parser.values.dependency_groups.append((path, groupname))
775
+
776
+
777
+ dependency_groups: Callable[..., Option] = partial(
778
+ Option,
779
+ "--group",
780
+ dest="dependency_groups",
781
+ default=[],
782
+ type=str,
783
+ action="callback",
784
+ callback=_handle_dependency_group,
785
+ metavar="[path:]group",
786
+ help='Install a named dependency-group from a "pyproject.toml" file. '
787
+ 'If a path is given, the name of the file must be "pyproject.toml". '
788
+ 'Defaults to using "pyproject.toml" in the current directory.',
789
+ )
790
+
791
+ ignore_requires_python: Callable[..., Option] = partial(
792
+ Option,
793
+ "--ignore-requires-python",
794
+ dest="ignore_requires_python",
795
+ action="store_true",
796
+ help="Ignore the Requires-Python information.",
797
+ )
798
+
799
+ no_build_isolation: Callable[..., Option] = partial(
800
+ Option,
801
+ "--no-build-isolation",
802
+ dest="build_isolation",
803
+ action="store_false",
804
+ default=True,
805
+ help="Disable isolation when building a modern source distribution. "
806
+ "Build dependencies specified by PEP 518 must be already installed "
807
+ "if this option is used.",
808
+ )
809
+
810
+ check_build_deps: Callable[..., Option] = partial(
811
+ Option,
812
+ "--check-build-dependencies",
813
+ dest="check_build_deps",
814
+ action="store_true",
815
+ default=False,
816
+ help="Check the build dependencies when PEP517 is used.",
817
+ )
818
+
819
+
820
+ def _handle_no_use_pep517(
821
+ option: Option, opt: str, value: str, parser: OptionParser
822
+ ) -> None:
823
+ """
824
+ Process a value provided for the --no-use-pep517 option.
825
+
826
+ This is an optparse.Option callback for the no_use_pep517 option.
827
+ """
828
+ # Since --no-use-pep517 doesn't accept arguments, the value argument
829
+ # will be None if --no-use-pep517 is passed via the command-line.
830
+ # However, the value can be non-None if the option is triggered e.g.
831
+ # by an environment variable, for example "PIP_NO_USE_PEP517=true".
832
+ if value is not None:
833
+ msg = """A value was passed for --no-use-pep517,
834
+ probably using either the PIP_NO_USE_PEP517 environment variable
835
+ or the "no-use-pep517" config file option. Use an appropriate value
836
+ of the PIP_USE_PEP517 environment variable or the "use-pep517"
837
+ config file option instead.
838
+ """
839
+ raise_option_error(parser, option=option, msg=msg)
840
+
841
+ # If user doesn't wish to use pep517, we check if setuptools is installed
842
+ # and raise error if it is not.
843
+ packages = ("setuptools",)
844
+ if not all(importlib.util.find_spec(package) for package in packages):
845
+ msg = (
846
+ f"It is not possible to use --no-use-pep517 "
847
+ f"without {' and '.join(packages)} installed."
848
+ )
849
+ raise_option_error(parser, option=option, msg=msg)
850
+
851
+ # Otherwise, --no-use-pep517 was passed via the command-line.
852
+ parser.values.use_pep517 = False
853
+
854
+
855
+ use_pep517: Any = partial(
856
+ Option,
857
+ "--use-pep517",
858
+ dest="use_pep517",
859
+ action="store_true",
860
+ default=None,
861
+ help="Use PEP 517 for building source distributions "
862
+ "(use --no-use-pep517 to force legacy behaviour).",
863
+ )
864
+
865
+ no_use_pep517: Any = partial(
866
+ Option,
867
+ "--no-use-pep517",
868
+ dest="use_pep517",
869
+ action="callback",
870
+ callback=_handle_no_use_pep517,
871
+ default=None,
872
+ help=SUPPRESS_HELP,
873
+ )
874
+
875
+
876
+ def _handle_config_settings(
877
+ option: Option, opt_str: str, value: str, parser: OptionParser
878
+ ) -> None:
879
+ key, sep, val = value.partition("=")
880
+ if sep != "=":
881
+ parser.error(f"Arguments to {opt_str} must be of the form KEY=VAL")
882
+ dest = getattr(parser.values, option.dest)
883
+ if dest is None:
884
+ dest = {}
885
+ setattr(parser.values, option.dest, dest)
886
+ if key in dest:
887
+ if isinstance(dest[key], list):
888
+ dest[key].append(val)
889
+ else:
890
+ dest[key] = [dest[key], val]
891
+ else:
892
+ dest[key] = val
893
+
894
+
895
+ config_settings: Callable[..., Option] = partial(
896
+ Option,
897
+ "-C",
898
+ "--config-settings",
899
+ dest="config_settings",
900
+ type=str,
901
+ action="callback",
902
+ callback=_handle_config_settings,
903
+ metavar="settings",
904
+ help="Configuration settings to be passed to the PEP 517 build backend. "
905
+ "Settings take the form KEY=VALUE. Use multiple --config-settings options "
906
+ "to pass multiple keys to the backend.",
907
+ )
908
+
909
+ build_options: Callable[..., Option] = partial(
910
+ Option,
911
+ "--build-option",
912
+ dest="build_options",
913
+ metavar="options",
914
+ action="append",
915
+ help="Extra arguments to be supplied to 'setup.py bdist_wheel'.",
916
+ )
917
+
918
+ global_options: Callable[..., Option] = partial(
919
+ Option,
920
+ "--global-option",
921
+ dest="global_options",
922
+ action="append",
923
+ metavar="options",
924
+ help="Extra global options to be supplied to the setup.py "
925
+ "call before the install or bdist_wheel command.",
926
+ )
927
+
928
+ no_clean: Callable[..., Option] = partial(
929
+ Option,
930
+ "--no-clean",
931
+ action="store_true",
932
+ default=False,
933
+ help="Don't clean up build directories.",
934
+ )
935
+
936
+ pre: Callable[..., Option] = partial(
937
+ Option,
938
+ "--pre",
939
+ action="store_true",
940
+ default=False,
941
+ help="Include pre-release and development versions. By default, "
942
+ "pip only finds stable versions.",
943
+ )
944
+
945
+ json: Callable[..., Option] = partial(
946
+ Option,
947
+ "--json",
948
+ action="store_true",
949
+ default=False,
950
+ help="Output data in a machine-readable JSON format.",
951
+ )
952
+
953
+ disable_pip_version_check: Callable[..., Option] = partial(
954
+ Option,
955
+ "--disable-pip-version-check",
956
+ dest="disable_pip_version_check",
957
+ action="store_true",
958
+ default=False,
959
+ help="Don't periodically check PyPI to determine whether a new version "
960
+ "of pip is available for download. Implied with --no-index.",
961
+ )
962
+
963
+ root_user_action: Callable[..., Option] = partial(
964
+ Option,
965
+ "--root-user-action",
966
+ dest="root_user_action",
967
+ default="warn",
968
+ choices=["warn", "ignore"],
969
+ help="Action if pip is run as a root user [warn, ignore] (default: warn)",
970
+ )
971
+
972
+
973
+ def _handle_merge_hash(
974
+ option: Option, opt_str: str, value: str, parser: OptionParser
975
+ ) -> None:
976
+ """Given a value spelled "algo:digest", append the digest to a list
977
+ pointed to in a dict by the algo name."""
978
+ if not parser.values.hashes:
979
+ parser.values.hashes = {}
980
+ try:
981
+ algo, digest = value.split(":", 1)
982
+ except ValueError:
983
+ parser.error(
984
+ f"Arguments to {opt_str} must be a hash name "
985
+ "followed by a value, like --hash=sha256:"
986
+ "abcde..."
987
+ )
988
+ if algo not in STRONG_HASHES:
989
+ parser.error(
990
+ "Allowed hash algorithms for {} are {}.".format(
991
+ opt_str, ", ".join(STRONG_HASHES)
992
+ )
993
+ )
994
+ parser.values.hashes.setdefault(algo, []).append(digest)
995
+
996
+
997
+ hash: Callable[..., Option] = partial(
998
+ Option,
999
+ "--hash",
1000
+ # Hash values eventually end up in InstallRequirement.hashes due to
1001
+ # __dict__ copying in process_line().
1002
+ dest="hashes",
1003
+ action="callback",
1004
+ callback=_handle_merge_hash,
1005
+ type="string",
1006
+ help="Verify that the package's archive matches this "
1007
+ "hash before installing. Example: --hash=sha256:abcdef...",
1008
+ )
1009
+
1010
+
1011
+ require_hashes: Callable[..., Option] = partial(
1012
+ Option,
1013
+ "--require-hashes",
1014
+ dest="require_hashes",
1015
+ action="store_true",
1016
+ default=False,
1017
+ help="Require a hash to check each requirement against, for "
1018
+ "repeatable installs. This option is implied when any package in a "
1019
+ "requirements file has a --hash option.",
1020
+ )
1021
+
1022
+
1023
+ list_path: Callable[..., Option] = partial(
1024
+ PipOption,
1025
+ "--path",
1026
+ dest="path",
1027
+ type="path",
1028
+ action="append",
1029
+ help="Restrict to the specified installation path for listing "
1030
+ "packages (can be used multiple times).",
1031
+ )
1032
+
1033
+
1034
+ def check_list_path_option(options: Values) -> None:
1035
+ if options.path and (options.user or options.local):
1036
+ raise CommandError("Cannot combine '--path' with '--user' or '--local'")
1037
+
1038
+
1039
+ list_exclude: Callable[..., Option] = partial(
1040
+ PipOption,
1041
+ "--exclude",
1042
+ dest="excludes",
1043
+ action="append",
1044
+ metavar="package",
1045
+ type="package_name",
1046
+ help="Exclude specified package from the output",
1047
+ )
1048
+
1049
+
1050
+ no_python_version_warning: Callable[..., Option] = partial(
1051
+ Option,
1052
+ "--no-python-version-warning",
1053
+ dest="no_python_version_warning",
1054
+ action="store_true",
1055
+ default=False,
1056
+ help=SUPPRESS_HELP, # No-op, a hold-over from the Python 2->3 transition.
1057
+ )
1058
+
1059
+
1060
+ # Features that are now always on. A warning is printed if they are used.
1061
+ ALWAYS_ENABLED_FEATURES = [
1062
+ "truststore", # always on since 24.2
1063
+ "no-binary-enable-wheel-cache", # always on since 23.1
1064
+ ]
1065
+
1066
+ use_new_feature: Callable[..., Option] = partial(
1067
+ Option,
1068
+ "--use-feature",
1069
+ dest="features_enabled",
1070
+ metavar="feature",
1071
+ action="append",
1072
+ default=[],
1073
+ choices=[
1074
+ "fast-deps",
1075
+ ]
1076
+ + ALWAYS_ENABLED_FEATURES,
1077
+ help="Enable new functionality, that may be backward incompatible.",
1078
+ )
1079
+
1080
+ use_deprecated_feature: Callable[..., Option] = partial(
1081
+ Option,
1082
+ "--use-deprecated",
1083
+ dest="deprecated_features_enabled",
1084
+ metavar="feature",
1085
+ action="append",
1086
+ default=[],
1087
+ choices=[
1088
+ "legacy-resolver",
1089
+ "legacy-certs",
1090
+ ],
1091
+ help=("Enable deprecated functionality, that will be removed in the future."),
1092
+ )
1093
+
1094
+ ##########
1095
+ # groups #
1096
+ ##########
1097
+
1098
+ general_group: dict[str, Any] = {
1099
+ "name": "General Options",
1100
+ "options": [
1101
+ help_,
1102
+ debug_mode,
1103
+ isolated_mode,
1104
+ require_virtualenv,
1105
+ python,
1106
+ verbose,
1107
+ version,
1108
+ quiet,
1109
+ log,
1110
+ no_input,
1111
+ keyring_provider,
1112
+ proxy,
1113
+ retries,
1114
+ timeout,
1115
+ exists_action,
1116
+ trusted_host,
1117
+ cert,
1118
+ client_cert,
1119
+ cache_dir,
1120
+ no_cache,
1121
+ disable_pip_version_check,
1122
+ no_color,
1123
+ no_python_version_warning,
1124
+ use_new_feature,
1125
+ use_deprecated_feature,
1126
+ resume_retries,
1127
+ ],
1128
+ }
1129
+
1130
+ index_group: dict[str, Any] = {
1131
+ "name": "Package Index Options",
1132
+ "options": [
1133
+ index_url,
1134
+ extra_index_url,
1135
+ no_index,
1136
+ find_links,
1137
+ ],
1138
+ }