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.
- cli_ih/asyncClient.py +51 -21
- cli_ih/client.py +14 -7
- {cli_ih-0.6.2.1.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.2.1.dist-info → cli_ih-0.6.3.1.dist-info}/WHEEL +1 -1
- {cli_ih-0.6.2.1.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.2.1.dist-info/RECORD +0 -8
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Package containing all pip commands
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import importlib
|
|
8
|
+
from collections import namedtuple
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
from pip._internal.cli.base_command import Command
|
|
12
|
+
|
|
13
|
+
CommandInfo = namedtuple("CommandInfo", "module_path, class_name, summary")
|
|
14
|
+
|
|
15
|
+
# This dictionary does a bunch of heavy lifting for help output:
|
|
16
|
+
# - Enables avoiding additional (costly) imports for presenting `--help`.
|
|
17
|
+
# - The ordering matters for help display.
|
|
18
|
+
#
|
|
19
|
+
# Even though the module path starts with the same "pip._internal.commands"
|
|
20
|
+
# prefix, the full path makes testing easier (specifically when modifying
|
|
21
|
+
# `commands_dict` in test setup / teardown).
|
|
22
|
+
commands_dict: dict[str, CommandInfo] = {
|
|
23
|
+
"install": CommandInfo(
|
|
24
|
+
"pip._internal.commands.install",
|
|
25
|
+
"InstallCommand",
|
|
26
|
+
"Install packages.",
|
|
27
|
+
),
|
|
28
|
+
"lock": CommandInfo(
|
|
29
|
+
"pip._internal.commands.lock",
|
|
30
|
+
"LockCommand",
|
|
31
|
+
"Generate a lock file.",
|
|
32
|
+
),
|
|
33
|
+
"download": CommandInfo(
|
|
34
|
+
"pip._internal.commands.download",
|
|
35
|
+
"DownloadCommand",
|
|
36
|
+
"Download packages.",
|
|
37
|
+
),
|
|
38
|
+
"uninstall": CommandInfo(
|
|
39
|
+
"pip._internal.commands.uninstall",
|
|
40
|
+
"UninstallCommand",
|
|
41
|
+
"Uninstall packages.",
|
|
42
|
+
),
|
|
43
|
+
"freeze": CommandInfo(
|
|
44
|
+
"pip._internal.commands.freeze",
|
|
45
|
+
"FreezeCommand",
|
|
46
|
+
"Output installed packages in requirements format.",
|
|
47
|
+
),
|
|
48
|
+
"inspect": CommandInfo(
|
|
49
|
+
"pip._internal.commands.inspect",
|
|
50
|
+
"InspectCommand",
|
|
51
|
+
"Inspect the python environment.",
|
|
52
|
+
),
|
|
53
|
+
"list": CommandInfo(
|
|
54
|
+
"pip._internal.commands.list",
|
|
55
|
+
"ListCommand",
|
|
56
|
+
"List installed packages.",
|
|
57
|
+
),
|
|
58
|
+
"show": CommandInfo(
|
|
59
|
+
"pip._internal.commands.show",
|
|
60
|
+
"ShowCommand",
|
|
61
|
+
"Show information about installed packages.",
|
|
62
|
+
),
|
|
63
|
+
"check": CommandInfo(
|
|
64
|
+
"pip._internal.commands.check",
|
|
65
|
+
"CheckCommand",
|
|
66
|
+
"Verify installed packages have compatible dependencies.",
|
|
67
|
+
),
|
|
68
|
+
"config": CommandInfo(
|
|
69
|
+
"pip._internal.commands.configuration",
|
|
70
|
+
"ConfigurationCommand",
|
|
71
|
+
"Manage local and global configuration.",
|
|
72
|
+
),
|
|
73
|
+
"search": CommandInfo(
|
|
74
|
+
"pip._internal.commands.search",
|
|
75
|
+
"SearchCommand",
|
|
76
|
+
"Search PyPI for packages.",
|
|
77
|
+
),
|
|
78
|
+
"cache": CommandInfo(
|
|
79
|
+
"pip._internal.commands.cache",
|
|
80
|
+
"CacheCommand",
|
|
81
|
+
"Inspect and manage pip's wheel cache.",
|
|
82
|
+
),
|
|
83
|
+
"index": CommandInfo(
|
|
84
|
+
"pip._internal.commands.index",
|
|
85
|
+
"IndexCommand",
|
|
86
|
+
"Inspect information available from package indexes.",
|
|
87
|
+
),
|
|
88
|
+
"wheel": CommandInfo(
|
|
89
|
+
"pip._internal.commands.wheel",
|
|
90
|
+
"WheelCommand",
|
|
91
|
+
"Build wheels from your requirements.",
|
|
92
|
+
),
|
|
93
|
+
"hash": CommandInfo(
|
|
94
|
+
"pip._internal.commands.hash",
|
|
95
|
+
"HashCommand",
|
|
96
|
+
"Compute hashes of package archives.",
|
|
97
|
+
),
|
|
98
|
+
"completion": CommandInfo(
|
|
99
|
+
"pip._internal.commands.completion",
|
|
100
|
+
"CompletionCommand",
|
|
101
|
+
"A helper command used for command completion.",
|
|
102
|
+
),
|
|
103
|
+
"debug": CommandInfo(
|
|
104
|
+
"pip._internal.commands.debug",
|
|
105
|
+
"DebugCommand",
|
|
106
|
+
"Show information useful for debugging.",
|
|
107
|
+
),
|
|
108
|
+
"help": CommandInfo(
|
|
109
|
+
"pip._internal.commands.help",
|
|
110
|
+
"HelpCommand",
|
|
111
|
+
"Show help for commands.",
|
|
112
|
+
),
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def create_command(name: str, **kwargs: Any) -> Command:
|
|
117
|
+
"""
|
|
118
|
+
Create an instance of the Command class with the given name.
|
|
119
|
+
"""
|
|
120
|
+
module_path, class_name, summary = commands_dict[name]
|
|
121
|
+
module = importlib.import_module(module_path)
|
|
122
|
+
command_class = getattr(module, class_name)
|
|
123
|
+
command = command_class(name=name, summary=summary, **kwargs)
|
|
124
|
+
|
|
125
|
+
return command
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def get_similar_commands(name: str) -> str | None:
|
|
129
|
+
"""Command name auto-correct."""
|
|
130
|
+
from difflib import get_close_matches
|
|
131
|
+
|
|
132
|
+
name = name.lower()
|
|
133
|
+
|
|
134
|
+
close_commands = get_close_matches(name, commands_dict.keys())
|
|
135
|
+
|
|
136
|
+
if close_commands:
|
|
137
|
+
return close_commands[0]
|
|
138
|
+
else:
|
|
139
|
+
return None
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import textwrap
|
|
3
|
+
from optparse import Values
|
|
4
|
+
from typing import Callable
|
|
5
|
+
|
|
6
|
+
from pip._internal.cli.base_command import Command
|
|
7
|
+
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
|
8
|
+
from pip._internal.exceptions import CommandError, PipError
|
|
9
|
+
from pip._internal.utils import filesystem
|
|
10
|
+
from pip._internal.utils.logging import getLogger
|
|
11
|
+
from pip._internal.utils.misc import format_size
|
|
12
|
+
|
|
13
|
+
logger = getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class CacheCommand(Command):
|
|
17
|
+
"""
|
|
18
|
+
Inspect and manage pip's wheel cache.
|
|
19
|
+
|
|
20
|
+
Subcommands:
|
|
21
|
+
|
|
22
|
+
- dir: Show the cache directory.
|
|
23
|
+
- info: Show information about the cache.
|
|
24
|
+
- list: List filenames of packages stored in the cache.
|
|
25
|
+
- remove: Remove one or more package from the cache.
|
|
26
|
+
- purge: Remove all items from the cache.
|
|
27
|
+
|
|
28
|
+
``<pattern>`` can be a glob expression or a package name.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
ignore_require_venv = True
|
|
32
|
+
usage = """
|
|
33
|
+
%prog dir
|
|
34
|
+
%prog info
|
|
35
|
+
%prog list [<pattern>] [--format=[human, abspath]]
|
|
36
|
+
%prog remove <pattern>
|
|
37
|
+
%prog purge
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
def add_options(self) -> None:
|
|
41
|
+
self.cmd_opts.add_option(
|
|
42
|
+
"--format",
|
|
43
|
+
action="store",
|
|
44
|
+
dest="list_format",
|
|
45
|
+
default="human",
|
|
46
|
+
choices=("human", "abspath"),
|
|
47
|
+
help="Select the output format among: human (default) or abspath",
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
self.parser.insert_option_group(0, self.cmd_opts)
|
|
51
|
+
|
|
52
|
+
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
|
53
|
+
return {
|
|
54
|
+
"dir": self.get_cache_dir,
|
|
55
|
+
"info": self.get_cache_info,
|
|
56
|
+
"list": self.list_cache_items,
|
|
57
|
+
"remove": self.remove_cache_items,
|
|
58
|
+
"purge": self.purge_cache,
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
def run(self, options: Values, args: list[str]) -> int:
|
|
62
|
+
handler_map = self.handler_map()
|
|
63
|
+
|
|
64
|
+
if not options.cache_dir:
|
|
65
|
+
logger.error("pip cache commands can not function since cache is disabled.")
|
|
66
|
+
return ERROR
|
|
67
|
+
|
|
68
|
+
# Determine action
|
|
69
|
+
if not args or args[0] not in handler_map:
|
|
70
|
+
logger.error(
|
|
71
|
+
"Need an action (%s) to perform.",
|
|
72
|
+
", ".join(sorted(handler_map)),
|
|
73
|
+
)
|
|
74
|
+
return ERROR
|
|
75
|
+
|
|
76
|
+
action = args[0]
|
|
77
|
+
|
|
78
|
+
# Error handling happens here, not in the action-handlers.
|
|
79
|
+
try:
|
|
80
|
+
handler_map[action](options, args[1:])
|
|
81
|
+
except PipError as e:
|
|
82
|
+
logger.error(e.args[0])
|
|
83
|
+
return ERROR
|
|
84
|
+
|
|
85
|
+
return SUCCESS
|
|
86
|
+
|
|
87
|
+
def get_cache_dir(self, options: Values, args: list[str]) -> None:
|
|
88
|
+
if args:
|
|
89
|
+
raise CommandError("Too many arguments")
|
|
90
|
+
|
|
91
|
+
logger.info(options.cache_dir)
|
|
92
|
+
|
|
93
|
+
def get_cache_info(self, options: Values, args: list[str]) -> None:
|
|
94
|
+
if args:
|
|
95
|
+
raise CommandError("Too many arguments")
|
|
96
|
+
|
|
97
|
+
num_http_files = len(self._find_http_files(options))
|
|
98
|
+
num_packages = len(self._find_wheels(options, "*"))
|
|
99
|
+
|
|
100
|
+
http_cache_location = self._cache_dir(options, "http-v2")
|
|
101
|
+
old_http_cache_location = self._cache_dir(options, "http")
|
|
102
|
+
wheels_cache_location = self._cache_dir(options, "wheels")
|
|
103
|
+
http_cache_size = filesystem.format_size(
|
|
104
|
+
filesystem.directory_size(http_cache_location)
|
|
105
|
+
+ filesystem.directory_size(old_http_cache_location)
|
|
106
|
+
)
|
|
107
|
+
wheels_cache_size = filesystem.format_directory_size(wheels_cache_location)
|
|
108
|
+
|
|
109
|
+
message = (
|
|
110
|
+
textwrap.dedent(
|
|
111
|
+
"""
|
|
112
|
+
Package index page cache location (pip v23.3+): {http_cache_location}
|
|
113
|
+
Package index page cache location (older pips): {old_http_cache_location}
|
|
114
|
+
Package index page cache size: {http_cache_size}
|
|
115
|
+
Number of HTTP files: {num_http_files}
|
|
116
|
+
Locally built wheels location: {wheels_cache_location}
|
|
117
|
+
Locally built wheels size: {wheels_cache_size}
|
|
118
|
+
Number of locally built wheels: {package_count}
|
|
119
|
+
""" # noqa: E501
|
|
120
|
+
)
|
|
121
|
+
.format(
|
|
122
|
+
http_cache_location=http_cache_location,
|
|
123
|
+
old_http_cache_location=old_http_cache_location,
|
|
124
|
+
http_cache_size=http_cache_size,
|
|
125
|
+
num_http_files=num_http_files,
|
|
126
|
+
wheels_cache_location=wheels_cache_location,
|
|
127
|
+
package_count=num_packages,
|
|
128
|
+
wheels_cache_size=wheels_cache_size,
|
|
129
|
+
)
|
|
130
|
+
.strip()
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
logger.info(message)
|
|
134
|
+
|
|
135
|
+
def list_cache_items(self, options: Values, args: list[str]) -> None:
|
|
136
|
+
if len(args) > 1:
|
|
137
|
+
raise CommandError("Too many arguments")
|
|
138
|
+
|
|
139
|
+
if args:
|
|
140
|
+
pattern = args[0]
|
|
141
|
+
else:
|
|
142
|
+
pattern = "*"
|
|
143
|
+
|
|
144
|
+
files = self._find_wheels(options, pattern)
|
|
145
|
+
if options.list_format == "human":
|
|
146
|
+
self.format_for_human(files)
|
|
147
|
+
else:
|
|
148
|
+
self.format_for_abspath(files)
|
|
149
|
+
|
|
150
|
+
def format_for_human(self, files: list[str]) -> None:
|
|
151
|
+
if not files:
|
|
152
|
+
logger.info("No locally built wheels cached.")
|
|
153
|
+
return
|
|
154
|
+
|
|
155
|
+
results = []
|
|
156
|
+
for filename in files:
|
|
157
|
+
wheel = os.path.basename(filename)
|
|
158
|
+
size = filesystem.format_file_size(filename)
|
|
159
|
+
results.append(f" - {wheel} ({size})")
|
|
160
|
+
logger.info("Cache contents:\n")
|
|
161
|
+
logger.info("\n".join(sorted(results)))
|
|
162
|
+
|
|
163
|
+
def format_for_abspath(self, files: list[str]) -> None:
|
|
164
|
+
if files:
|
|
165
|
+
logger.info("\n".join(sorted(files)))
|
|
166
|
+
|
|
167
|
+
def remove_cache_items(self, options: Values, args: list[str]) -> None:
|
|
168
|
+
if len(args) > 1:
|
|
169
|
+
raise CommandError("Too many arguments")
|
|
170
|
+
|
|
171
|
+
if not args:
|
|
172
|
+
raise CommandError("Please provide a pattern")
|
|
173
|
+
|
|
174
|
+
files = self._find_wheels(options, args[0])
|
|
175
|
+
|
|
176
|
+
no_matching_msg = "No matching packages"
|
|
177
|
+
if args[0] == "*":
|
|
178
|
+
# Only fetch http files if no specific pattern given
|
|
179
|
+
files += self._find_http_files(options)
|
|
180
|
+
else:
|
|
181
|
+
# Add the pattern to the log message
|
|
182
|
+
no_matching_msg += f' for pattern "{args[0]}"'
|
|
183
|
+
|
|
184
|
+
if not files:
|
|
185
|
+
logger.warning(no_matching_msg)
|
|
186
|
+
|
|
187
|
+
bytes_removed = 0
|
|
188
|
+
for filename in files:
|
|
189
|
+
bytes_removed += os.stat(filename).st_size
|
|
190
|
+
os.unlink(filename)
|
|
191
|
+
logger.verbose("Removed %s", filename)
|
|
192
|
+
logger.info("Files removed: %s (%s)", len(files), format_size(bytes_removed))
|
|
193
|
+
|
|
194
|
+
def purge_cache(self, options: Values, args: list[str]) -> None:
|
|
195
|
+
if args:
|
|
196
|
+
raise CommandError("Too many arguments")
|
|
197
|
+
|
|
198
|
+
return self.remove_cache_items(options, ["*"])
|
|
199
|
+
|
|
200
|
+
def _cache_dir(self, options: Values, subdir: str) -> str:
|
|
201
|
+
return os.path.join(options.cache_dir, subdir)
|
|
202
|
+
|
|
203
|
+
def _find_http_files(self, options: Values) -> list[str]:
|
|
204
|
+
old_http_dir = self._cache_dir(options, "http")
|
|
205
|
+
new_http_dir = self._cache_dir(options, "http-v2")
|
|
206
|
+
return filesystem.find_files(old_http_dir, "*") + filesystem.find_files(
|
|
207
|
+
new_http_dir, "*"
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
def _find_wheels(self, options: Values, pattern: str) -> list[str]:
|
|
211
|
+
wheel_dir = self._cache_dir(options, "wheels")
|
|
212
|
+
|
|
213
|
+
# The wheel filename format, as specified in PEP 427, is:
|
|
214
|
+
# {distribution}-{version}(-{build})?-{python}-{abi}-{platform}.whl
|
|
215
|
+
#
|
|
216
|
+
# Additionally, non-alphanumeric values in the distribution are
|
|
217
|
+
# normalized to underscores (_), meaning hyphens can never occur
|
|
218
|
+
# before `-{version}`.
|
|
219
|
+
#
|
|
220
|
+
# Given that information:
|
|
221
|
+
# - If the pattern we're given contains a hyphen (-), the user is
|
|
222
|
+
# providing at least the version. Thus, we can just append `*.whl`
|
|
223
|
+
# to match the rest of it.
|
|
224
|
+
# - If the pattern we're given doesn't contain a hyphen (-), the
|
|
225
|
+
# user is only providing the name. Thus, we append `-*.whl` to
|
|
226
|
+
# match the hyphen before the version, followed by anything else.
|
|
227
|
+
#
|
|
228
|
+
# PEP 427: https://www.python.org/dev/peps/pep-0427/
|
|
229
|
+
pattern = pattern + ("*.whl" if "-" in pattern else "-*.whl")
|
|
230
|
+
|
|
231
|
+
return filesystem.find_files(wheel_dir, pattern)
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
from optparse import Values
|
|
3
|
+
|
|
4
|
+
from pip._internal.cli.base_command import Command
|
|
5
|
+
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
|
6
|
+
from pip._internal.metadata import get_default_environment
|
|
7
|
+
from pip._internal.operations.check import (
|
|
8
|
+
check_package_set,
|
|
9
|
+
check_unsupported,
|
|
10
|
+
create_package_set_from_installed,
|
|
11
|
+
)
|
|
12
|
+
from pip._internal.utils.compatibility_tags import get_supported
|
|
13
|
+
from pip._internal.utils.misc import write_output
|
|
14
|
+
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CheckCommand(Command):
|
|
19
|
+
"""Verify installed packages have compatible dependencies."""
|
|
20
|
+
|
|
21
|
+
ignore_require_venv = True
|
|
22
|
+
usage = """
|
|
23
|
+
%prog [options]"""
|
|
24
|
+
|
|
25
|
+
def run(self, options: Values, args: list[str]) -> int:
|
|
26
|
+
package_set, parsing_probs = create_package_set_from_installed()
|
|
27
|
+
missing, conflicting = check_package_set(package_set)
|
|
28
|
+
unsupported = list(
|
|
29
|
+
check_unsupported(
|
|
30
|
+
get_default_environment().iter_installed_distributions(),
|
|
31
|
+
get_supported(),
|
|
32
|
+
)
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
for project_name in missing:
|
|
36
|
+
version = package_set[project_name].version
|
|
37
|
+
for dependency in missing[project_name]:
|
|
38
|
+
write_output(
|
|
39
|
+
"%s %s requires %s, which is not installed.",
|
|
40
|
+
project_name,
|
|
41
|
+
version,
|
|
42
|
+
dependency[0],
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
for project_name in conflicting:
|
|
46
|
+
version = package_set[project_name].version
|
|
47
|
+
for dep_name, dep_version, req in conflicting[project_name]:
|
|
48
|
+
write_output(
|
|
49
|
+
"%s %s has requirement %s, but you have %s %s.",
|
|
50
|
+
project_name,
|
|
51
|
+
version,
|
|
52
|
+
req,
|
|
53
|
+
dep_name,
|
|
54
|
+
dep_version,
|
|
55
|
+
)
|
|
56
|
+
for package in unsupported:
|
|
57
|
+
write_output(
|
|
58
|
+
"%s %s is not supported on this platform",
|
|
59
|
+
package.raw_name,
|
|
60
|
+
package.version,
|
|
61
|
+
)
|
|
62
|
+
if missing or conflicting or parsing_probs or unsupported:
|
|
63
|
+
return ERROR
|
|
64
|
+
else:
|
|
65
|
+
write_output("No broken requirements found.")
|
|
66
|
+
return SUCCESS
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import textwrap
|
|
3
|
+
from optparse import Values
|
|
4
|
+
|
|
5
|
+
from pip._internal.cli.base_command import Command
|
|
6
|
+
from pip._internal.cli.status_codes import SUCCESS
|
|
7
|
+
from pip._internal.utils.misc import get_prog
|
|
8
|
+
|
|
9
|
+
BASE_COMPLETION = """
|
|
10
|
+
# pip {shell} completion start{script}# pip {shell} completion end
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
COMPLETION_SCRIPTS = {
|
|
14
|
+
"bash": """
|
|
15
|
+
_pip_completion()
|
|
16
|
+
{{
|
|
17
|
+
COMPREPLY=( $( COMP_WORDS="${{COMP_WORDS[*]}}" \\
|
|
18
|
+
COMP_CWORD=$COMP_CWORD \\
|
|
19
|
+
PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
|
|
20
|
+
}}
|
|
21
|
+
complete -o default -F _pip_completion {prog}
|
|
22
|
+
""",
|
|
23
|
+
"zsh": """
|
|
24
|
+
#compdef -P pip[0-9.]#
|
|
25
|
+
__pip() {{
|
|
26
|
+
compadd $( COMP_WORDS="$words[*]" \\
|
|
27
|
+
COMP_CWORD=$((CURRENT-1)) \\
|
|
28
|
+
PIP_AUTO_COMPLETE=1 $words[1] 2>/dev/null )
|
|
29
|
+
}}
|
|
30
|
+
if [[ $zsh_eval_context[-1] == loadautofunc ]]; then
|
|
31
|
+
# autoload from fpath, call function directly
|
|
32
|
+
__pip "$@"
|
|
33
|
+
else
|
|
34
|
+
# eval/source/. command, register function for later
|
|
35
|
+
compdef __pip -P 'pip[0-9.]#'
|
|
36
|
+
fi
|
|
37
|
+
""",
|
|
38
|
+
"fish": """
|
|
39
|
+
function __fish_complete_pip
|
|
40
|
+
set -lx COMP_WORDS \\
|
|
41
|
+
(commandline --current-process --tokenize --cut-at-cursor) \\
|
|
42
|
+
(commandline --current-token --cut-at-cursor)
|
|
43
|
+
set -lx COMP_CWORD (math (count $COMP_WORDS) - 1)
|
|
44
|
+
set -lx PIP_AUTO_COMPLETE 1
|
|
45
|
+
set -l completions
|
|
46
|
+
if string match -q '2.*' $version
|
|
47
|
+
set completions (eval $COMP_WORDS[1])
|
|
48
|
+
else
|
|
49
|
+
set completions ($COMP_WORDS[1])
|
|
50
|
+
end
|
|
51
|
+
string split \\ -- $completions
|
|
52
|
+
end
|
|
53
|
+
complete -fa "(__fish_complete_pip)" -c {prog}
|
|
54
|
+
""",
|
|
55
|
+
"powershell": """
|
|
56
|
+
if ((Test-Path Function:\\TabExpansion) -and -not `
|
|
57
|
+
(Test-Path Function:\\_pip_completeBackup)) {{
|
|
58
|
+
Rename-Item Function:\\TabExpansion _pip_completeBackup
|
|
59
|
+
}}
|
|
60
|
+
function TabExpansion($line, $lastWord) {{
|
|
61
|
+
$lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart()
|
|
62
|
+
if ($lastBlock.StartsWith("{prog} ")) {{
|
|
63
|
+
$Env:COMP_WORDS=$lastBlock
|
|
64
|
+
$Env:COMP_CWORD=$lastBlock.Split().Length - 1
|
|
65
|
+
$Env:PIP_AUTO_COMPLETE=1
|
|
66
|
+
(& {prog}).Split()
|
|
67
|
+
Remove-Item Env:COMP_WORDS
|
|
68
|
+
Remove-Item Env:COMP_CWORD
|
|
69
|
+
Remove-Item Env:PIP_AUTO_COMPLETE
|
|
70
|
+
}}
|
|
71
|
+
elseif (Test-Path Function:\\_pip_completeBackup) {{
|
|
72
|
+
# Fall back on existing tab expansion
|
|
73
|
+
_pip_completeBackup $line $lastWord
|
|
74
|
+
}}
|
|
75
|
+
}}
|
|
76
|
+
""",
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class CompletionCommand(Command):
|
|
81
|
+
"""A helper command to be used for command completion."""
|
|
82
|
+
|
|
83
|
+
ignore_require_venv = True
|
|
84
|
+
|
|
85
|
+
def add_options(self) -> None:
|
|
86
|
+
self.cmd_opts.add_option(
|
|
87
|
+
"--bash",
|
|
88
|
+
"-b",
|
|
89
|
+
action="store_const",
|
|
90
|
+
const="bash",
|
|
91
|
+
dest="shell",
|
|
92
|
+
help="Emit completion code for bash",
|
|
93
|
+
)
|
|
94
|
+
self.cmd_opts.add_option(
|
|
95
|
+
"--zsh",
|
|
96
|
+
"-z",
|
|
97
|
+
action="store_const",
|
|
98
|
+
const="zsh",
|
|
99
|
+
dest="shell",
|
|
100
|
+
help="Emit completion code for zsh",
|
|
101
|
+
)
|
|
102
|
+
self.cmd_opts.add_option(
|
|
103
|
+
"--fish",
|
|
104
|
+
"-f",
|
|
105
|
+
action="store_const",
|
|
106
|
+
const="fish",
|
|
107
|
+
dest="shell",
|
|
108
|
+
help="Emit completion code for fish",
|
|
109
|
+
)
|
|
110
|
+
self.cmd_opts.add_option(
|
|
111
|
+
"--powershell",
|
|
112
|
+
"-p",
|
|
113
|
+
action="store_const",
|
|
114
|
+
const="powershell",
|
|
115
|
+
dest="shell",
|
|
116
|
+
help="Emit completion code for powershell",
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
self.parser.insert_option_group(0, self.cmd_opts)
|
|
120
|
+
|
|
121
|
+
def run(self, options: Values, args: list[str]) -> int:
|
|
122
|
+
"""Prints the completion code of the given shell"""
|
|
123
|
+
shells = COMPLETION_SCRIPTS.keys()
|
|
124
|
+
shell_options = ["--" + shell for shell in sorted(shells)]
|
|
125
|
+
if options.shell in shells:
|
|
126
|
+
script = textwrap.dedent(
|
|
127
|
+
COMPLETION_SCRIPTS.get(options.shell, "").format(prog=get_prog())
|
|
128
|
+
)
|
|
129
|
+
print(BASE_COMPLETION.format(script=script, shell=options.shell))
|
|
130
|
+
return SUCCESS
|
|
131
|
+
else:
|
|
132
|
+
sys.stderr.write(
|
|
133
|
+
"ERROR: You must pass {}\n".format(" or ".join(shell_options))
|
|
134
|
+
)
|
|
135
|
+
return SUCCESS
|