cli-ih 0.6.3.1__py3-none-any.whl → 0.7.0__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/__init__.py +1 -0
- cli_ih/asyncClient.py +73 -10
- cli_ih/client.py +63 -18
- cli_ih/utils.py +51 -0
- {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.0.dist-info}/METADATA +1 -1
- cli_ih-0.7.0.dist-info/RECORD +9 -0
- {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.0.dist-info}/top_level.txt +0 -1
- cli_ih-0.6.3.1.dist-info/RECORD +0 -425
- venv/Lib/site-packages/__editable___cli_ih_0_6_3_1_finder.py +0 -85
- venv/Lib/site-packages/pip/__init__.py +0 -13
- venv/Lib/site-packages/pip/__main__.py +0 -24
- venv/Lib/site-packages/pip/__pip-runner__.py +0 -50
- venv/Lib/site-packages/pip/_internal/__init__.py +0 -18
- venv/Lib/site-packages/pip/_internal/build_env.py +0 -349
- venv/Lib/site-packages/pip/_internal/cache.py +0 -291
- venv/Lib/site-packages/pip/_internal/cli/__init__.py +0 -3
- venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +0 -184
- venv/Lib/site-packages/pip/_internal/cli/base_command.py +0 -244
- venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +0 -1138
- venv/Lib/site-packages/pip/_internal/cli/command_context.py +0 -28
- venv/Lib/site-packages/pip/_internal/cli/index_command.py +0 -175
- venv/Lib/site-packages/pip/_internal/cli/main.py +0 -80
- venv/Lib/site-packages/pip/_internal/cli/main_parser.py +0 -134
- venv/Lib/site-packages/pip/_internal/cli/parser.py +0 -298
- venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +0 -151
- venv/Lib/site-packages/pip/_internal/cli/req_command.py +0 -351
- venv/Lib/site-packages/pip/_internal/cli/spinners.py +0 -235
- venv/Lib/site-packages/pip/_internal/cli/status_codes.py +0 -6
- venv/Lib/site-packages/pip/_internal/commands/__init__.py +0 -139
- venv/Lib/site-packages/pip/_internal/commands/cache.py +0 -231
- venv/Lib/site-packages/pip/_internal/commands/check.py +0 -66
- venv/Lib/site-packages/pip/_internal/commands/completion.py +0 -135
- venv/Lib/site-packages/pip/_internal/commands/configuration.py +0 -288
- venv/Lib/site-packages/pip/_internal/commands/debug.py +0 -203
- venv/Lib/site-packages/pip/_internal/commands/download.py +0 -145
- venv/Lib/site-packages/pip/_internal/commands/freeze.py +0 -107
- venv/Lib/site-packages/pip/_internal/commands/hash.py +0 -58
- venv/Lib/site-packages/pip/_internal/commands/help.py +0 -40
- venv/Lib/site-packages/pip/_internal/commands/index.py +0 -159
- venv/Lib/site-packages/pip/_internal/commands/inspect.py +0 -92
- venv/Lib/site-packages/pip/_internal/commands/install.py +0 -798
- venv/Lib/site-packages/pip/_internal/commands/list.py +0 -400
- venv/Lib/site-packages/pip/_internal/commands/lock.py +0 -170
- venv/Lib/site-packages/pip/_internal/commands/search.py +0 -178
- venv/Lib/site-packages/pip/_internal/commands/show.py +0 -231
- venv/Lib/site-packages/pip/_internal/commands/uninstall.py +0 -113
- venv/Lib/site-packages/pip/_internal/commands/wheel.py +0 -181
- venv/Lib/site-packages/pip/_internal/configuration.py +0 -397
- venv/Lib/site-packages/pip/_internal/distributions/__init__.py +0 -21
- venv/Lib/site-packages/pip/_internal/distributions/base.py +0 -55
- venv/Lib/site-packages/pip/_internal/distributions/installed.py +0 -33
- venv/Lib/site-packages/pip/_internal/distributions/sdist.py +0 -165
- venv/Lib/site-packages/pip/_internal/distributions/wheel.py +0 -44
- venv/Lib/site-packages/pip/_internal/exceptions.py +0 -881
- venv/Lib/site-packages/pip/_internal/index/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/index/collector.py +0 -489
- venv/Lib/site-packages/pip/_internal/index/package_finder.py +0 -1059
- venv/Lib/site-packages/pip/_internal/index/sources.py +0 -287
- venv/Lib/site-packages/pip/_internal/locations/__init__.py +0 -441
- venv/Lib/site-packages/pip/_internal/locations/_distutils.py +0 -173
- venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +0 -215
- venv/Lib/site-packages/pip/_internal/locations/base.py +0 -82
- venv/Lib/site-packages/pip/_internal/main.py +0 -12
- venv/Lib/site-packages/pip/_internal/metadata/__init__.py +0 -164
- venv/Lib/site-packages/pip/_internal/metadata/_json.py +0 -87
- venv/Lib/site-packages/pip/_internal/metadata/base.py +0 -685
- venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +0 -6
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +0 -87
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +0 -223
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +0 -143
- venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +0 -298
- venv/Lib/site-packages/pip/_internal/models/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/models/candidate.py +0 -25
- venv/Lib/site-packages/pip/_internal/models/direct_url.py +0 -227
- venv/Lib/site-packages/pip/_internal/models/format_control.py +0 -78
- venv/Lib/site-packages/pip/_internal/models/index.py +0 -28
- venv/Lib/site-packages/pip/_internal/models/installation_report.py +0 -57
- venv/Lib/site-packages/pip/_internal/models/link.py +0 -613
- venv/Lib/site-packages/pip/_internal/models/pylock.py +0 -188
- venv/Lib/site-packages/pip/_internal/models/scheme.py +0 -25
- venv/Lib/site-packages/pip/_internal/models/search_scope.py +0 -126
- venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +0 -53
- venv/Lib/site-packages/pip/_internal/models/target_python.py +0 -122
- venv/Lib/site-packages/pip/_internal/models/wheel.py +0 -141
- venv/Lib/site-packages/pip/_internal/network/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/network/auth.py +0 -564
- venv/Lib/site-packages/pip/_internal/network/cache.py +0 -133
- venv/Lib/site-packages/pip/_internal/network/download.py +0 -342
- venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +0 -213
- venv/Lib/site-packages/pip/_internal/network/session.py +0 -528
- venv/Lib/site-packages/pip/_internal/network/utils.py +0 -98
- venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +0 -61
- 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 +0 -140
- venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +0 -38
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +0 -41
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +0 -73
- venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +0 -38
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +0 -47
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +0 -119
- venv/Lib/site-packages/pip/_internal/operations/check.py +0 -175
- venv/Lib/site-packages/pip/_internal/operations/freeze.py +0 -259
- venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +0 -48
- venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +0 -746
- venv/Lib/site-packages/pip/_internal/operations/prepare.py +0 -742
- venv/Lib/site-packages/pip/_internal/pyproject.py +0 -182
- venv/Lib/site-packages/pip/_internal/req/__init__.py +0 -105
- venv/Lib/site-packages/pip/_internal/req/constructors.py +0 -562
- venv/Lib/site-packages/pip/_internal/req/req_dependency_group.py +0 -75
- venv/Lib/site-packages/pip/_internal/req/req_file.py +0 -620
- venv/Lib/site-packages/pip/_internal/req/req_install.py +0 -937
- venv/Lib/site-packages/pip/_internal/req/req_set.py +0 -81
- venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +0 -639
- venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/base.py +0 -20
- venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +0 -598
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +0 -142
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -582
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +0 -814
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +0 -166
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +0 -276
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +0 -85
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +0 -247
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +0 -336
- venv/Lib/site-packages/pip/_internal/self_outdated_check.py +0 -254
- venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +0 -109
- venv/Lib/site-packages/pip/_internal/utils/_log.py +0 -38
- venv/Lib/site-packages/pip/_internal/utils/appdirs.py +0 -52
- venv/Lib/site-packages/pip/_internal/utils/compat.py +0 -85
- venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +0 -201
- venv/Lib/site-packages/pip/_internal/utils/datetime.py +0 -10
- venv/Lib/site-packages/pip/_internal/utils/deprecation.py +0 -126
- venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +0 -87
- venv/Lib/site-packages/pip/_internal/utils/egg_link.py +0 -81
- venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +0 -88
- venv/Lib/site-packages/pip/_internal/utils/filesystem.py +0 -152
- venv/Lib/site-packages/pip/_internal/utils/filetypes.py +0 -24
- venv/Lib/site-packages/pip/_internal/utils/glibc.py +0 -102
- venv/Lib/site-packages/pip/_internal/utils/hashes.py +0 -150
- venv/Lib/site-packages/pip/_internal/utils/logging.py +0 -364
- venv/Lib/site-packages/pip/_internal/utils/misc.py +0 -765
- venv/Lib/site-packages/pip/_internal/utils/packaging.py +0 -44
- venv/Lib/site-packages/pip/_internal/utils/retry.py +0 -45
- venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +0 -149
- venv/Lib/site-packages/pip/_internal/utils/subprocess.py +0 -248
- venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +0 -294
- venv/Lib/site-packages/pip/_internal/utils/unpacking.py +0 -337
- venv/Lib/site-packages/pip/_internal/utils/urls.py +0 -55
- venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +0 -105
- venv/Lib/site-packages/pip/_internal/utils/wheel.py +0 -132
- venv/Lib/site-packages/pip/_internal/vcs/__init__.py +0 -15
- venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +0 -130
- venv/Lib/site-packages/pip/_internal/vcs/git.py +0 -571
- venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +0 -186
- venv/Lib/site-packages/pip/_internal/vcs/subversion.py +0 -335
- venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +0 -693
- venv/Lib/site-packages/pip/_internal/wheel_builder.py +0 -334
- venv/Lib/site-packages/pip/_vendor/__init__.py +0 -117
- venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +0 -29
- venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +0 -70
- venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +0 -168
- venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +0 -75
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +0 -8
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +0 -145
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +0 -48
- venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +0 -511
- venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +0 -119
- venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +0 -157
- venv/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +0 -146
- venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +0 -43
- venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +0 -4
- venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +0 -12
- venv/Lib/site-packages/pip/_vendor/certifi/core.py +0 -83
- venv/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py +0 -13
- venv/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py +0 -65
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py +0 -209
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +0 -59
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +0 -62
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +0 -9
- venv/Lib/site-packages/pip/_vendor/dependency_groups/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +0 -33
- venv/Lib/site-packages/pip/_vendor/distlib/compat.py +0 -1137
- venv/Lib/site-packages/pip/_vendor/distlib/resources.py +0 -358
- venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +0 -447
- venv/Lib/site-packages/pip/_vendor/distlib/util.py +0 -1984
- venv/Lib/site-packages/pip/_vendor/distro/__init__.py +0 -54
- venv/Lib/site-packages/pip/_vendor/distro/__main__.py +0 -4
- venv/Lib/site-packages/pip/_vendor/distro/distro.py +0 -1403
- venv/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/idna/__init__.py +0 -45
- venv/Lib/site-packages/pip/_vendor/idna/codec.py +0 -122
- venv/Lib/site-packages/pip/_vendor/idna/compat.py +0 -15
- venv/Lib/site-packages/pip/_vendor/idna/core.py +0 -437
- venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +0 -4243
- venv/Lib/site-packages/pip/_vendor/idna/intranges.py +0 -57
- venv/Lib/site-packages/pip/_vendor/idna/package_data.py +0 -1
- venv/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +0 -8681
- venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +0 -55
- venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +0 -48
- venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +0 -170
- venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +0 -929
- venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +0 -15
- venv/Lib/site-packages/pip/_vendor/packaging/_elffile.py +0 -109
- venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +0 -262
- venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +0 -85
- venv/Lib/site-packages/pip/_vendor/packaging/_parser.py +0 -353
- venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +0 -61
- venv/Lib/site-packages/pip/_vendor/packaging/_tokenizer.py +0 -195
- venv/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py +0 -145
- venv/Lib/site-packages/pip/_vendor/packaging/licenses/_spdx.py +0 -759
- venv/Lib/site-packages/pip/_vendor/packaging/markers.py +0 -362
- venv/Lib/site-packages/pip/_vendor/packaging/metadata.py +0 -862
- venv/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +0 -91
- venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +0 -1019
- venv/Lib/site-packages/pip/_vendor/packaging/tags.py +0 -656
- venv/Lib/site-packages/pip/_vendor/packaging/utils.py +0 -163
- venv/Lib/site-packages/pip/_vendor/packaging/version.py +0 -582
- venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +0 -3676
- venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +0 -631
- venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +0 -55
- venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +0 -249
- venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +0 -299
- venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +0 -144
- venv/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +0 -272
- venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +0 -21
- venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +0 -272
- venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +0 -82
- venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +0 -17
- venv/Lib/site-packages/pip/_vendor/pygments/console.py +0 -70
- venv/Lib/site-packages/pip/_vendor/pygments/filter.py +0 -70
- venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +0 -940
- venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +0 -129
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +0 -157
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +0 -23
- venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +0 -963
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +0 -362
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +0 -602
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +0 -1201
- venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +0 -43
- venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +0 -72
- venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +0 -91
- venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +0 -104
- venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +0 -247
- venv/Lib/site-packages/pip/_vendor/pygments/style.py +0 -203
- venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +0 -61
- venv/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py +0 -54
- venv/Lib/site-packages/pip/_vendor/pygments/token.py +0 -214
- venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +0 -153
- venv/Lib/site-packages/pip/_vendor/pygments/util.py +0 -324
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +0 -31
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +0 -410
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +0 -21
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +0 -389
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/requests/__init__.py +0 -179
- venv/Lib/site-packages/pip/_vendor/requests/__version__.py +0 -14
- venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +0 -50
- venv/Lib/site-packages/pip/_vendor/requests/adapters.py +0 -719
- venv/Lib/site-packages/pip/_vendor/requests/api.py +0 -157
- venv/Lib/site-packages/pip/_vendor/requests/auth.py +0 -314
- venv/Lib/site-packages/pip/_vendor/requests/certs.py +0 -17
- venv/Lib/site-packages/pip/_vendor/requests/compat.py +0 -90
- venv/Lib/site-packages/pip/_vendor/requests/cookies.py +0 -561
- venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +0 -151
- venv/Lib/site-packages/pip/_vendor/requests/help.py +0 -127
- venv/Lib/site-packages/pip/_vendor/requests/hooks.py +0 -33
- venv/Lib/site-packages/pip/_vendor/requests/models.py +0 -1039
- venv/Lib/site-packages/pip/_vendor/requests/packages.py +0 -25
- venv/Lib/site-packages/pip/_vendor/requests/sessions.py +0 -831
- venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +0 -128
- venv/Lib/site-packages/pip/_vendor/requests/structures.py +0 -99
- venv/Lib/site-packages/pip/_vendor/requests/utils.py +0 -1086
- venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +0 -27
- venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +0 -196
- venv/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +0 -55
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +0 -27
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +0 -47
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +0 -48
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +0 -57
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +0 -622
- venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +0 -209
- venv/Lib/site-packages/pip/_vendor/rich/__init__.py +0 -177
- venv/Lib/site-packages/pip/_vendor/rich/__main__.py +0 -245
- venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +0 -454
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +0 -3610
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +0 -32
- venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +0 -76
- venv/Lib/site-packages/pip/_vendor/rich/_extension.py +0 -10
- venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +0 -24
- venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +0 -268
- venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +0 -94
- venv/Lib/site-packages/pip/_vendor/rich/_loop.py +0 -43
- venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +0 -69
- venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +0 -309
- venv/Lib/site-packages/pip/_vendor/rich/_pick.py +0 -17
- venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +0 -153
- venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +0 -482
- venv/Lib/site-packages/pip/_vendor/rich/_stack.py +0 -16
- venv/Lib/site-packages/pip/_vendor/rich/_timer.py +0 -19
- venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +0 -661
- venv/Lib/site-packages/pip/_vendor/rich/_windows.py +0 -71
- venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +0 -56
- venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +0 -93
- venv/Lib/site-packages/pip/_vendor/rich/abc.py +0 -33
- venv/Lib/site-packages/pip/_vendor/rich/align.py +0 -306
- venv/Lib/site-packages/pip/_vendor/rich/ansi.py +0 -241
- venv/Lib/site-packages/pip/_vendor/rich/bar.py +0 -93
- venv/Lib/site-packages/pip/_vendor/rich/box.py +0 -474
- venv/Lib/site-packages/pip/_vendor/rich/cells.py +0 -174
- venv/Lib/site-packages/pip/_vendor/rich/color.py +0 -621
- venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +0 -38
- venv/Lib/site-packages/pip/_vendor/rich/columns.py +0 -187
- venv/Lib/site-packages/pip/_vendor/rich/console.py +0 -2680
- venv/Lib/site-packages/pip/_vendor/rich/constrain.py +0 -37
- venv/Lib/site-packages/pip/_vendor/rich/containers.py +0 -167
- venv/Lib/site-packages/pip/_vendor/rich/control.py +0 -219
- venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +0 -193
- venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +0 -39
- venv/Lib/site-packages/pip/_vendor/rich/emoji.py +0 -91
- venv/Lib/site-packages/pip/_vendor/rich/errors.py +0 -34
- venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +0 -57
- venv/Lib/site-packages/pip/_vendor/rich/filesize.py +0 -88
- venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +0 -232
- venv/Lib/site-packages/pip/_vendor/rich/json.py +0 -139
- venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +0 -101
- venv/Lib/site-packages/pip/_vendor/rich/layout.py +0 -442
- venv/Lib/site-packages/pip/_vendor/rich/live.py +0 -400
- venv/Lib/site-packages/pip/_vendor/rich/live_render.py +0 -106
- venv/Lib/site-packages/pip/_vendor/rich/logging.py +0 -297
- venv/Lib/site-packages/pip/_vendor/rich/markup.py +0 -251
- venv/Lib/site-packages/pip/_vendor/rich/measure.py +0 -151
- venv/Lib/site-packages/pip/_vendor/rich/padding.py +0 -141
- venv/Lib/site-packages/pip/_vendor/rich/pager.py +0 -34
- venv/Lib/site-packages/pip/_vendor/rich/palette.py +0 -100
- venv/Lib/site-packages/pip/_vendor/rich/panel.py +0 -317
- venv/Lib/site-packages/pip/_vendor/rich/pretty.py +0 -1016
- venv/Lib/site-packages/pip/_vendor/rich/progress.py +0 -1715
- venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +0 -223
- venv/Lib/site-packages/pip/_vendor/rich/prompt.py +0 -400
- venv/Lib/site-packages/pip/_vendor/rich/protocol.py +0 -42
- venv/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/rich/region.py +0 -10
- venv/Lib/site-packages/pip/_vendor/rich/repr.py +0 -149
- venv/Lib/site-packages/pip/_vendor/rich/rule.py +0 -130
- venv/Lib/site-packages/pip/_vendor/rich/scope.py +0 -86
- venv/Lib/site-packages/pip/_vendor/rich/screen.py +0 -54
- venv/Lib/site-packages/pip/_vendor/rich/segment.py +0 -752
- venv/Lib/site-packages/pip/_vendor/rich/spinner.py +0 -132
- venv/Lib/site-packages/pip/_vendor/rich/status.py +0 -131
- venv/Lib/site-packages/pip/_vendor/rich/style.py +0 -796
- venv/Lib/site-packages/pip/_vendor/rich/styled.py +0 -42
- venv/Lib/site-packages/pip/_vendor/rich/syntax.py +0 -985
- venv/Lib/site-packages/pip/_vendor/rich/table.py +0 -1006
- venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +0 -153
- venv/Lib/site-packages/pip/_vendor/rich/text.py +0 -1361
- venv/Lib/site-packages/pip/_vendor/rich/theme.py +0 -115
- venv/Lib/site-packages/pip/_vendor/rich/themes.py +0 -5
- venv/Lib/site-packages/pip/_vendor/rich/traceback.py +0 -899
- venv/Lib/site-packages/pip/_vendor/rich/tree.py +0 -257
- venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +0 -8
- venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +0 -770
- venv/Lib/site-packages/pip/_vendor/tomli/_re.py +0 -112
- venv/Lib/site-packages/pip/_vendor/tomli/_types.py +0 -10
- venv/Lib/site-packages/pip/_vendor/tomli/py.typed +0 -1
- venv/Lib/site-packages/pip/_vendor/tomli_w/__init__.py +0 -4
- venv/Lib/site-packages/pip/_vendor/tomli_w/_writer.py +0 -229
- venv/Lib/site-packages/pip/_vendor/tomli_w/py.typed +0 -1
- venv/Lib/site-packages/pip/_vendor/truststore/__init__.py +0 -36
- venv/Lib/site-packages/pip/_vendor/truststore/_api.py +0 -333
- venv/Lib/site-packages/pip/_vendor/truststore/_macos.py +0 -571
- venv/Lib/site-packages/pip/_vendor/truststore/_openssl.py +0 -66
- venv/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py +0 -31
- venv/Lib/site-packages/pip/_vendor/truststore/_windows.py +0 -567
- venv/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +0 -102
- venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -355
- venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +0 -2
- venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +0 -572
- venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +0 -1140
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +0 -36
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +0 -519
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +0 -397
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +0 -314
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +0 -130
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +0 -518
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +0 -920
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +0 -216
- venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +0 -323
- venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +0 -274
- venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +0 -98
- 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 +0 -51
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +0 -155
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +0 -1076
- venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +0 -540
- venv/Lib/site-packages/pip/_vendor/urllib3/request.py +0 -191
- venv/Lib/site-packages/pip/_vendor/urllib3/response.py +0 -879
- venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +0 -49
- venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +0 -149
- venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +0 -57
- venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +0 -22
- venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +0 -137
- venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +0 -107
- venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +0 -622
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +0 -504
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +0 -159
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +0 -221
- venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +0 -271
- venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +0 -435
- venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +0 -152
- venv/Lib/site-packages/pip/py.typed +0 -4
- {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.0.dist-info}/WHEEL +0 -0
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import logging
|
|
4
|
-
import os
|
|
5
|
-
import subprocess
|
|
6
|
-
from optparse import Values
|
|
7
|
-
from typing import Any, Callable
|
|
8
|
-
|
|
9
|
-
from pip._internal.cli.base_command import Command
|
|
10
|
-
from pip._internal.cli.status_codes import ERROR, SUCCESS
|
|
11
|
-
from pip._internal.configuration import (
|
|
12
|
-
Configuration,
|
|
13
|
-
Kind,
|
|
14
|
-
get_configuration_files,
|
|
15
|
-
kinds,
|
|
16
|
-
)
|
|
17
|
-
from pip._internal.exceptions import PipError
|
|
18
|
-
from pip._internal.utils.logging import indent_log
|
|
19
|
-
from pip._internal.utils.misc import get_prog, write_output
|
|
20
|
-
|
|
21
|
-
logger = logging.getLogger(__name__)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class ConfigurationCommand(Command):
|
|
25
|
-
"""
|
|
26
|
-
Manage local and global configuration.
|
|
27
|
-
|
|
28
|
-
Subcommands:
|
|
29
|
-
|
|
30
|
-
- list: List the active configuration (or from the file specified)
|
|
31
|
-
- edit: Edit the configuration file in an editor
|
|
32
|
-
- get: Get the value associated with command.option
|
|
33
|
-
- set: Set the command.option=value
|
|
34
|
-
- unset: Unset the value associated with command.option
|
|
35
|
-
- debug: List the configuration files and values defined under them
|
|
36
|
-
|
|
37
|
-
Configuration keys should be dot separated command and option name,
|
|
38
|
-
with the special prefix "global" affecting any command. For example,
|
|
39
|
-
"pip config set global.index-url https://example.org/" would configure
|
|
40
|
-
the index url for all commands, but "pip config set download.timeout 10"
|
|
41
|
-
would configure a 10 second timeout only for "pip download" commands.
|
|
42
|
-
|
|
43
|
-
If none of --user, --global and --site are passed, a virtual
|
|
44
|
-
environment configuration file is used if one is active and the file
|
|
45
|
-
exists. Otherwise, all modifications happen to the user file by
|
|
46
|
-
default.
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
ignore_require_venv = True
|
|
50
|
-
usage = """
|
|
51
|
-
%prog [<file-option>] list
|
|
52
|
-
%prog [<file-option>] [--editor <editor-path>] edit
|
|
53
|
-
|
|
54
|
-
%prog [<file-option>] get command.option
|
|
55
|
-
%prog [<file-option>] set command.option value
|
|
56
|
-
%prog [<file-option>] unset command.option
|
|
57
|
-
%prog [<file-option>] debug
|
|
58
|
-
"""
|
|
59
|
-
|
|
60
|
-
def add_options(self) -> None:
|
|
61
|
-
self.cmd_opts.add_option(
|
|
62
|
-
"--editor",
|
|
63
|
-
dest="editor",
|
|
64
|
-
action="store",
|
|
65
|
-
default=None,
|
|
66
|
-
help=(
|
|
67
|
-
"Editor to use to edit the file. Uses VISUAL or EDITOR "
|
|
68
|
-
"environment variables if not provided."
|
|
69
|
-
),
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
self.cmd_opts.add_option(
|
|
73
|
-
"--global",
|
|
74
|
-
dest="global_file",
|
|
75
|
-
action="store_true",
|
|
76
|
-
default=False,
|
|
77
|
-
help="Use the system-wide configuration file only",
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
self.cmd_opts.add_option(
|
|
81
|
-
"--user",
|
|
82
|
-
dest="user_file",
|
|
83
|
-
action="store_true",
|
|
84
|
-
default=False,
|
|
85
|
-
help="Use the user configuration file only",
|
|
86
|
-
)
|
|
87
|
-
|
|
88
|
-
self.cmd_opts.add_option(
|
|
89
|
-
"--site",
|
|
90
|
-
dest="site_file",
|
|
91
|
-
action="store_true",
|
|
92
|
-
default=False,
|
|
93
|
-
help="Use the current environment configuration file only",
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
self.parser.insert_option_group(0, self.cmd_opts)
|
|
97
|
-
|
|
98
|
-
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
|
99
|
-
return {
|
|
100
|
-
"list": self.list_values,
|
|
101
|
-
"edit": self.open_in_editor,
|
|
102
|
-
"get": self.get_name,
|
|
103
|
-
"set": self.set_name_value,
|
|
104
|
-
"unset": self.unset_name,
|
|
105
|
-
"debug": self.list_config_values,
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
def run(self, options: Values, args: list[str]) -> int:
|
|
109
|
-
handler_map = self.handler_map()
|
|
110
|
-
|
|
111
|
-
# Determine action
|
|
112
|
-
if not args or args[0] not in handler_map:
|
|
113
|
-
logger.error(
|
|
114
|
-
"Need an action (%s) to perform.",
|
|
115
|
-
", ".join(sorted(handler_map)),
|
|
116
|
-
)
|
|
117
|
-
return ERROR
|
|
118
|
-
|
|
119
|
-
action = args[0]
|
|
120
|
-
|
|
121
|
-
# Determine which configuration files are to be loaded
|
|
122
|
-
# Depends on whether the command is modifying.
|
|
123
|
-
try:
|
|
124
|
-
load_only = self._determine_file(
|
|
125
|
-
options, need_value=(action in ["get", "set", "unset", "edit"])
|
|
126
|
-
)
|
|
127
|
-
except PipError as e:
|
|
128
|
-
logger.error(e.args[0])
|
|
129
|
-
return ERROR
|
|
130
|
-
|
|
131
|
-
# Load a new configuration
|
|
132
|
-
self.configuration = Configuration(
|
|
133
|
-
isolated=options.isolated_mode, load_only=load_only
|
|
134
|
-
)
|
|
135
|
-
self.configuration.load()
|
|
136
|
-
|
|
137
|
-
# Error handling happens here, not in the action-handlers.
|
|
138
|
-
try:
|
|
139
|
-
handler_map[action](options, args[1:])
|
|
140
|
-
except PipError as e:
|
|
141
|
-
logger.error(e.args[0])
|
|
142
|
-
return ERROR
|
|
143
|
-
|
|
144
|
-
return SUCCESS
|
|
145
|
-
|
|
146
|
-
def _determine_file(self, options: Values, need_value: bool) -> Kind | None:
|
|
147
|
-
file_options = [
|
|
148
|
-
key
|
|
149
|
-
for key, value in (
|
|
150
|
-
(kinds.USER, options.user_file),
|
|
151
|
-
(kinds.GLOBAL, options.global_file),
|
|
152
|
-
(kinds.SITE, options.site_file),
|
|
153
|
-
)
|
|
154
|
-
if value
|
|
155
|
-
]
|
|
156
|
-
|
|
157
|
-
if not file_options:
|
|
158
|
-
if not need_value:
|
|
159
|
-
return None
|
|
160
|
-
# Default to user, unless there's a site file.
|
|
161
|
-
elif any(
|
|
162
|
-
os.path.exists(site_config_file)
|
|
163
|
-
for site_config_file in get_configuration_files()[kinds.SITE]
|
|
164
|
-
):
|
|
165
|
-
return kinds.SITE
|
|
166
|
-
else:
|
|
167
|
-
return kinds.USER
|
|
168
|
-
elif len(file_options) == 1:
|
|
169
|
-
return file_options[0]
|
|
170
|
-
|
|
171
|
-
raise PipError(
|
|
172
|
-
"Need exactly one file to operate upon "
|
|
173
|
-
"(--user, --site, --global) to perform."
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
def list_values(self, options: Values, args: list[str]) -> None:
|
|
177
|
-
self._get_n_args(args, "list", n=0)
|
|
178
|
-
|
|
179
|
-
for key, value in sorted(self.configuration.items()):
|
|
180
|
-
for key, value in sorted(value.items()):
|
|
181
|
-
write_output("%s=%r", key, value)
|
|
182
|
-
|
|
183
|
-
def get_name(self, options: Values, args: list[str]) -> None:
|
|
184
|
-
key = self._get_n_args(args, "get [name]", n=1)
|
|
185
|
-
value = self.configuration.get_value(key)
|
|
186
|
-
|
|
187
|
-
write_output("%s", value)
|
|
188
|
-
|
|
189
|
-
def set_name_value(self, options: Values, args: list[str]) -> None:
|
|
190
|
-
key, value = self._get_n_args(args, "set [name] [value]", n=2)
|
|
191
|
-
self.configuration.set_value(key, value)
|
|
192
|
-
|
|
193
|
-
self._save_configuration()
|
|
194
|
-
|
|
195
|
-
def unset_name(self, options: Values, args: list[str]) -> None:
|
|
196
|
-
key = self._get_n_args(args, "unset [name]", n=1)
|
|
197
|
-
self.configuration.unset_value(key)
|
|
198
|
-
|
|
199
|
-
self._save_configuration()
|
|
200
|
-
|
|
201
|
-
def list_config_values(self, options: Values, args: list[str]) -> None:
|
|
202
|
-
"""List config key-value pairs across different config files"""
|
|
203
|
-
self._get_n_args(args, "debug", n=0)
|
|
204
|
-
|
|
205
|
-
self.print_env_var_values()
|
|
206
|
-
# Iterate over config files and print if they exist, and the
|
|
207
|
-
# key-value pairs present in them if they do
|
|
208
|
-
for variant, files in sorted(self.configuration.iter_config_files()):
|
|
209
|
-
write_output("%s:", variant)
|
|
210
|
-
for fname in files:
|
|
211
|
-
with indent_log():
|
|
212
|
-
file_exists = os.path.exists(fname)
|
|
213
|
-
write_output("%s, exists: %r", fname, file_exists)
|
|
214
|
-
if file_exists:
|
|
215
|
-
self.print_config_file_values(variant, fname)
|
|
216
|
-
|
|
217
|
-
def print_config_file_values(self, variant: Kind, fname: str) -> None:
|
|
218
|
-
"""Get key-value pairs from the file of a variant"""
|
|
219
|
-
for name, value in self.configuration.get_values_in_config(variant).items():
|
|
220
|
-
with indent_log():
|
|
221
|
-
if name == fname:
|
|
222
|
-
for confname, confvalue in value.items():
|
|
223
|
-
write_output("%s: %s", confname, confvalue)
|
|
224
|
-
|
|
225
|
-
def print_env_var_values(self) -> None:
|
|
226
|
-
"""Get key-values pairs present as environment variables"""
|
|
227
|
-
write_output("%s:", "env_var")
|
|
228
|
-
with indent_log():
|
|
229
|
-
for key, value in sorted(self.configuration.get_environ_vars()):
|
|
230
|
-
env_var = f"PIP_{key.upper()}"
|
|
231
|
-
write_output("%s=%r", env_var, value)
|
|
232
|
-
|
|
233
|
-
def open_in_editor(self, options: Values, args: list[str]) -> None:
|
|
234
|
-
editor = self._determine_editor(options)
|
|
235
|
-
|
|
236
|
-
fname = self.configuration.get_file_to_edit()
|
|
237
|
-
if fname is None:
|
|
238
|
-
raise PipError("Could not determine appropriate file.")
|
|
239
|
-
elif '"' in fname:
|
|
240
|
-
# This shouldn't happen, unless we see a username like that.
|
|
241
|
-
# If that happens, we'd appreciate a pull request fixing this.
|
|
242
|
-
raise PipError(
|
|
243
|
-
f'Can not open an editor for a file name containing "\n{fname}'
|
|
244
|
-
)
|
|
245
|
-
|
|
246
|
-
try:
|
|
247
|
-
subprocess.check_call(f'{editor} "{fname}"', shell=True)
|
|
248
|
-
except FileNotFoundError as e:
|
|
249
|
-
if not e.filename:
|
|
250
|
-
e.filename = editor
|
|
251
|
-
raise
|
|
252
|
-
except subprocess.CalledProcessError as e:
|
|
253
|
-
raise PipError(f"Editor Subprocess exited with exit code {e.returncode}")
|
|
254
|
-
|
|
255
|
-
def _get_n_args(self, args: list[str], example: str, n: int) -> Any:
|
|
256
|
-
"""Helper to make sure the command got the right number of arguments"""
|
|
257
|
-
if len(args) != n:
|
|
258
|
-
msg = (
|
|
259
|
-
f"Got unexpected number of arguments, expected {n}. "
|
|
260
|
-
f'(example: "{get_prog()} config {example}")'
|
|
261
|
-
)
|
|
262
|
-
raise PipError(msg)
|
|
263
|
-
|
|
264
|
-
if n == 1:
|
|
265
|
-
return args[0]
|
|
266
|
-
else:
|
|
267
|
-
return args
|
|
268
|
-
|
|
269
|
-
def _save_configuration(self) -> None:
|
|
270
|
-
# We successfully ran a modifying command. Need to save the
|
|
271
|
-
# configuration.
|
|
272
|
-
try:
|
|
273
|
-
self.configuration.save()
|
|
274
|
-
except Exception:
|
|
275
|
-
logger.exception(
|
|
276
|
-
"Unable to save configuration. Please report this as a bug."
|
|
277
|
-
)
|
|
278
|
-
raise PipError("Internal Error.")
|
|
279
|
-
|
|
280
|
-
def _determine_editor(self, options: Values) -> str:
|
|
281
|
-
if options.editor is not None:
|
|
282
|
-
return options.editor
|
|
283
|
-
elif "VISUAL" in os.environ:
|
|
284
|
-
return os.environ["VISUAL"]
|
|
285
|
-
elif "EDITOR" in os.environ:
|
|
286
|
-
return os.environ["EDITOR"]
|
|
287
|
-
else:
|
|
288
|
-
raise PipError("Could not determine editor to use.")
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import locale
|
|
4
|
-
import logging
|
|
5
|
-
import os
|
|
6
|
-
import sys
|
|
7
|
-
from optparse import Values
|
|
8
|
-
from types import ModuleType
|
|
9
|
-
from typing import Any
|
|
10
|
-
|
|
11
|
-
import pip._vendor
|
|
12
|
-
from pip._vendor.certifi import where
|
|
13
|
-
from pip._vendor.packaging.version import parse as parse_version
|
|
14
|
-
|
|
15
|
-
from pip._internal.cli import cmdoptions
|
|
16
|
-
from pip._internal.cli.base_command import Command
|
|
17
|
-
from pip._internal.cli.cmdoptions import make_target_python
|
|
18
|
-
from pip._internal.cli.status_codes import SUCCESS
|
|
19
|
-
from pip._internal.configuration import Configuration
|
|
20
|
-
from pip._internal.metadata import get_environment
|
|
21
|
-
from pip._internal.utils.compat import open_text_resource
|
|
22
|
-
from pip._internal.utils.logging import indent_log
|
|
23
|
-
from pip._internal.utils.misc import get_pip_version
|
|
24
|
-
|
|
25
|
-
logger = logging.getLogger(__name__)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def show_value(name: str, value: Any) -> None:
|
|
29
|
-
logger.info("%s: %s", name, value)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def show_sys_implementation() -> None:
|
|
33
|
-
logger.info("sys.implementation:")
|
|
34
|
-
implementation_name = sys.implementation.name
|
|
35
|
-
with indent_log():
|
|
36
|
-
show_value("name", implementation_name)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
def create_vendor_txt_map() -> dict[str, str]:
|
|
40
|
-
with open_text_resource("pip._vendor", "vendor.txt") as f:
|
|
41
|
-
# Purge non version specifying lines.
|
|
42
|
-
# Also, remove any space prefix or suffixes (including comments).
|
|
43
|
-
lines = [
|
|
44
|
-
line.strip().split(" ", 1)[0] for line in f.readlines() if "==" in line
|
|
45
|
-
]
|
|
46
|
-
|
|
47
|
-
# Transform into "module" -> version dict.
|
|
48
|
-
return dict(line.split("==", 1) for line in lines)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
def get_module_from_module_name(module_name: str) -> ModuleType | None:
|
|
52
|
-
# Module name can be uppercase in vendor.txt for some reason...
|
|
53
|
-
module_name = module_name.lower().replace("-", "_")
|
|
54
|
-
# PATCH: setuptools is actually only pkg_resources.
|
|
55
|
-
if module_name == "setuptools":
|
|
56
|
-
module_name = "pkg_resources"
|
|
57
|
-
|
|
58
|
-
try:
|
|
59
|
-
__import__(f"pip._vendor.{module_name}", globals(), locals(), level=0)
|
|
60
|
-
return getattr(pip._vendor, module_name)
|
|
61
|
-
except ImportError:
|
|
62
|
-
# We allow 'truststore' to fail to import due
|
|
63
|
-
# to being unavailable on Python 3.9 and earlier.
|
|
64
|
-
if module_name == "truststore" and sys.version_info < (3, 10):
|
|
65
|
-
return None
|
|
66
|
-
raise
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def get_vendor_version_from_module(module_name: str) -> str | None:
|
|
70
|
-
module = get_module_from_module_name(module_name)
|
|
71
|
-
version = getattr(module, "__version__", None)
|
|
72
|
-
|
|
73
|
-
if module and not version:
|
|
74
|
-
# Try to find version in debundled module info.
|
|
75
|
-
assert module.__file__ is not None
|
|
76
|
-
env = get_environment([os.path.dirname(module.__file__)])
|
|
77
|
-
dist = env.get_distribution(module_name)
|
|
78
|
-
if dist:
|
|
79
|
-
version = str(dist.version)
|
|
80
|
-
|
|
81
|
-
return version
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
def show_actual_vendor_versions(vendor_txt_versions: dict[str, str]) -> None:
|
|
85
|
-
"""Log the actual version and print extra info if there is
|
|
86
|
-
a conflict or if the actual version could not be imported.
|
|
87
|
-
"""
|
|
88
|
-
for module_name, expected_version in vendor_txt_versions.items():
|
|
89
|
-
extra_message = ""
|
|
90
|
-
actual_version = get_vendor_version_from_module(module_name)
|
|
91
|
-
if not actual_version:
|
|
92
|
-
extra_message = (
|
|
93
|
-
" (Unable to locate actual module version, using"
|
|
94
|
-
" vendor.txt specified version)"
|
|
95
|
-
)
|
|
96
|
-
actual_version = expected_version
|
|
97
|
-
elif parse_version(actual_version) != parse_version(expected_version):
|
|
98
|
-
extra_message = (
|
|
99
|
-
" (CONFLICT: vendor.txt suggests version should"
|
|
100
|
-
f" be {expected_version})"
|
|
101
|
-
)
|
|
102
|
-
logger.info("%s==%s%s", module_name, actual_version, extra_message)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
def show_vendor_versions() -> None:
|
|
106
|
-
logger.info("vendored library versions:")
|
|
107
|
-
|
|
108
|
-
vendor_txt_versions = create_vendor_txt_map()
|
|
109
|
-
with indent_log():
|
|
110
|
-
show_actual_vendor_versions(vendor_txt_versions)
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
def show_tags(options: Values) -> None:
|
|
114
|
-
tag_limit = 10
|
|
115
|
-
|
|
116
|
-
target_python = make_target_python(options)
|
|
117
|
-
tags = target_python.get_sorted_tags()
|
|
118
|
-
|
|
119
|
-
# Display the target options that were explicitly provided.
|
|
120
|
-
formatted_target = target_python.format_given()
|
|
121
|
-
suffix = ""
|
|
122
|
-
if formatted_target:
|
|
123
|
-
suffix = f" (target: {formatted_target})"
|
|
124
|
-
|
|
125
|
-
msg = f"Compatible tags: {len(tags)}{suffix}"
|
|
126
|
-
logger.info(msg)
|
|
127
|
-
|
|
128
|
-
if options.verbose < 1 and len(tags) > tag_limit:
|
|
129
|
-
tags_limited = True
|
|
130
|
-
tags = tags[:tag_limit]
|
|
131
|
-
else:
|
|
132
|
-
tags_limited = False
|
|
133
|
-
|
|
134
|
-
with indent_log():
|
|
135
|
-
for tag in tags:
|
|
136
|
-
logger.info(str(tag))
|
|
137
|
-
|
|
138
|
-
if tags_limited:
|
|
139
|
-
msg = f"...\n[First {tag_limit} tags shown. Pass --verbose to show all.]"
|
|
140
|
-
logger.info(msg)
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
def ca_bundle_info(config: Configuration) -> str:
|
|
144
|
-
levels = {key.split(".", 1)[0] for key, _ in config.items()}
|
|
145
|
-
if not levels:
|
|
146
|
-
return "Not specified"
|
|
147
|
-
|
|
148
|
-
levels_that_override_global = ["install", "wheel", "download"]
|
|
149
|
-
global_overriding_level = [
|
|
150
|
-
level for level in levels if level in levels_that_override_global
|
|
151
|
-
]
|
|
152
|
-
if not global_overriding_level:
|
|
153
|
-
return "global"
|
|
154
|
-
|
|
155
|
-
if "global" in levels:
|
|
156
|
-
levels.remove("global")
|
|
157
|
-
return ", ".join(levels)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
class DebugCommand(Command):
|
|
161
|
-
"""
|
|
162
|
-
Display debug information.
|
|
163
|
-
"""
|
|
164
|
-
|
|
165
|
-
usage = """
|
|
166
|
-
%prog <options>"""
|
|
167
|
-
ignore_require_venv = True
|
|
168
|
-
|
|
169
|
-
def add_options(self) -> None:
|
|
170
|
-
cmdoptions.add_target_python_options(self.cmd_opts)
|
|
171
|
-
self.parser.insert_option_group(0, self.cmd_opts)
|
|
172
|
-
self.parser.config.load()
|
|
173
|
-
|
|
174
|
-
def run(self, options: Values, args: list[str]) -> int:
|
|
175
|
-
logger.warning(
|
|
176
|
-
"This command is only meant for debugging. "
|
|
177
|
-
"Do not use this with automation for parsing and getting these "
|
|
178
|
-
"details, since the output and options of this command may "
|
|
179
|
-
"change without notice."
|
|
180
|
-
)
|
|
181
|
-
show_value("pip version", get_pip_version())
|
|
182
|
-
show_value("sys.version", sys.version)
|
|
183
|
-
show_value("sys.executable", sys.executable)
|
|
184
|
-
show_value("sys.getdefaultencoding", sys.getdefaultencoding())
|
|
185
|
-
show_value("sys.getfilesystemencoding", sys.getfilesystemencoding())
|
|
186
|
-
show_value(
|
|
187
|
-
"locale.getpreferredencoding",
|
|
188
|
-
locale.getpreferredencoding(),
|
|
189
|
-
)
|
|
190
|
-
show_value("sys.platform", sys.platform)
|
|
191
|
-
show_sys_implementation()
|
|
192
|
-
|
|
193
|
-
show_value("'cert' config value", ca_bundle_info(self.parser.config))
|
|
194
|
-
show_value("REQUESTS_CA_BUNDLE", os.environ.get("REQUESTS_CA_BUNDLE"))
|
|
195
|
-
show_value("CURL_CA_BUNDLE", os.environ.get("CURL_CA_BUNDLE"))
|
|
196
|
-
show_value("pip._vendor.certifi.where()", where())
|
|
197
|
-
show_value("pip._vendor.DEBUNDLED", pip._vendor.DEBUNDLED)
|
|
198
|
-
|
|
199
|
-
show_vendor_versions()
|
|
200
|
-
|
|
201
|
-
show_tags(options)
|
|
202
|
-
|
|
203
|
-
return SUCCESS
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import os
|
|
3
|
-
from optparse import Values
|
|
4
|
-
|
|
5
|
-
from pip._internal.cli import cmdoptions
|
|
6
|
-
from pip._internal.cli.cmdoptions import make_target_python
|
|
7
|
-
from pip._internal.cli.req_command import RequirementCommand, with_cleanup
|
|
8
|
-
from pip._internal.cli.status_codes import SUCCESS
|
|
9
|
-
from pip._internal.operations.build.build_tracker import get_build_tracker
|
|
10
|
-
from pip._internal.req.req_install import check_legacy_setup_py_options
|
|
11
|
-
from pip._internal.utils.misc import ensure_dir, normalize_path, write_output
|
|
12
|
-
from pip._internal.utils.temp_dir import TempDirectory
|
|
13
|
-
|
|
14
|
-
logger = logging.getLogger(__name__)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class DownloadCommand(RequirementCommand):
|
|
18
|
-
"""
|
|
19
|
-
Download packages from:
|
|
20
|
-
|
|
21
|
-
- PyPI (and other indexes) using requirement specifiers.
|
|
22
|
-
- VCS project urls.
|
|
23
|
-
- Local project directories.
|
|
24
|
-
- Local or remote source archives.
|
|
25
|
-
|
|
26
|
-
pip also supports downloading from "requirements files", which provide
|
|
27
|
-
an easy way to specify a whole environment to be downloaded.
|
|
28
|
-
"""
|
|
29
|
-
|
|
30
|
-
usage = """
|
|
31
|
-
%prog [options] <requirement specifier> [package-index-options] ...
|
|
32
|
-
%prog [options] -r <requirements file> [package-index-options] ...
|
|
33
|
-
%prog [options] <vcs project url> ...
|
|
34
|
-
%prog [options] <local project path> ...
|
|
35
|
-
%prog [options] <archive url/path> ..."""
|
|
36
|
-
|
|
37
|
-
def add_options(self) -> None:
|
|
38
|
-
self.cmd_opts.add_option(cmdoptions.constraints())
|
|
39
|
-
self.cmd_opts.add_option(cmdoptions.requirements())
|
|
40
|
-
self.cmd_opts.add_option(cmdoptions.no_deps())
|
|
41
|
-
self.cmd_opts.add_option(cmdoptions.global_options())
|
|
42
|
-
self.cmd_opts.add_option(cmdoptions.no_binary())
|
|
43
|
-
self.cmd_opts.add_option(cmdoptions.only_binary())
|
|
44
|
-
self.cmd_opts.add_option(cmdoptions.prefer_binary())
|
|
45
|
-
self.cmd_opts.add_option(cmdoptions.src())
|
|
46
|
-
self.cmd_opts.add_option(cmdoptions.pre())
|
|
47
|
-
self.cmd_opts.add_option(cmdoptions.require_hashes())
|
|
48
|
-
self.cmd_opts.add_option(cmdoptions.progress_bar())
|
|
49
|
-
self.cmd_opts.add_option(cmdoptions.no_build_isolation())
|
|
50
|
-
self.cmd_opts.add_option(cmdoptions.use_pep517())
|
|
51
|
-
self.cmd_opts.add_option(cmdoptions.no_use_pep517())
|
|
52
|
-
self.cmd_opts.add_option(cmdoptions.check_build_deps())
|
|
53
|
-
self.cmd_opts.add_option(cmdoptions.ignore_requires_python())
|
|
54
|
-
|
|
55
|
-
self.cmd_opts.add_option(
|
|
56
|
-
"-d",
|
|
57
|
-
"--dest",
|
|
58
|
-
"--destination-dir",
|
|
59
|
-
"--destination-directory",
|
|
60
|
-
dest="download_dir",
|
|
61
|
-
metavar="dir",
|
|
62
|
-
default=os.curdir,
|
|
63
|
-
help="Download packages into <dir>.",
|
|
64
|
-
)
|
|
65
|
-
|
|
66
|
-
cmdoptions.add_target_python_options(self.cmd_opts)
|
|
67
|
-
|
|
68
|
-
index_opts = cmdoptions.make_option_group(
|
|
69
|
-
cmdoptions.index_group,
|
|
70
|
-
self.parser,
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
self.parser.insert_option_group(0, index_opts)
|
|
74
|
-
self.parser.insert_option_group(0, self.cmd_opts)
|
|
75
|
-
|
|
76
|
-
@with_cleanup
|
|
77
|
-
def run(self, options: Values, args: list[str]) -> int:
|
|
78
|
-
options.ignore_installed = True
|
|
79
|
-
# editable doesn't really make sense for `pip download`, but the bowels
|
|
80
|
-
# of the RequirementSet code require that property.
|
|
81
|
-
options.editables = []
|
|
82
|
-
|
|
83
|
-
cmdoptions.check_dist_restriction(options)
|
|
84
|
-
|
|
85
|
-
options.download_dir = normalize_path(options.download_dir)
|
|
86
|
-
ensure_dir(options.download_dir)
|
|
87
|
-
|
|
88
|
-
session = self.get_default_session(options)
|
|
89
|
-
|
|
90
|
-
target_python = make_target_python(options)
|
|
91
|
-
finder = self._build_package_finder(
|
|
92
|
-
options=options,
|
|
93
|
-
session=session,
|
|
94
|
-
target_python=target_python,
|
|
95
|
-
ignore_requires_python=options.ignore_requires_python,
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
build_tracker = self.enter_context(get_build_tracker())
|
|
99
|
-
|
|
100
|
-
directory = TempDirectory(
|
|
101
|
-
delete=not options.no_clean,
|
|
102
|
-
kind="download",
|
|
103
|
-
globally_managed=True,
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
reqs = self.get_requirements(args, options, finder, session)
|
|
107
|
-
check_legacy_setup_py_options(options, reqs)
|
|
108
|
-
|
|
109
|
-
preparer = self.make_requirement_preparer(
|
|
110
|
-
temp_build_dir=directory,
|
|
111
|
-
options=options,
|
|
112
|
-
build_tracker=build_tracker,
|
|
113
|
-
session=session,
|
|
114
|
-
finder=finder,
|
|
115
|
-
download_dir=options.download_dir,
|
|
116
|
-
use_user_site=False,
|
|
117
|
-
verbosity=self.verbosity,
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
resolver = self.make_resolver(
|
|
121
|
-
preparer=preparer,
|
|
122
|
-
finder=finder,
|
|
123
|
-
options=options,
|
|
124
|
-
ignore_requires_python=options.ignore_requires_python,
|
|
125
|
-
use_pep517=options.use_pep517,
|
|
126
|
-
py_version_info=options.python_version,
|
|
127
|
-
)
|
|
128
|
-
|
|
129
|
-
self.trace_basic_info(finder)
|
|
130
|
-
|
|
131
|
-
requirement_set = resolver.resolve(reqs, check_supported_wheels=True)
|
|
132
|
-
|
|
133
|
-
downloaded: list[str] = []
|
|
134
|
-
for req in requirement_set.requirements.values():
|
|
135
|
-
if req.satisfied_by is None:
|
|
136
|
-
assert req.name is not None
|
|
137
|
-
preparer.save_linked_requirement(req)
|
|
138
|
-
downloaded.append(req.name)
|
|
139
|
-
|
|
140
|
-
preparer.prepare_linked_requirements_more(requirement_set.requirements.values())
|
|
141
|
-
|
|
142
|
-
if downloaded:
|
|
143
|
-
write_output("Successfully downloaded %s", " ".join(downloaded))
|
|
144
|
-
|
|
145
|
-
return SUCCESS
|