cli-ih 0.6.2.1__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 +51 -21
  2. cli_ih/client.py +14 -7
  3. {cli_ih-0.6.2.1.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.2.1.dist-info → cli_ih-0.6.3.1.dist-info}/WHEEL +1 -1
  6. {cli_ih-0.6.2.1.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.2.1.dist-info/RECORD +0 -8
@@ -0,0 +1,435 @@
1
+ from __future__ import absolute_import
2
+
3
+ import re
4
+ from collections import namedtuple
5
+
6
+ from ..exceptions import LocationParseError
7
+ from ..packages import six
8
+
9
+ url_attrs = ["scheme", "auth", "host", "port", "path", "query", "fragment"]
10
+
11
+ # We only want to normalize urls with an HTTP(S) scheme.
12
+ # urllib3 infers URLs without a scheme (None) to be http.
13
+ NORMALIZABLE_SCHEMES = ("http", "https", None)
14
+
15
+ # Almost all of these patterns were derived from the
16
+ # 'rfc3986' module: https://github.com/python-hyper/rfc3986
17
+ PERCENT_RE = re.compile(r"%[a-fA-F0-9]{2}")
18
+ SCHEME_RE = re.compile(r"^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)")
19
+ URI_RE = re.compile(
20
+ r"^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?"
21
+ r"(?://([^\\/?#]*))?"
22
+ r"([^?#]*)"
23
+ r"(?:\?([^#]*))?"
24
+ r"(?:#(.*))?$",
25
+ re.UNICODE | re.DOTALL,
26
+ )
27
+
28
+ IPV4_PAT = r"(?:[0-9]{1,3}\.){3}[0-9]{1,3}"
29
+ HEX_PAT = "[0-9A-Fa-f]{1,4}"
30
+ LS32_PAT = "(?:{hex}:{hex}|{ipv4})".format(hex=HEX_PAT, ipv4=IPV4_PAT)
31
+ _subs = {"hex": HEX_PAT, "ls32": LS32_PAT}
32
+ _variations = [
33
+ # 6( h16 ":" ) ls32
34
+ "(?:%(hex)s:){6}%(ls32)s",
35
+ # "::" 5( h16 ":" ) ls32
36
+ "::(?:%(hex)s:){5}%(ls32)s",
37
+ # [ h16 ] "::" 4( h16 ":" ) ls32
38
+ "(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)s",
39
+ # [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
40
+ "(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)s",
41
+ # [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
42
+ "(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)s",
43
+ # [ *3( h16 ":" ) h16 ] "::" h16 ":" ls32
44
+ "(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)s",
45
+ # [ *4( h16 ":" ) h16 ] "::" ls32
46
+ "(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)s",
47
+ # [ *5( h16 ":" ) h16 ] "::" h16
48
+ "(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)s",
49
+ # [ *6( h16 ":" ) h16 ] "::"
50
+ "(?:(?:%(hex)s:){0,6}%(hex)s)?::",
51
+ ]
52
+
53
+ UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~"
54
+ IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
55
+ ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
56
+ IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]"
57
+ REG_NAME_PAT = r"(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*"
58
+ TARGET_RE = re.compile(r"^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$")
59
+
60
+ IPV4_RE = re.compile("^" + IPV4_PAT + "$")
61
+ IPV6_RE = re.compile("^" + IPV6_PAT + "$")
62
+ IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$")
63
+ BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$")
64
+ ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$")
65
+
66
+ _HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % (
67
+ REG_NAME_PAT,
68
+ IPV4_PAT,
69
+ IPV6_ADDRZ_PAT,
70
+ )
71
+ _HOST_PORT_RE = re.compile(_HOST_PORT_PAT, re.UNICODE | re.DOTALL)
72
+
73
+ UNRESERVED_CHARS = set(
74
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~"
75
+ )
76
+ SUB_DELIM_CHARS = set("!$&'()*+,;=")
77
+ USERINFO_CHARS = UNRESERVED_CHARS | SUB_DELIM_CHARS | {":"}
78
+ PATH_CHARS = USERINFO_CHARS | {"@", "/"}
79
+ QUERY_CHARS = FRAGMENT_CHARS = PATH_CHARS | {"?"}
80
+
81
+
82
+ class Url(namedtuple("Url", url_attrs)):
83
+ """
84
+ Data structure for representing an HTTP URL. Used as a return value for
85
+ :func:`parse_url`. Both the scheme and host are normalized as they are
86
+ both case-insensitive according to RFC 3986.
87
+ """
88
+
89
+ __slots__ = ()
90
+
91
+ def __new__(
92
+ cls,
93
+ scheme=None,
94
+ auth=None,
95
+ host=None,
96
+ port=None,
97
+ path=None,
98
+ query=None,
99
+ fragment=None,
100
+ ):
101
+ if path and not path.startswith("/"):
102
+ path = "/" + path
103
+ if scheme is not None:
104
+ scheme = scheme.lower()
105
+ return super(Url, cls).__new__(
106
+ cls, scheme, auth, host, port, path, query, fragment
107
+ )
108
+
109
+ @property
110
+ def hostname(self):
111
+ """For backwards-compatibility with urlparse. We're nice like that."""
112
+ return self.host
113
+
114
+ @property
115
+ def request_uri(self):
116
+ """Absolute path including the query string."""
117
+ uri = self.path or "/"
118
+
119
+ if self.query is not None:
120
+ uri += "?" + self.query
121
+
122
+ return uri
123
+
124
+ @property
125
+ def netloc(self):
126
+ """Network location including host and port"""
127
+ if self.port:
128
+ return "%s:%d" % (self.host, self.port)
129
+ return self.host
130
+
131
+ @property
132
+ def url(self):
133
+ """
134
+ Convert self into a url
135
+
136
+ This function should more or less round-trip with :func:`.parse_url`. The
137
+ returned url may not be exactly the same as the url inputted to
138
+ :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
139
+ with a blank port will have : removed).
140
+
141
+ Example: ::
142
+
143
+ >>> U = parse_url('http://google.com/mail/')
144
+ >>> U.url
145
+ 'http://google.com/mail/'
146
+ >>> Url('http', 'username:password', 'host.com', 80,
147
+ ... '/path', 'query', 'fragment').url
148
+ 'http://username:password@host.com:80/path?query#fragment'
149
+ """
150
+ scheme, auth, host, port, path, query, fragment = self
151
+ url = u""
152
+
153
+ # We use "is not None" we want things to happen with empty strings (or 0 port)
154
+ if scheme is not None:
155
+ url += scheme + u"://"
156
+ if auth is not None:
157
+ url += auth + u"@"
158
+ if host is not None:
159
+ url += host
160
+ if port is not None:
161
+ url += u":" + str(port)
162
+ if path is not None:
163
+ url += path
164
+ if query is not None:
165
+ url += u"?" + query
166
+ if fragment is not None:
167
+ url += u"#" + fragment
168
+
169
+ return url
170
+
171
+ def __str__(self):
172
+ return self.url
173
+
174
+
175
+ def split_first(s, delims):
176
+ """
177
+ .. deprecated:: 1.25
178
+
179
+ Given a string and an iterable of delimiters, split on the first found
180
+ delimiter. Return two split parts and the matched delimiter.
181
+
182
+ If not found, then the first part is the full input string.
183
+
184
+ Example::
185
+
186
+ >>> split_first('foo/bar?baz', '?/=')
187
+ ('foo', 'bar?baz', '/')
188
+ >>> split_first('foo/bar?baz', '123')
189
+ ('foo/bar?baz', '', None)
190
+
191
+ Scales linearly with number of delims. Not ideal for large number of delims.
192
+ """
193
+ min_idx = None
194
+ min_delim = None
195
+ for d in delims:
196
+ idx = s.find(d)
197
+ if idx < 0:
198
+ continue
199
+
200
+ if min_idx is None or idx < min_idx:
201
+ min_idx = idx
202
+ min_delim = d
203
+
204
+ if min_idx is None or min_idx < 0:
205
+ return s, "", None
206
+
207
+ return s[:min_idx], s[min_idx + 1 :], min_delim
208
+
209
+
210
+ def _encode_invalid_chars(component, allowed_chars, encoding="utf-8"):
211
+ """Percent-encodes a URI component without reapplying
212
+ onto an already percent-encoded component.
213
+ """
214
+ if component is None:
215
+ return component
216
+
217
+ component = six.ensure_text(component)
218
+
219
+ # Normalize existing percent-encoded bytes.
220
+ # Try to see if the component we're encoding is already percent-encoded
221
+ # so we can skip all '%' characters but still encode all others.
222
+ component, percent_encodings = PERCENT_RE.subn(
223
+ lambda match: match.group(0).upper(), component
224
+ )
225
+
226
+ uri_bytes = component.encode("utf-8", "surrogatepass")
227
+ is_percent_encoded = percent_encodings == uri_bytes.count(b"%")
228
+ encoded_component = bytearray()
229
+
230
+ for i in range(0, len(uri_bytes)):
231
+ # Will return a single character bytestring on both Python 2 & 3
232
+ byte = uri_bytes[i : i + 1]
233
+ byte_ord = ord(byte)
234
+ if (is_percent_encoded and byte == b"%") or (
235
+ byte_ord < 128 and byte.decode() in allowed_chars
236
+ ):
237
+ encoded_component += byte
238
+ continue
239
+ encoded_component.extend(b"%" + (hex(byte_ord)[2:].encode().zfill(2).upper()))
240
+
241
+ return encoded_component.decode(encoding)
242
+
243
+
244
+ def _remove_path_dot_segments(path):
245
+ # See http://tools.ietf.org/html/rfc3986#section-5.2.4 for pseudo-code
246
+ segments = path.split("/") # Turn the path into a list of segments
247
+ output = [] # Initialize the variable to use to store output
248
+
249
+ for segment in segments:
250
+ # '.' is the current directory, so ignore it, it is superfluous
251
+ if segment == ".":
252
+ continue
253
+ # Anything other than '..', should be appended to the output
254
+ elif segment != "..":
255
+ output.append(segment)
256
+ # In this case segment == '..', if we can, we should pop the last
257
+ # element
258
+ elif output:
259
+ output.pop()
260
+
261
+ # If the path starts with '/' and the output is empty or the first string
262
+ # is non-empty
263
+ if path.startswith("/") and (not output or output[0]):
264
+ output.insert(0, "")
265
+
266
+ # If the path starts with '/.' or '/..' ensure we add one more empty
267
+ # string to add a trailing '/'
268
+ if path.endswith(("/.", "/..")):
269
+ output.append("")
270
+
271
+ return "/".join(output)
272
+
273
+
274
+ def _normalize_host(host, scheme):
275
+ if host:
276
+ if isinstance(host, six.binary_type):
277
+ host = six.ensure_str(host)
278
+
279
+ if scheme in NORMALIZABLE_SCHEMES:
280
+ is_ipv6 = IPV6_ADDRZ_RE.match(host)
281
+ if is_ipv6:
282
+ # IPv6 hosts of the form 'a::b%zone' are encoded in a URL as
283
+ # such per RFC 6874: 'a::b%25zone'. Unquote the ZoneID
284
+ # separator as necessary to return a valid RFC 4007 scoped IP.
285
+ match = ZONE_ID_RE.search(host)
286
+ if match:
287
+ start, end = match.span(1)
288
+ zone_id = host[start:end]
289
+
290
+ if zone_id.startswith("%25") and zone_id != "%25":
291
+ zone_id = zone_id[3:]
292
+ else:
293
+ zone_id = zone_id[1:]
294
+ zone_id = "%" + _encode_invalid_chars(zone_id, UNRESERVED_CHARS)
295
+ return host[:start].lower() + zone_id + host[end:]
296
+ else:
297
+ return host.lower()
298
+ elif not IPV4_RE.match(host):
299
+ return six.ensure_str(
300
+ b".".join([_idna_encode(label) for label in host.split(".")])
301
+ )
302
+ return host
303
+
304
+
305
+ def _idna_encode(name):
306
+ if name and any(ord(x) >= 128 for x in name):
307
+ try:
308
+ from pip._vendor import idna
309
+ except ImportError:
310
+ six.raise_from(
311
+ LocationParseError("Unable to parse URL without the 'idna' module"),
312
+ None,
313
+ )
314
+ try:
315
+ return idna.encode(name.lower(), strict=True, std3_rules=True)
316
+ except idna.IDNAError:
317
+ six.raise_from(
318
+ LocationParseError(u"Name '%s' is not a valid IDNA label" % name), None
319
+ )
320
+ return name.lower().encode("ascii")
321
+
322
+
323
+ def _encode_target(target):
324
+ """Percent-encodes a request target so that there are no invalid characters"""
325
+ path, query = TARGET_RE.match(target).groups()
326
+ target = _encode_invalid_chars(path, PATH_CHARS)
327
+ query = _encode_invalid_chars(query, QUERY_CHARS)
328
+ if query is not None:
329
+ target += "?" + query
330
+ return target
331
+
332
+
333
+ def parse_url(url):
334
+ """
335
+ Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
336
+ performed to parse incomplete urls. Fields not provided will be None.
337
+ This parser is RFC 3986 and RFC 6874 compliant.
338
+
339
+ The parser logic and helper functions are based heavily on
340
+ work done in the ``rfc3986`` module.
341
+
342
+ :param str url: URL to parse into a :class:`.Url` namedtuple.
343
+
344
+ Partly backwards-compatible with :mod:`urlparse`.
345
+
346
+ Example::
347
+
348
+ >>> parse_url('http://google.com/mail/')
349
+ Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
350
+ >>> parse_url('google.com:80')
351
+ Url(scheme=None, host='google.com', port=80, path=None, ...)
352
+ >>> parse_url('/foo?bar')
353
+ Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
354
+ """
355
+ if not url:
356
+ # Empty
357
+ return Url()
358
+
359
+ source_url = url
360
+ if not SCHEME_RE.search(url):
361
+ url = "//" + url
362
+
363
+ try:
364
+ scheme, authority, path, query, fragment = URI_RE.match(url).groups()
365
+ normalize_uri = scheme is None or scheme.lower() in NORMALIZABLE_SCHEMES
366
+
367
+ if scheme:
368
+ scheme = scheme.lower()
369
+
370
+ if authority:
371
+ auth, _, host_port = authority.rpartition("@")
372
+ auth = auth or None
373
+ host, port = _HOST_PORT_RE.match(host_port).groups()
374
+ if auth and normalize_uri:
375
+ auth = _encode_invalid_chars(auth, USERINFO_CHARS)
376
+ if port == "":
377
+ port = None
378
+ else:
379
+ auth, host, port = None, None, None
380
+
381
+ if port is not None:
382
+ port = int(port)
383
+ if not (0 <= port <= 65535):
384
+ raise LocationParseError(url)
385
+
386
+ host = _normalize_host(host, scheme)
387
+
388
+ if normalize_uri and path:
389
+ path = _remove_path_dot_segments(path)
390
+ path = _encode_invalid_chars(path, PATH_CHARS)
391
+ if normalize_uri and query:
392
+ query = _encode_invalid_chars(query, QUERY_CHARS)
393
+ if normalize_uri and fragment:
394
+ fragment = _encode_invalid_chars(fragment, FRAGMENT_CHARS)
395
+
396
+ except (ValueError, AttributeError):
397
+ return six.raise_from(LocationParseError(source_url), None)
398
+
399
+ # For the sake of backwards compatibility we put empty
400
+ # string values for path if there are any defined values
401
+ # beyond the path in the URL.
402
+ # TODO: Remove this when we break backwards compatibility.
403
+ if not path:
404
+ if query is not None or fragment is not None:
405
+ path = ""
406
+ else:
407
+ path = None
408
+
409
+ # Ensure that each part of the URL is a `str` for
410
+ # backwards compatibility.
411
+ if isinstance(url, six.text_type):
412
+ ensure_func = six.ensure_text
413
+ else:
414
+ ensure_func = six.ensure_str
415
+
416
+ def ensure_type(x):
417
+ return x if x is None else ensure_func(x)
418
+
419
+ return Url(
420
+ scheme=ensure_type(scheme),
421
+ auth=ensure_type(auth),
422
+ host=ensure_type(host),
423
+ port=port,
424
+ path=ensure_type(path),
425
+ query=ensure_type(query),
426
+ fragment=ensure_type(fragment),
427
+ )
428
+
429
+
430
+ def get_host(url):
431
+ """
432
+ Deprecated. Use :func:`parse_url` instead.
433
+ """
434
+ p = parse_url(url)
435
+ return p.scheme or "http", p.hostname, p.port
@@ -0,0 +1,152 @@
1
+ import errno
2
+ import select
3
+ import sys
4
+ from functools import partial
5
+
6
+ try:
7
+ from time import monotonic
8
+ except ImportError:
9
+ from time import time as monotonic
10
+
11
+ __all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"]
12
+
13
+
14
+ class NoWayToWaitForSocketError(Exception):
15
+ pass
16
+
17
+
18
+ # How should we wait on sockets?
19
+ #
20
+ # There are two types of APIs you can use for waiting on sockets: the fancy
21
+ # modern stateful APIs like epoll/kqueue, and the older stateless APIs like
22
+ # select/poll. The stateful APIs are more efficient when you have a lots of
23
+ # sockets to keep track of, because you can set them up once and then use them
24
+ # lots of times. But we only ever want to wait on a single socket at a time
25
+ # and don't want to keep track of state, so the stateless APIs are actually
26
+ # more efficient. So we want to use select() or poll().
27
+ #
28
+ # Now, how do we choose between select() and poll()? On traditional Unixes,
29
+ # select() has a strange calling convention that makes it slow, or fail
30
+ # altogether, for high-numbered file descriptors. The point of poll() is to fix
31
+ # that, so on Unixes, we prefer poll().
32
+ #
33
+ # On Windows, there is no poll() (or at least Python doesn't provide a wrapper
34
+ # for it), but that's OK, because on Windows, select() doesn't have this
35
+ # strange calling convention; plain select() works fine.
36
+ #
37
+ # So: on Windows we use select(), and everywhere else we use poll(). We also
38
+ # fall back to select() in case poll() is somehow broken or missing.
39
+
40
+ if sys.version_info >= (3, 5):
41
+ # Modern Python, that retries syscalls by default
42
+ def _retry_on_intr(fn, timeout):
43
+ return fn(timeout)
44
+
45
+ else:
46
+ # Old and broken Pythons.
47
+ def _retry_on_intr(fn, timeout):
48
+ if timeout is None:
49
+ deadline = float("inf")
50
+ else:
51
+ deadline = monotonic() + timeout
52
+
53
+ while True:
54
+ try:
55
+ return fn(timeout)
56
+ # OSError for 3 <= pyver < 3.5, select.error for pyver <= 2.7
57
+ except (OSError, select.error) as e:
58
+ # 'e.args[0]' incantation works for both OSError and select.error
59
+ if e.args[0] != errno.EINTR:
60
+ raise
61
+ else:
62
+ timeout = deadline - monotonic()
63
+ if timeout < 0:
64
+ timeout = 0
65
+ if timeout == float("inf"):
66
+ timeout = None
67
+ continue
68
+
69
+
70
+ def select_wait_for_socket(sock, read=False, write=False, timeout=None):
71
+ if not read and not write:
72
+ raise RuntimeError("must specify at least one of read=True, write=True")
73
+ rcheck = []
74
+ wcheck = []
75
+ if read:
76
+ rcheck.append(sock)
77
+ if write:
78
+ wcheck.append(sock)
79
+ # When doing a non-blocking connect, most systems signal success by
80
+ # marking the socket writable. Windows, though, signals success by marked
81
+ # it as "exceptional". We paper over the difference by checking the write
82
+ # sockets for both conditions. (The stdlib selectors module does the same
83
+ # thing.)
84
+ fn = partial(select.select, rcheck, wcheck, wcheck)
85
+ rready, wready, xready = _retry_on_intr(fn, timeout)
86
+ return bool(rready or wready or xready)
87
+
88
+
89
+ def poll_wait_for_socket(sock, read=False, write=False, timeout=None):
90
+ if not read and not write:
91
+ raise RuntimeError("must specify at least one of read=True, write=True")
92
+ mask = 0
93
+ if read:
94
+ mask |= select.POLLIN
95
+ if write:
96
+ mask |= select.POLLOUT
97
+ poll_obj = select.poll()
98
+ poll_obj.register(sock, mask)
99
+
100
+ # For some reason, poll() takes timeout in milliseconds
101
+ def do_poll(t):
102
+ if t is not None:
103
+ t *= 1000
104
+ return poll_obj.poll(t)
105
+
106
+ return bool(_retry_on_intr(do_poll, timeout))
107
+
108
+
109
+ def null_wait_for_socket(*args, **kwargs):
110
+ raise NoWayToWaitForSocketError("no select-equivalent available")
111
+
112
+
113
+ def _have_working_poll():
114
+ # Apparently some systems have a select.poll that fails as soon as you try
115
+ # to use it, either due to strange configuration or broken monkeypatching
116
+ # from libraries like eventlet/greenlet.
117
+ try:
118
+ poll_obj = select.poll()
119
+ _retry_on_intr(poll_obj.poll, 0)
120
+ except (AttributeError, OSError):
121
+ return False
122
+ else:
123
+ return True
124
+
125
+
126
+ def wait_for_socket(*args, **kwargs):
127
+ # We delay choosing which implementation to use until the first time we're
128
+ # called. We could do it at import time, but then we might make the wrong
129
+ # decision if someone goes wild with monkeypatching select.poll after
130
+ # we're imported.
131
+ global wait_for_socket
132
+ if _have_working_poll():
133
+ wait_for_socket = poll_wait_for_socket
134
+ elif hasattr(select, "select"):
135
+ wait_for_socket = select_wait_for_socket
136
+ else: # Platform-specific: Appengine.
137
+ wait_for_socket = null_wait_for_socket
138
+ return wait_for_socket(*args, **kwargs)
139
+
140
+
141
+ def wait_for_read(sock, timeout=None):
142
+ """Waits for reading to be available on a given socket.
143
+ Returns True if the socket is readable, or False if the timeout expired.
144
+ """
145
+ return wait_for_socket(sock, read=True, timeout=timeout)
146
+
147
+
148
+ def wait_for_write(sock, timeout=None):
149
+ """Waits for writing to be available on a given socket.
150
+ Returns True if the socket is readable, or False if the timeout expired.
151
+ """
152
+ return wait_for_socket(sock, write=True, timeout=timeout)
@@ -0,0 +1,4 @@
1
+ pip is a command line program. While it is implemented in Python, and so is
2
+ available for import, you must not use pip's internal APIs in this way. Typing
3
+ information is provided as a convenience only and is not a guarantee. Expect
4
+ unannounced changes to the API and types in releases.
@@ -1,8 +0,0 @@
1
- cli_ih/__init__.py,sha256=0dtZNjrIlZMny9M0s6ygYTuo-9sM7BCSJHkBMDYkn8g,247
2
- cli_ih/asyncClient.py,sha256=jnoq7v7tgNrAi0u12GamNhMD8VyPa2NWrRy0ii53M_Y,7000
3
- cli_ih/client.py,sha256=Mka6UmhS9wSFVGNqqsNIZ6cYON8HWnYTudkZWiPdmgI,7768
4
- cli_ih/exceptions.py,sha256=0xqaMCVu-yEURIrB6wEhbf6kfdsRmODJBoDsQTOp29s,156
5
- cli_ih-0.6.2.1.dist-info/METADATA,sha256=dQS5zWTr_EhCBSLLKN10q2PHG_1FJ32i8RZs9SUyuiU,2791
6
- cli_ih-0.6.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- cli_ih-0.6.2.1.dist-info/top_level.txt,sha256=Ve1CRLNXhPyPSkpN0xLu26roh30LQCpNzkF61BZYfk0,7
8
- cli_ih-0.6.2.1.dist-info/RECORD,,