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.
- cli_ih/asyncClient.py +13 -7
- cli_ih/client.py +13 -6
- {cli_ih-0.6.3.dist-info → cli_ih-0.6.3.1.dist-info}/METADATA +1 -1
- cli_ih-0.6.3.1.dist-info/RECORD +425 -0
- {cli_ih-0.6.3.dist-info → cli_ih-0.6.3.1.dist-info}/WHEEL +1 -1
- {cli_ih-0.6.3.dist-info → cli_ih-0.6.3.1.dist-info}/top_level.txt +1 -0
- venv/Lib/site-packages/__editable___cli_ih_0_6_3_1_finder.py +85 -0
- venv/Lib/site-packages/pip/__init__.py +13 -0
- venv/Lib/site-packages/pip/__main__.py +24 -0
- venv/Lib/site-packages/pip/__pip-runner__.py +50 -0
- venv/Lib/site-packages/pip/_internal/__init__.py +18 -0
- venv/Lib/site-packages/pip/_internal/build_env.py +349 -0
- venv/Lib/site-packages/pip/_internal/cache.py +291 -0
- venv/Lib/site-packages/pip/_internal/cli/__init__.py +3 -0
- venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +184 -0
- venv/Lib/site-packages/pip/_internal/cli/base_command.py +244 -0
- venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +1138 -0
- venv/Lib/site-packages/pip/_internal/cli/command_context.py +28 -0
- venv/Lib/site-packages/pip/_internal/cli/index_command.py +175 -0
- venv/Lib/site-packages/pip/_internal/cli/main.py +80 -0
- venv/Lib/site-packages/pip/_internal/cli/main_parser.py +134 -0
- venv/Lib/site-packages/pip/_internal/cli/parser.py +298 -0
- venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +151 -0
- venv/Lib/site-packages/pip/_internal/cli/req_command.py +351 -0
- venv/Lib/site-packages/pip/_internal/cli/spinners.py +235 -0
- venv/Lib/site-packages/pip/_internal/cli/status_codes.py +6 -0
- venv/Lib/site-packages/pip/_internal/commands/__init__.py +139 -0
- venv/Lib/site-packages/pip/_internal/commands/cache.py +231 -0
- venv/Lib/site-packages/pip/_internal/commands/check.py +66 -0
- venv/Lib/site-packages/pip/_internal/commands/completion.py +135 -0
- venv/Lib/site-packages/pip/_internal/commands/configuration.py +288 -0
- venv/Lib/site-packages/pip/_internal/commands/debug.py +203 -0
- venv/Lib/site-packages/pip/_internal/commands/download.py +145 -0
- venv/Lib/site-packages/pip/_internal/commands/freeze.py +107 -0
- venv/Lib/site-packages/pip/_internal/commands/hash.py +58 -0
- venv/Lib/site-packages/pip/_internal/commands/help.py +40 -0
- venv/Lib/site-packages/pip/_internal/commands/index.py +159 -0
- venv/Lib/site-packages/pip/_internal/commands/inspect.py +92 -0
- venv/Lib/site-packages/pip/_internal/commands/install.py +798 -0
- venv/Lib/site-packages/pip/_internal/commands/list.py +400 -0
- venv/Lib/site-packages/pip/_internal/commands/lock.py +170 -0
- venv/Lib/site-packages/pip/_internal/commands/search.py +178 -0
- venv/Lib/site-packages/pip/_internal/commands/show.py +231 -0
- venv/Lib/site-packages/pip/_internal/commands/uninstall.py +113 -0
- venv/Lib/site-packages/pip/_internal/commands/wheel.py +181 -0
- venv/Lib/site-packages/pip/_internal/configuration.py +397 -0
- venv/Lib/site-packages/pip/_internal/distributions/__init__.py +21 -0
- venv/Lib/site-packages/pip/_internal/distributions/base.py +55 -0
- venv/Lib/site-packages/pip/_internal/distributions/installed.py +33 -0
- venv/Lib/site-packages/pip/_internal/distributions/sdist.py +165 -0
- venv/Lib/site-packages/pip/_internal/distributions/wheel.py +44 -0
- venv/Lib/site-packages/pip/_internal/exceptions.py +881 -0
- venv/Lib/site-packages/pip/_internal/index/__init__.py +1 -0
- venv/Lib/site-packages/pip/_internal/index/collector.py +489 -0
- venv/Lib/site-packages/pip/_internal/index/package_finder.py +1059 -0
- venv/Lib/site-packages/pip/_internal/index/sources.py +287 -0
- venv/Lib/site-packages/pip/_internal/locations/__init__.py +441 -0
- venv/Lib/site-packages/pip/_internal/locations/_distutils.py +173 -0
- venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +215 -0
- venv/Lib/site-packages/pip/_internal/locations/base.py +82 -0
- venv/Lib/site-packages/pip/_internal/main.py +12 -0
- venv/Lib/site-packages/pip/_internal/metadata/__init__.py +164 -0
- venv/Lib/site-packages/pip/_internal/metadata/_json.py +87 -0
- venv/Lib/site-packages/pip/_internal/metadata/base.py +685 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +6 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +87 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +223 -0
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +143 -0
- venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +298 -0
- venv/Lib/site-packages/pip/_internal/models/__init__.py +1 -0
- venv/Lib/site-packages/pip/_internal/models/candidate.py +25 -0
- venv/Lib/site-packages/pip/_internal/models/direct_url.py +227 -0
- venv/Lib/site-packages/pip/_internal/models/format_control.py +78 -0
- venv/Lib/site-packages/pip/_internal/models/index.py +28 -0
- venv/Lib/site-packages/pip/_internal/models/installation_report.py +57 -0
- venv/Lib/site-packages/pip/_internal/models/link.py +613 -0
- venv/Lib/site-packages/pip/_internal/models/pylock.py +188 -0
- venv/Lib/site-packages/pip/_internal/models/scheme.py +25 -0
- venv/Lib/site-packages/pip/_internal/models/search_scope.py +126 -0
- venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +53 -0
- venv/Lib/site-packages/pip/_internal/models/target_python.py +122 -0
- venv/Lib/site-packages/pip/_internal/models/wheel.py +141 -0
- venv/Lib/site-packages/pip/_internal/network/__init__.py +1 -0
- venv/Lib/site-packages/pip/_internal/network/auth.py +564 -0
- venv/Lib/site-packages/pip/_internal/network/cache.py +133 -0
- venv/Lib/site-packages/pip/_internal/network/download.py +342 -0
- venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +213 -0
- venv/Lib/site-packages/pip/_internal/network/session.py +528 -0
- venv/Lib/site-packages/pip/_internal/network/utils.py +98 -0
- venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +61 -0
- venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/operations/build/build_tracker.py +140 -0
- venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +38 -0
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +41 -0
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +73 -0
- venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +38 -0
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +47 -0
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +119 -0
- venv/Lib/site-packages/pip/_internal/operations/check.py +175 -0
- venv/Lib/site-packages/pip/_internal/operations/freeze.py +259 -0
- venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +1 -0
- venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +48 -0
- venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +746 -0
- venv/Lib/site-packages/pip/_internal/operations/prepare.py +742 -0
- venv/Lib/site-packages/pip/_internal/pyproject.py +182 -0
- venv/Lib/site-packages/pip/_internal/req/__init__.py +105 -0
- venv/Lib/site-packages/pip/_internal/req/constructors.py +562 -0
- venv/Lib/site-packages/pip/_internal/req/req_dependency_group.py +75 -0
- venv/Lib/site-packages/pip/_internal/req/req_file.py +620 -0
- venv/Lib/site-packages/pip/_internal/req/req_install.py +937 -0
- venv/Lib/site-packages/pip/_internal/req/req_set.py +81 -0
- venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +639 -0
- venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/base.py +20 -0
- venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +598 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +142 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +582 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +814 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +166 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +276 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +85 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +247 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +336 -0
- venv/Lib/site-packages/pip/_internal/self_outdated_check.py +254 -0
- venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +109 -0
- venv/Lib/site-packages/pip/_internal/utils/_log.py +38 -0
- venv/Lib/site-packages/pip/_internal/utils/appdirs.py +52 -0
- venv/Lib/site-packages/pip/_internal/utils/compat.py +85 -0
- venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +201 -0
- venv/Lib/site-packages/pip/_internal/utils/datetime.py +10 -0
- venv/Lib/site-packages/pip/_internal/utils/deprecation.py +126 -0
- venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +87 -0
- venv/Lib/site-packages/pip/_internal/utils/egg_link.py +81 -0
- venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +88 -0
- venv/Lib/site-packages/pip/_internal/utils/filesystem.py +152 -0
- venv/Lib/site-packages/pip/_internal/utils/filetypes.py +24 -0
- venv/Lib/site-packages/pip/_internal/utils/glibc.py +102 -0
- venv/Lib/site-packages/pip/_internal/utils/hashes.py +150 -0
- venv/Lib/site-packages/pip/_internal/utils/logging.py +364 -0
- venv/Lib/site-packages/pip/_internal/utils/misc.py +765 -0
- venv/Lib/site-packages/pip/_internal/utils/packaging.py +44 -0
- venv/Lib/site-packages/pip/_internal/utils/retry.py +45 -0
- venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +149 -0
- venv/Lib/site-packages/pip/_internal/utils/subprocess.py +248 -0
- venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +294 -0
- venv/Lib/site-packages/pip/_internal/utils/unpacking.py +337 -0
- venv/Lib/site-packages/pip/_internal/utils/urls.py +55 -0
- venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +105 -0
- venv/Lib/site-packages/pip/_internal/utils/wheel.py +132 -0
- venv/Lib/site-packages/pip/_internal/vcs/__init__.py +15 -0
- venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +130 -0
- venv/Lib/site-packages/pip/_internal/vcs/git.py +571 -0
- venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +186 -0
- venv/Lib/site-packages/pip/_internal/vcs/subversion.py +335 -0
- venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +693 -0
- venv/Lib/site-packages/pip/_internal/wheel_builder.py +334 -0
- venv/Lib/site-packages/pip/_vendor/__init__.py +117 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +29 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +70 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +168 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +75 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +8 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +145 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +48 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +511 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +119 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +157 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +146 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +43 -0
- venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +4 -0
- venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +12 -0
- venv/Lib/site-packages/pip/_vendor/certifi/core.py +83 -0
- venv/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py +13 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py +65 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py +209 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +59 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +62 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +9 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +33 -0
- venv/Lib/site-packages/pip/_vendor/distlib/compat.py +1137 -0
- venv/Lib/site-packages/pip/_vendor/distlib/resources.py +358 -0
- venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +447 -0
- venv/Lib/site-packages/pip/_vendor/distlib/util.py +1984 -0
- venv/Lib/site-packages/pip/_vendor/distro/__init__.py +54 -0
- venv/Lib/site-packages/pip/_vendor/distro/__main__.py +4 -0
- venv/Lib/site-packages/pip/_vendor/distro/distro.py +1403 -0
- venv/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/idna/__init__.py +45 -0
- venv/Lib/site-packages/pip/_vendor/idna/codec.py +122 -0
- venv/Lib/site-packages/pip/_vendor/idna/compat.py +15 -0
- venv/Lib/site-packages/pip/_vendor/idna/core.py +437 -0
- venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +4243 -0
- venv/Lib/site-packages/pip/_vendor/idna/intranges.py +57 -0
- venv/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -0
- venv/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +8681 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +55 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +170 -0
- venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +929 -0
- venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +15 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_elffile.py +109 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +262 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +85 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_parser.py +353 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +61 -0
- venv/Lib/site-packages/pip/_vendor/packaging/_tokenizer.py +195 -0
- venv/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py +145 -0
- venv/Lib/site-packages/pip/_vendor/packaging/licenses/_spdx.py +759 -0
- venv/Lib/site-packages/pip/_vendor/packaging/markers.py +362 -0
- venv/Lib/site-packages/pip/_vendor/packaging/metadata.py +862 -0
- venv/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +91 -0
- venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +1019 -0
- venv/Lib/site-packages/pip/_vendor/packaging/tags.py +656 -0
- venv/Lib/site-packages/pip/_vendor/packaging/utils.py +163 -0
- venv/Lib/site-packages/pip/_vendor/packaging/version.py +582 -0
- venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +3676 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +631 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +55 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +249 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +299 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +144 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +272 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +21 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +272 -0
- venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +82 -0
- venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +17 -0
- venv/Lib/site-packages/pip/_vendor/pygments/console.py +70 -0
- venv/Lib/site-packages/pip/_vendor/pygments/filter.py +70 -0
- venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +940 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +129 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +157 -0
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +23 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +963 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +362 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +602 -0
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +1201 -0
- venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +43 -0
- venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +72 -0
- venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +91 -0
- venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +104 -0
- venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +247 -0
- venv/Lib/site-packages/pip/_vendor/pygments/style.py +203 -0
- venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +61 -0
- venv/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py +54 -0
- venv/Lib/site-packages/pip/_vendor/pygments/token.py +214 -0
- venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +153 -0
- venv/Lib/site-packages/pip/_vendor/pygments/util.py +324 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +31 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +410 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +21 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +389 -0
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/requests/__init__.py +179 -0
- venv/Lib/site-packages/pip/_vendor/requests/__version__.py +14 -0
- venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +50 -0
- venv/Lib/site-packages/pip/_vendor/requests/adapters.py +719 -0
- venv/Lib/site-packages/pip/_vendor/requests/api.py +157 -0
- venv/Lib/site-packages/pip/_vendor/requests/auth.py +314 -0
- venv/Lib/site-packages/pip/_vendor/requests/certs.py +17 -0
- venv/Lib/site-packages/pip/_vendor/requests/compat.py +90 -0
- venv/Lib/site-packages/pip/_vendor/requests/cookies.py +561 -0
- venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +151 -0
- venv/Lib/site-packages/pip/_vendor/requests/help.py +127 -0
- venv/Lib/site-packages/pip/_vendor/requests/hooks.py +33 -0
- venv/Lib/site-packages/pip/_vendor/requests/models.py +1039 -0
- venv/Lib/site-packages/pip/_vendor/requests/packages.py +25 -0
- venv/Lib/site-packages/pip/_vendor/requests/sessions.py +831 -0
- venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +128 -0
- venv/Lib/site-packages/pip/_vendor/requests/structures.py +99 -0
- venv/Lib/site-packages/pip/_vendor/requests/utils.py +1086 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +27 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +196 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +55 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +27 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +47 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +48 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +57 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +622 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +209 -0
- venv/Lib/site-packages/pip/_vendor/rich/__init__.py +177 -0
- venv/Lib/site-packages/pip/_vendor/rich/__main__.py +245 -0
- venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +454 -0
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +3610 -0
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +32 -0
- venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +76 -0
- venv/Lib/site-packages/pip/_vendor/rich/_extension.py +10 -0
- venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +24 -0
- venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +268 -0
- venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +94 -0
- venv/Lib/site-packages/pip/_vendor/rich/_loop.py +43 -0
- venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +69 -0
- venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +309 -0
- venv/Lib/site-packages/pip/_vendor/rich/_pick.py +17 -0
- venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +153 -0
- venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +482 -0
- venv/Lib/site-packages/pip/_vendor/rich/_stack.py +16 -0
- venv/Lib/site-packages/pip/_vendor/rich/_timer.py +19 -0
- venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +661 -0
- venv/Lib/site-packages/pip/_vendor/rich/_windows.py +71 -0
- venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +56 -0
- venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +93 -0
- venv/Lib/site-packages/pip/_vendor/rich/abc.py +33 -0
- venv/Lib/site-packages/pip/_vendor/rich/align.py +306 -0
- venv/Lib/site-packages/pip/_vendor/rich/ansi.py +241 -0
- venv/Lib/site-packages/pip/_vendor/rich/bar.py +93 -0
- venv/Lib/site-packages/pip/_vendor/rich/box.py +474 -0
- venv/Lib/site-packages/pip/_vendor/rich/cells.py +174 -0
- venv/Lib/site-packages/pip/_vendor/rich/color.py +621 -0
- venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +38 -0
- venv/Lib/site-packages/pip/_vendor/rich/columns.py +187 -0
- venv/Lib/site-packages/pip/_vendor/rich/console.py +2680 -0
- venv/Lib/site-packages/pip/_vendor/rich/constrain.py +37 -0
- venv/Lib/site-packages/pip/_vendor/rich/containers.py +167 -0
- venv/Lib/site-packages/pip/_vendor/rich/control.py +219 -0
- venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +193 -0
- venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +39 -0
- venv/Lib/site-packages/pip/_vendor/rich/emoji.py +91 -0
- venv/Lib/site-packages/pip/_vendor/rich/errors.py +34 -0
- venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +57 -0
- venv/Lib/site-packages/pip/_vendor/rich/filesize.py +88 -0
- venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +232 -0
- venv/Lib/site-packages/pip/_vendor/rich/json.py +139 -0
- venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +101 -0
- venv/Lib/site-packages/pip/_vendor/rich/layout.py +442 -0
- venv/Lib/site-packages/pip/_vendor/rich/live.py +400 -0
- venv/Lib/site-packages/pip/_vendor/rich/live_render.py +106 -0
- venv/Lib/site-packages/pip/_vendor/rich/logging.py +297 -0
- venv/Lib/site-packages/pip/_vendor/rich/markup.py +251 -0
- venv/Lib/site-packages/pip/_vendor/rich/measure.py +151 -0
- venv/Lib/site-packages/pip/_vendor/rich/padding.py +141 -0
- venv/Lib/site-packages/pip/_vendor/rich/pager.py +34 -0
- venv/Lib/site-packages/pip/_vendor/rich/palette.py +100 -0
- venv/Lib/site-packages/pip/_vendor/rich/panel.py +317 -0
- venv/Lib/site-packages/pip/_vendor/rich/pretty.py +1016 -0
- venv/Lib/site-packages/pip/_vendor/rich/progress.py +1715 -0
- venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +223 -0
- venv/Lib/site-packages/pip/_vendor/rich/prompt.py +400 -0
- venv/Lib/site-packages/pip/_vendor/rich/protocol.py +42 -0
- venv/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/rich/region.py +10 -0
- venv/Lib/site-packages/pip/_vendor/rich/repr.py +149 -0
- venv/Lib/site-packages/pip/_vendor/rich/rule.py +130 -0
- venv/Lib/site-packages/pip/_vendor/rich/scope.py +86 -0
- venv/Lib/site-packages/pip/_vendor/rich/screen.py +54 -0
- venv/Lib/site-packages/pip/_vendor/rich/segment.py +752 -0
- venv/Lib/site-packages/pip/_vendor/rich/spinner.py +132 -0
- venv/Lib/site-packages/pip/_vendor/rich/status.py +131 -0
- venv/Lib/site-packages/pip/_vendor/rich/style.py +796 -0
- venv/Lib/site-packages/pip/_vendor/rich/styled.py +42 -0
- venv/Lib/site-packages/pip/_vendor/rich/syntax.py +985 -0
- venv/Lib/site-packages/pip/_vendor/rich/table.py +1006 -0
- venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +153 -0
- venv/Lib/site-packages/pip/_vendor/rich/text.py +1361 -0
- venv/Lib/site-packages/pip/_vendor/rich/theme.py +115 -0
- venv/Lib/site-packages/pip/_vendor/rich/themes.py +5 -0
- venv/Lib/site-packages/pip/_vendor/rich/traceback.py +899 -0
- venv/Lib/site-packages/pip/_vendor/rich/tree.py +257 -0
- venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +8 -0
- venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +770 -0
- venv/Lib/site-packages/pip/_vendor/tomli/_re.py +112 -0
- venv/Lib/site-packages/pip/_vendor/tomli/_types.py +10 -0
- venv/Lib/site-packages/pip/_vendor/tomli/py.typed +1 -0
- venv/Lib/site-packages/pip/_vendor/tomli_w/__init__.py +4 -0
- venv/Lib/site-packages/pip/_vendor/tomli_w/_writer.py +229 -0
- venv/Lib/site-packages/pip/_vendor/tomli_w/py.typed +1 -0
- venv/Lib/site-packages/pip/_vendor/truststore/__init__.py +36 -0
- venv/Lib/site-packages/pip/_vendor/truststore/_api.py +333 -0
- venv/Lib/site-packages/pip/_vendor/truststore/_macos.py +571 -0
- venv/Lib/site-packages/pip/_vendor/truststore/_openssl.py +66 -0
- venv/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py +31 -0
- venv/Lib/site-packages/pip/_vendor/truststore/_windows.py +567 -0
- venv/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +102 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +355 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +2 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +572 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +1140 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +397 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +130 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +518 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +920 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +323 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +274 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +155 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +1076 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +540 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/request.py +191 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/response.py +879 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +149 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +57 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +137 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +622 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +504 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +271 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +435 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +152 -0
- venv/Lib/site-packages/pip/py.typed +4 -0
- cli_ih-0.6.3.dist-info/RECORD +0 -8
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"""
|
|
2
|
+
requests.api
|
|
3
|
+
~~~~~~~~~~~~
|
|
4
|
+
|
|
5
|
+
This module implements the Requests API.
|
|
6
|
+
|
|
7
|
+
:copyright: (c) 2012 by Kenneth Reitz.
|
|
8
|
+
:license: Apache2, see LICENSE for more details.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from . import sessions
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def request(method, url, **kwargs):
|
|
15
|
+
"""Constructs and sends a :class:`Request <Request>`.
|
|
16
|
+
|
|
17
|
+
:param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
|
|
18
|
+
:param url: URL for the new :class:`Request` object.
|
|
19
|
+
:param params: (optional) Dictionary, list of tuples or bytes to send
|
|
20
|
+
in the query string for the :class:`Request`.
|
|
21
|
+
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
|
|
22
|
+
object to send in the body of the :class:`Request`.
|
|
23
|
+
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
|
|
24
|
+
:param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`.
|
|
25
|
+
:param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`.
|
|
26
|
+
:param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload.
|
|
27
|
+
``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')``
|
|
28
|
+
or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string
|
|
29
|
+
defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers
|
|
30
|
+
to add for the file.
|
|
31
|
+
:param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth.
|
|
32
|
+
:param timeout: (optional) How many seconds to wait for the server to send data
|
|
33
|
+
before giving up, as a float, or a :ref:`(connect timeout, read
|
|
34
|
+
timeout) <timeouts>` tuple.
|
|
35
|
+
:type timeout: float or tuple
|
|
36
|
+
:param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``.
|
|
37
|
+
:type allow_redirects: bool
|
|
38
|
+
:param proxies: (optional) Dictionary mapping protocol to the URL of the proxy.
|
|
39
|
+
:param verify: (optional) Either a boolean, in which case it controls whether we verify
|
|
40
|
+
the server's TLS certificate, or a string, in which case it must be a path
|
|
41
|
+
to a CA bundle to use. Defaults to ``True``.
|
|
42
|
+
:param stream: (optional) if ``False``, the response content will be immediately downloaded.
|
|
43
|
+
:param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair.
|
|
44
|
+
:return: :class:`Response <Response>` object
|
|
45
|
+
:rtype: requests.Response
|
|
46
|
+
|
|
47
|
+
Usage::
|
|
48
|
+
|
|
49
|
+
>>> import requests
|
|
50
|
+
>>> req = requests.request('GET', 'https://httpbin.org/get')
|
|
51
|
+
>>> req
|
|
52
|
+
<Response [200]>
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
# By using the 'with' statement we are sure the session is closed, thus we
|
|
56
|
+
# avoid leaving sockets open which can trigger a ResourceWarning in some
|
|
57
|
+
# cases, and look like a memory leak in others.
|
|
58
|
+
with sessions.Session() as session:
|
|
59
|
+
return session.request(method=method, url=url, **kwargs)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def get(url, params=None, **kwargs):
|
|
63
|
+
r"""Sends a GET request.
|
|
64
|
+
|
|
65
|
+
:param url: URL for the new :class:`Request` object.
|
|
66
|
+
:param params: (optional) Dictionary, list of tuples or bytes to send
|
|
67
|
+
in the query string for the :class:`Request`.
|
|
68
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
|
69
|
+
:return: :class:`Response <Response>` object
|
|
70
|
+
:rtype: requests.Response
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
return request("get", url, params=params, **kwargs)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def options(url, **kwargs):
|
|
77
|
+
r"""Sends an OPTIONS request.
|
|
78
|
+
|
|
79
|
+
:param url: URL for the new :class:`Request` object.
|
|
80
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
|
81
|
+
:return: :class:`Response <Response>` object
|
|
82
|
+
:rtype: requests.Response
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
return request("options", url, **kwargs)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def head(url, **kwargs):
|
|
89
|
+
r"""Sends a HEAD request.
|
|
90
|
+
|
|
91
|
+
:param url: URL for the new :class:`Request` object.
|
|
92
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes. If
|
|
93
|
+
`allow_redirects` is not provided, it will be set to `False` (as
|
|
94
|
+
opposed to the default :meth:`request` behavior).
|
|
95
|
+
:return: :class:`Response <Response>` object
|
|
96
|
+
:rtype: requests.Response
|
|
97
|
+
"""
|
|
98
|
+
|
|
99
|
+
kwargs.setdefault("allow_redirects", False)
|
|
100
|
+
return request("head", url, **kwargs)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def post(url, data=None, json=None, **kwargs):
|
|
104
|
+
r"""Sends a POST request.
|
|
105
|
+
|
|
106
|
+
:param url: URL for the new :class:`Request` object.
|
|
107
|
+
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
|
|
108
|
+
object to send in the body of the :class:`Request`.
|
|
109
|
+
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
|
|
110
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
|
111
|
+
:return: :class:`Response <Response>` object
|
|
112
|
+
:rtype: requests.Response
|
|
113
|
+
"""
|
|
114
|
+
|
|
115
|
+
return request("post", url, data=data, json=json, **kwargs)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def put(url, data=None, **kwargs):
|
|
119
|
+
r"""Sends a PUT request.
|
|
120
|
+
|
|
121
|
+
:param url: URL for the new :class:`Request` object.
|
|
122
|
+
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
|
|
123
|
+
object to send in the body of the :class:`Request`.
|
|
124
|
+
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
|
|
125
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
|
126
|
+
:return: :class:`Response <Response>` object
|
|
127
|
+
:rtype: requests.Response
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
return request("put", url, data=data, **kwargs)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def patch(url, data=None, **kwargs):
|
|
134
|
+
r"""Sends a PATCH request.
|
|
135
|
+
|
|
136
|
+
:param url: URL for the new :class:`Request` object.
|
|
137
|
+
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
|
|
138
|
+
object to send in the body of the :class:`Request`.
|
|
139
|
+
:param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`.
|
|
140
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
|
141
|
+
:return: :class:`Response <Response>` object
|
|
142
|
+
:rtype: requests.Response
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
return request("patch", url, data=data, **kwargs)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def delete(url, **kwargs):
|
|
149
|
+
r"""Sends a DELETE request.
|
|
150
|
+
|
|
151
|
+
:param url: URL for the new :class:`Request` object.
|
|
152
|
+
:param \*\*kwargs: Optional arguments that ``request`` takes.
|
|
153
|
+
:return: :class:`Response <Response>` object
|
|
154
|
+
:rtype: requests.Response
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
return request("delete", url, **kwargs)
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
"""
|
|
2
|
+
requests.auth
|
|
3
|
+
~~~~~~~~~~~~~
|
|
4
|
+
|
|
5
|
+
This module contains the authentication handlers for Requests.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import hashlib
|
|
9
|
+
import os
|
|
10
|
+
import re
|
|
11
|
+
import threading
|
|
12
|
+
import time
|
|
13
|
+
import warnings
|
|
14
|
+
from base64 import b64encode
|
|
15
|
+
|
|
16
|
+
from ._internal_utils import to_native_string
|
|
17
|
+
from .compat import basestring, str, urlparse
|
|
18
|
+
from .cookies import extract_cookies_to_jar
|
|
19
|
+
from .utils import parse_dict_header
|
|
20
|
+
|
|
21
|
+
CONTENT_TYPE_FORM_URLENCODED = "application/x-www-form-urlencoded"
|
|
22
|
+
CONTENT_TYPE_MULTI_PART = "multipart/form-data"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _basic_auth_str(username, password):
|
|
26
|
+
"""Returns a Basic Auth string."""
|
|
27
|
+
|
|
28
|
+
# "I want us to put a big-ol' comment on top of it that
|
|
29
|
+
# says that this behaviour is dumb but we need to preserve
|
|
30
|
+
# it because people are relying on it."
|
|
31
|
+
# - Lukasa
|
|
32
|
+
#
|
|
33
|
+
# These are here solely to maintain backwards compatibility
|
|
34
|
+
# for things like ints. This will be removed in 3.0.0.
|
|
35
|
+
if not isinstance(username, basestring):
|
|
36
|
+
warnings.warn(
|
|
37
|
+
"Non-string usernames will no longer be supported in Requests "
|
|
38
|
+
"3.0.0. Please convert the object you've passed in ({!r}) to "
|
|
39
|
+
"a string or bytes object in the near future to avoid "
|
|
40
|
+
"problems.".format(username),
|
|
41
|
+
category=DeprecationWarning,
|
|
42
|
+
)
|
|
43
|
+
username = str(username)
|
|
44
|
+
|
|
45
|
+
if not isinstance(password, basestring):
|
|
46
|
+
warnings.warn(
|
|
47
|
+
"Non-string passwords will no longer be supported in Requests "
|
|
48
|
+
"3.0.0. Please convert the object you've passed in ({!r}) to "
|
|
49
|
+
"a string or bytes object in the near future to avoid "
|
|
50
|
+
"problems.".format(type(password)),
|
|
51
|
+
category=DeprecationWarning,
|
|
52
|
+
)
|
|
53
|
+
password = str(password)
|
|
54
|
+
# -- End Removal --
|
|
55
|
+
|
|
56
|
+
if isinstance(username, str):
|
|
57
|
+
username = username.encode("latin1")
|
|
58
|
+
|
|
59
|
+
if isinstance(password, str):
|
|
60
|
+
password = password.encode("latin1")
|
|
61
|
+
|
|
62
|
+
authstr = "Basic " + to_native_string(
|
|
63
|
+
b64encode(b":".join((username, password))).strip()
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
return authstr
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class AuthBase:
|
|
70
|
+
"""Base class that all auth implementations derive from"""
|
|
71
|
+
|
|
72
|
+
def __call__(self, r):
|
|
73
|
+
raise NotImplementedError("Auth hooks must be callable.")
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class HTTPBasicAuth(AuthBase):
|
|
77
|
+
"""Attaches HTTP Basic Authentication to the given Request object."""
|
|
78
|
+
|
|
79
|
+
def __init__(self, username, password):
|
|
80
|
+
self.username = username
|
|
81
|
+
self.password = password
|
|
82
|
+
|
|
83
|
+
def __eq__(self, other):
|
|
84
|
+
return all(
|
|
85
|
+
[
|
|
86
|
+
self.username == getattr(other, "username", None),
|
|
87
|
+
self.password == getattr(other, "password", None),
|
|
88
|
+
]
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
def __ne__(self, other):
|
|
92
|
+
return not self == other
|
|
93
|
+
|
|
94
|
+
def __call__(self, r):
|
|
95
|
+
r.headers["Authorization"] = _basic_auth_str(self.username, self.password)
|
|
96
|
+
return r
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class HTTPProxyAuth(HTTPBasicAuth):
|
|
100
|
+
"""Attaches HTTP Proxy Authentication to a given Request object."""
|
|
101
|
+
|
|
102
|
+
def __call__(self, r):
|
|
103
|
+
r.headers["Proxy-Authorization"] = _basic_auth_str(self.username, self.password)
|
|
104
|
+
return r
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class HTTPDigestAuth(AuthBase):
|
|
108
|
+
"""Attaches HTTP Digest Authentication to the given Request object."""
|
|
109
|
+
|
|
110
|
+
def __init__(self, username, password):
|
|
111
|
+
self.username = username
|
|
112
|
+
self.password = password
|
|
113
|
+
# Keep state in per-thread local storage
|
|
114
|
+
self._thread_local = threading.local()
|
|
115
|
+
|
|
116
|
+
def init_per_thread_state(self):
|
|
117
|
+
# Ensure state is initialized just once per-thread
|
|
118
|
+
if not hasattr(self._thread_local, "init"):
|
|
119
|
+
self._thread_local.init = True
|
|
120
|
+
self._thread_local.last_nonce = ""
|
|
121
|
+
self._thread_local.nonce_count = 0
|
|
122
|
+
self._thread_local.chal = {}
|
|
123
|
+
self._thread_local.pos = None
|
|
124
|
+
self._thread_local.num_401_calls = None
|
|
125
|
+
|
|
126
|
+
def build_digest_header(self, method, url):
|
|
127
|
+
"""
|
|
128
|
+
:rtype: str
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
realm = self._thread_local.chal["realm"]
|
|
132
|
+
nonce = self._thread_local.chal["nonce"]
|
|
133
|
+
qop = self._thread_local.chal.get("qop")
|
|
134
|
+
algorithm = self._thread_local.chal.get("algorithm")
|
|
135
|
+
opaque = self._thread_local.chal.get("opaque")
|
|
136
|
+
hash_utf8 = None
|
|
137
|
+
|
|
138
|
+
if algorithm is None:
|
|
139
|
+
_algorithm = "MD5"
|
|
140
|
+
else:
|
|
141
|
+
_algorithm = algorithm.upper()
|
|
142
|
+
# lambdas assume digest modules are imported at the top level
|
|
143
|
+
if _algorithm == "MD5" or _algorithm == "MD5-SESS":
|
|
144
|
+
|
|
145
|
+
def md5_utf8(x):
|
|
146
|
+
if isinstance(x, str):
|
|
147
|
+
x = x.encode("utf-8")
|
|
148
|
+
return hashlib.md5(x).hexdigest()
|
|
149
|
+
|
|
150
|
+
hash_utf8 = md5_utf8
|
|
151
|
+
elif _algorithm == "SHA":
|
|
152
|
+
|
|
153
|
+
def sha_utf8(x):
|
|
154
|
+
if isinstance(x, str):
|
|
155
|
+
x = x.encode("utf-8")
|
|
156
|
+
return hashlib.sha1(x).hexdigest()
|
|
157
|
+
|
|
158
|
+
hash_utf8 = sha_utf8
|
|
159
|
+
elif _algorithm == "SHA-256":
|
|
160
|
+
|
|
161
|
+
def sha256_utf8(x):
|
|
162
|
+
if isinstance(x, str):
|
|
163
|
+
x = x.encode("utf-8")
|
|
164
|
+
return hashlib.sha256(x).hexdigest()
|
|
165
|
+
|
|
166
|
+
hash_utf8 = sha256_utf8
|
|
167
|
+
elif _algorithm == "SHA-512":
|
|
168
|
+
|
|
169
|
+
def sha512_utf8(x):
|
|
170
|
+
if isinstance(x, str):
|
|
171
|
+
x = x.encode("utf-8")
|
|
172
|
+
return hashlib.sha512(x).hexdigest()
|
|
173
|
+
|
|
174
|
+
hash_utf8 = sha512_utf8
|
|
175
|
+
|
|
176
|
+
KD = lambda s, d: hash_utf8(f"{s}:{d}") # noqa:E731
|
|
177
|
+
|
|
178
|
+
if hash_utf8 is None:
|
|
179
|
+
return None
|
|
180
|
+
|
|
181
|
+
# XXX not implemented yet
|
|
182
|
+
entdig = None
|
|
183
|
+
p_parsed = urlparse(url)
|
|
184
|
+
#: path is request-uri defined in RFC 2616 which should not be empty
|
|
185
|
+
path = p_parsed.path or "/"
|
|
186
|
+
if p_parsed.query:
|
|
187
|
+
path += f"?{p_parsed.query}"
|
|
188
|
+
|
|
189
|
+
A1 = f"{self.username}:{realm}:{self.password}"
|
|
190
|
+
A2 = f"{method}:{path}"
|
|
191
|
+
|
|
192
|
+
HA1 = hash_utf8(A1)
|
|
193
|
+
HA2 = hash_utf8(A2)
|
|
194
|
+
|
|
195
|
+
if nonce == self._thread_local.last_nonce:
|
|
196
|
+
self._thread_local.nonce_count += 1
|
|
197
|
+
else:
|
|
198
|
+
self._thread_local.nonce_count = 1
|
|
199
|
+
ncvalue = f"{self._thread_local.nonce_count:08x}"
|
|
200
|
+
s = str(self._thread_local.nonce_count).encode("utf-8")
|
|
201
|
+
s += nonce.encode("utf-8")
|
|
202
|
+
s += time.ctime().encode("utf-8")
|
|
203
|
+
s += os.urandom(8)
|
|
204
|
+
|
|
205
|
+
cnonce = hashlib.sha1(s).hexdigest()[:16]
|
|
206
|
+
if _algorithm == "MD5-SESS":
|
|
207
|
+
HA1 = hash_utf8(f"{HA1}:{nonce}:{cnonce}")
|
|
208
|
+
|
|
209
|
+
if not qop:
|
|
210
|
+
respdig = KD(HA1, f"{nonce}:{HA2}")
|
|
211
|
+
elif qop == "auth" or "auth" in qop.split(","):
|
|
212
|
+
noncebit = f"{nonce}:{ncvalue}:{cnonce}:auth:{HA2}"
|
|
213
|
+
respdig = KD(HA1, noncebit)
|
|
214
|
+
else:
|
|
215
|
+
# XXX handle auth-int.
|
|
216
|
+
return None
|
|
217
|
+
|
|
218
|
+
self._thread_local.last_nonce = nonce
|
|
219
|
+
|
|
220
|
+
# XXX should the partial digests be encoded too?
|
|
221
|
+
base = (
|
|
222
|
+
f'username="{self.username}", realm="{realm}", nonce="{nonce}", '
|
|
223
|
+
f'uri="{path}", response="{respdig}"'
|
|
224
|
+
)
|
|
225
|
+
if opaque:
|
|
226
|
+
base += f', opaque="{opaque}"'
|
|
227
|
+
if algorithm:
|
|
228
|
+
base += f', algorithm="{algorithm}"'
|
|
229
|
+
if entdig:
|
|
230
|
+
base += f', digest="{entdig}"'
|
|
231
|
+
if qop:
|
|
232
|
+
base += f', qop="auth", nc={ncvalue}, cnonce="{cnonce}"'
|
|
233
|
+
|
|
234
|
+
return f"Digest {base}"
|
|
235
|
+
|
|
236
|
+
def handle_redirect(self, r, **kwargs):
|
|
237
|
+
"""Reset num_401_calls counter on redirects."""
|
|
238
|
+
if r.is_redirect:
|
|
239
|
+
self._thread_local.num_401_calls = 1
|
|
240
|
+
|
|
241
|
+
def handle_401(self, r, **kwargs):
|
|
242
|
+
"""
|
|
243
|
+
Takes the given response and tries digest-auth, if needed.
|
|
244
|
+
|
|
245
|
+
:rtype: requests.Response
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
# If response is not 4xx, do not auth
|
|
249
|
+
# See https://github.com/psf/requests/issues/3772
|
|
250
|
+
if not 400 <= r.status_code < 500:
|
|
251
|
+
self._thread_local.num_401_calls = 1
|
|
252
|
+
return r
|
|
253
|
+
|
|
254
|
+
if self._thread_local.pos is not None:
|
|
255
|
+
# Rewind the file position indicator of the body to where
|
|
256
|
+
# it was to resend the request.
|
|
257
|
+
r.request.body.seek(self._thread_local.pos)
|
|
258
|
+
s_auth = r.headers.get("www-authenticate", "")
|
|
259
|
+
|
|
260
|
+
if "digest" in s_auth.lower() and self._thread_local.num_401_calls < 2:
|
|
261
|
+
self._thread_local.num_401_calls += 1
|
|
262
|
+
pat = re.compile(r"digest ", flags=re.IGNORECASE)
|
|
263
|
+
self._thread_local.chal = parse_dict_header(pat.sub("", s_auth, count=1))
|
|
264
|
+
|
|
265
|
+
# Consume content and release the original connection
|
|
266
|
+
# to allow our new request to reuse the same one.
|
|
267
|
+
r.content
|
|
268
|
+
r.close()
|
|
269
|
+
prep = r.request.copy()
|
|
270
|
+
extract_cookies_to_jar(prep._cookies, r.request, r.raw)
|
|
271
|
+
prep.prepare_cookies(prep._cookies)
|
|
272
|
+
|
|
273
|
+
prep.headers["Authorization"] = self.build_digest_header(
|
|
274
|
+
prep.method, prep.url
|
|
275
|
+
)
|
|
276
|
+
_r = r.connection.send(prep, **kwargs)
|
|
277
|
+
_r.history.append(r)
|
|
278
|
+
_r.request = prep
|
|
279
|
+
|
|
280
|
+
return _r
|
|
281
|
+
|
|
282
|
+
self._thread_local.num_401_calls = 1
|
|
283
|
+
return r
|
|
284
|
+
|
|
285
|
+
def __call__(self, r):
|
|
286
|
+
# Initialize per-thread state, if needed
|
|
287
|
+
self.init_per_thread_state()
|
|
288
|
+
# If we have a saved nonce, skip the 401
|
|
289
|
+
if self._thread_local.last_nonce:
|
|
290
|
+
r.headers["Authorization"] = self.build_digest_header(r.method, r.url)
|
|
291
|
+
try:
|
|
292
|
+
self._thread_local.pos = r.body.tell()
|
|
293
|
+
except AttributeError:
|
|
294
|
+
# In the case of HTTPDigestAuth being reused and the body of
|
|
295
|
+
# the previous request was a file-like object, pos has the
|
|
296
|
+
# file position of the previous body. Ensure it's set to
|
|
297
|
+
# None.
|
|
298
|
+
self._thread_local.pos = None
|
|
299
|
+
r.register_hook("response", self.handle_401)
|
|
300
|
+
r.register_hook("response", self.handle_redirect)
|
|
301
|
+
self._thread_local.num_401_calls = 1
|
|
302
|
+
|
|
303
|
+
return r
|
|
304
|
+
|
|
305
|
+
def __eq__(self, other):
|
|
306
|
+
return all(
|
|
307
|
+
[
|
|
308
|
+
self.username == getattr(other, "username", None),
|
|
309
|
+
self.password == getattr(other, "password", None),
|
|
310
|
+
]
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
def __ne__(self, other):
|
|
314
|
+
return not self == other
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
requests.certs
|
|
5
|
+
~~~~~~~~~~~~~~
|
|
6
|
+
|
|
7
|
+
This module returns the preferred default CA certificate bundle. There is
|
|
8
|
+
only one — the one from the certifi package.
|
|
9
|
+
|
|
10
|
+
If you are packaging Requests, e.g., for a Linux distribution or a managed
|
|
11
|
+
environment, you can change the definition of where() to return a separately
|
|
12
|
+
packaged CA bundle.
|
|
13
|
+
"""
|
|
14
|
+
from pip._vendor.certifi import where
|
|
15
|
+
|
|
16
|
+
if __name__ == "__main__":
|
|
17
|
+
print(where())
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"""
|
|
2
|
+
requests.compat
|
|
3
|
+
~~~~~~~~~~~~~~~
|
|
4
|
+
|
|
5
|
+
This module previously handled import compatibility issues
|
|
6
|
+
between Python 2 and Python 3. It remains for backwards
|
|
7
|
+
compatibility until the next major version.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
# -------
|
|
13
|
+
# urllib3
|
|
14
|
+
# -------
|
|
15
|
+
from pip._vendor.urllib3 import __version__ as urllib3_version
|
|
16
|
+
|
|
17
|
+
# Detect which major version of urllib3 is being used.
|
|
18
|
+
try:
|
|
19
|
+
is_urllib3_1 = int(urllib3_version.split(".")[0]) == 1
|
|
20
|
+
except (TypeError, AttributeError):
|
|
21
|
+
# If we can't discern a version, prefer old functionality.
|
|
22
|
+
is_urllib3_1 = True
|
|
23
|
+
|
|
24
|
+
# -------------------
|
|
25
|
+
# Character Detection
|
|
26
|
+
# -------------------
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _resolve_char_detection():
|
|
30
|
+
"""Find supported character detection libraries."""
|
|
31
|
+
chardet = None
|
|
32
|
+
return chardet
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
chardet = _resolve_char_detection()
|
|
36
|
+
|
|
37
|
+
# -------
|
|
38
|
+
# Pythons
|
|
39
|
+
# -------
|
|
40
|
+
|
|
41
|
+
# Syntax sugar.
|
|
42
|
+
_ver = sys.version_info
|
|
43
|
+
|
|
44
|
+
#: Python 2.x?
|
|
45
|
+
is_py2 = _ver[0] == 2
|
|
46
|
+
|
|
47
|
+
#: Python 3.x?
|
|
48
|
+
is_py3 = _ver[0] == 3
|
|
49
|
+
|
|
50
|
+
# Note: We've patched out simplejson support in pip because it prevents
|
|
51
|
+
# upgrading simplejson on Windows.
|
|
52
|
+
import json
|
|
53
|
+
from json import JSONDecodeError
|
|
54
|
+
|
|
55
|
+
# Keep OrderedDict for backwards compatibility.
|
|
56
|
+
from collections import OrderedDict
|
|
57
|
+
from collections.abc import Callable, Mapping, MutableMapping
|
|
58
|
+
from http import cookiejar as cookielib
|
|
59
|
+
from http.cookies import Morsel
|
|
60
|
+
from io import StringIO
|
|
61
|
+
|
|
62
|
+
# --------------
|
|
63
|
+
# Legacy Imports
|
|
64
|
+
# --------------
|
|
65
|
+
from urllib.parse import (
|
|
66
|
+
quote,
|
|
67
|
+
quote_plus,
|
|
68
|
+
unquote,
|
|
69
|
+
unquote_plus,
|
|
70
|
+
urldefrag,
|
|
71
|
+
urlencode,
|
|
72
|
+
urljoin,
|
|
73
|
+
urlparse,
|
|
74
|
+
urlsplit,
|
|
75
|
+
urlunparse,
|
|
76
|
+
)
|
|
77
|
+
from urllib.request import (
|
|
78
|
+
getproxies,
|
|
79
|
+
getproxies_environment,
|
|
80
|
+
parse_http_list,
|
|
81
|
+
proxy_bypass,
|
|
82
|
+
proxy_bypass_environment,
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
builtin_str = str
|
|
86
|
+
str = str
|
|
87
|
+
bytes = bytes
|
|
88
|
+
basestring = (str, bytes)
|
|
89
|
+
numeric_types = (int, float)
|
|
90
|
+
integer_types = (int,)
|