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,188 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import dataclasses
|
|
4
|
-
import re
|
|
5
|
-
from collections.abc import Iterable
|
|
6
|
-
from dataclasses import dataclass
|
|
7
|
-
from pathlib import Path
|
|
8
|
-
from typing import TYPE_CHECKING, Any
|
|
9
|
-
|
|
10
|
-
from pip._vendor import tomli_w
|
|
11
|
-
|
|
12
|
-
from pip._internal.models.direct_url import ArchiveInfo, DirInfo, VcsInfo
|
|
13
|
-
from pip._internal.models.link import Link
|
|
14
|
-
from pip._internal.req.req_install import InstallRequirement
|
|
15
|
-
from pip._internal.utils.urls import url_to_path
|
|
16
|
-
|
|
17
|
-
if TYPE_CHECKING:
|
|
18
|
-
from typing_extensions import Self
|
|
19
|
-
|
|
20
|
-
PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$")
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def is_valid_pylock_file_name(path: Path) -> bool:
|
|
24
|
-
return path.name == "pylock.toml" or bool(re.match(PYLOCK_FILE_NAME_RE, path.name))
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def _toml_dict_factory(data: list[tuple[str, Any]]) -> dict[str, Any]:
|
|
28
|
-
return {key.replace("_", "-"): value for key, value in data if value is not None}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
@dataclass
|
|
32
|
-
class PackageVcs:
|
|
33
|
-
type: str
|
|
34
|
-
url: str | None
|
|
35
|
-
# (not supported) path: Optional[str]
|
|
36
|
-
requested_revision: str | None
|
|
37
|
-
commit_id: str
|
|
38
|
-
subdirectory: str | None
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@dataclass
|
|
42
|
-
class PackageDirectory:
|
|
43
|
-
path: str
|
|
44
|
-
editable: bool | None
|
|
45
|
-
subdirectory: str | None
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@dataclass
|
|
49
|
-
class PackageArchive:
|
|
50
|
-
url: str | None
|
|
51
|
-
# (not supported) path: Optional[str]
|
|
52
|
-
# (not supported) size: Optional[int]
|
|
53
|
-
# (not supported) upload_time: Optional[datetime]
|
|
54
|
-
hashes: dict[str, str]
|
|
55
|
-
subdirectory: str | None
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
@dataclass
|
|
59
|
-
class PackageSdist:
|
|
60
|
-
name: str
|
|
61
|
-
# (not supported) upload_time: Optional[datetime]
|
|
62
|
-
url: str | None
|
|
63
|
-
# (not supported) path: Optional[str]
|
|
64
|
-
# (not supported) size: Optional[int]
|
|
65
|
-
hashes: dict[str, str]
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
@dataclass
|
|
69
|
-
class PackageWheel:
|
|
70
|
-
name: str
|
|
71
|
-
# (not supported) upload_time: Optional[datetime]
|
|
72
|
-
url: str | None
|
|
73
|
-
# (not supported) path: Optional[str]
|
|
74
|
-
# (not supported) size: Optional[int]
|
|
75
|
-
hashes: dict[str, str]
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@dataclass
|
|
79
|
-
class Package:
|
|
80
|
-
name: str
|
|
81
|
-
version: str | None = None
|
|
82
|
-
# (not supported) marker: Optional[str]
|
|
83
|
-
# (not supported) requires_python: Optional[str]
|
|
84
|
-
# (not supported) dependencies
|
|
85
|
-
vcs: PackageVcs | None = None
|
|
86
|
-
directory: PackageDirectory | None = None
|
|
87
|
-
archive: PackageArchive | None = None
|
|
88
|
-
# (not supported) index: Optional[str]
|
|
89
|
-
sdist: PackageSdist | None = None
|
|
90
|
-
wheels: list[PackageWheel] | None = None
|
|
91
|
-
# (not supported) attestation_identities: Optional[List[Dict[str, Any]]]
|
|
92
|
-
# (not supported) tool: Optional[Dict[str, Any]]
|
|
93
|
-
|
|
94
|
-
@classmethod
|
|
95
|
-
def from_install_requirement(cls, ireq: InstallRequirement, base_dir: Path) -> Self:
|
|
96
|
-
base_dir = base_dir.resolve()
|
|
97
|
-
dist = ireq.get_dist()
|
|
98
|
-
download_info = ireq.download_info
|
|
99
|
-
assert download_info
|
|
100
|
-
package = cls(name=dist.canonical_name)
|
|
101
|
-
if ireq.is_direct:
|
|
102
|
-
if isinstance(download_info.info, VcsInfo):
|
|
103
|
-
package.vcs = PackageVcs(
|
|
104
|
-
type=download_info.info.vcs,
|
|
105
|
-
url=download_info.url,
|
|
106
|
-
requested_revision=download_info.info.requested_revision,
|
|
107
|
-
commit_id=download_info.info.commit_id,
|
|
108
|
-
subdirectory=download_info.subdirectory,
|
|
109
|
-
)
|
|
110
|
-
elif isinstance(download_info.info, DirInfo):
|
|
111
|
-
package.directory = PackageDirectory(
|
|
112
|
-
path=(
|
|
113
|
-
Path(url_to_path(download_info.url))
|
|
114
|
-
.resolve()
|
|
115
|
-
.relative_to(base_dir)
|
|
116
|
-
.as_posix()
|
|
117
|
-
),
|
|
118
|
-
editable=(
|
|
119
|
-
download_info.info.editable
|
|
120
|
-
if download_info.info.editable
|
|
121
|
-
else None
|
|
122
|
-
),
|
|
123
|
-
subdirectory=download_info.subdirectory,
|
|
124
|
-
)
|
|
125
|
-
elif isinstance(download_info.info, ArchiveInfo):
|
|
126
|
-
if not download_info.info.hashes:
|
|
127
|
-
raise NotImplementedError()
|
|
128
|
-
package.archive = PackageArchive(
|
|
129
|
-
url=download_info.url,
|
|
130
|
-
hashes=download_info.info.hashes,
|
|
131
|
-
subdirectory=download_info.subdirectory,
|
|
132
|
-
)
|
|
133
|
-
else:
|
|
134
|
-
# should never happen
|
|
135
|
-
raise NotImplementedError()
|
|
136
|
-
else:
|
|
137
|
-
package.version = str(dist.version)
|
|
138
|
-
if isinstance(download_info.info, ArchiveInfo):
|
|
139
|
-
if not download_info.info.hashes:
|
|
140
|
-
raise NotImplementedError()
|
|
141
|
-
link = Link(download_info.url)
|
|
142
|
-
if link.is_wheel:
|
|
143
|
-
package.wheels = [
|
|
144
|
-
PackageWheel(
|
|
145
|
-
name=link.filename,
|
|
146
|
-
url=download_info.url,
|
|
147
|
-
hashes=download_info.info.hashes,
|
|
148
|
-
)
|
|
149
|
-
]
|
|
150
|
-
else:
|
|
151
|
-
package.sdist = PackageSdist(
|
|
152
|
-
name=link.filename,
|
|
153
|
-
url=download_info.url,
|
|
154
|
-
hashes=download_info.info.hashes,
|
|
155
|
-
)
|
|
156
|
-
else:
|
|
157
|
-
# should never happen
|
|
158
|
-
raise NotImplementedError()
|
|
159
|
-
return package
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
@dataclass
|
|
163
|
-
class Pylock:
|
|
164
|
-
lock_version: str = "1.0"
|
|
165
|
-
# (not supported) environments: Optional[List[str]]
|
|
166
|
-
# (not supported) requires_python: Optional[str]
|
|
167
|
-
# (not supported) extras: List[str] = []
|
|
168
|
-
# (not supported) dependency_groups: List[str] = []
|
|
169
|
-
created_by: str = "pip"
|
|
170
|
-
packages: list[Package] = dataclasses.field(default_factory=list)
|
|
171
|
-
# (not supported) tool: Optional[Dict[str, Any]]
|
|
172
|
-
|
|
173
|
-
def as_toml(self) -> str:
|
|
174
|
-
return tomli_w.dumps(dataclasses.asdict(self, dict_factory=_toml_dict_factory))
|
|
175
|
-
|
|
176
|
-
@classmethod
|
|
177
|
-
def from_install_requirements(
|
|
178
|
-
cls, install_requirements: Iterable[InstallRequirement], base_dir: Path
|
|
179
|
-
) -> Self:
|
|
180
|
-
return cls(
|
|
181
|
-
packages=sorted(
|
|
182
|
-
(
|
|
183
|
-
Package.from_install_requirement(ireq, base_dir)
|
|
184
|
-
for ireq in install_requirements
|
|
185
|
-
),
|
|
186
|
-
key=lambda p: p.name,
|
|
187
|
-
)
|
|
188
|
-
)
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
For types associated with installation schemes.
|
|
3
|
-
|
|
4
|
-
For a general overview of available schemes and their context, see
|
|
5
|
-
https://docs.python.org/3/install/index.html#alternate-installation.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from dataclasses import dataclass
|
|
9
|
-
|
|
10
|
-
SCHEME_KEYS = ["platlib", "purelib", "headers", "scripts", "data"]
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@dataclass(frozen=True)
|
|
14
|
-
class Scheme:
|
|
15
|
-
"""A Scheme holds paths which are used as the base directories for
|
|
16
|
-
artifacts associated with a Python package.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
__slots__ = SCHEME_KEYS
|
|
20
|
-
|
|
21
|
-
platlib: str
|
|
22
|
-
purelib: str
|
|
23
|
-
headers: str
|
|
24
|
-
scripts: str
|
|
25
|
-
data: str
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import itertools
|
|
2
|
-
import logging
|
|
3
|
-
import os
|
|
4
|
-
import posixpath
|
|
5
|
-
import urllib.parse
|
|
6
|
-
from dataclasses import dataclass
|
|
7
|
-
|
|
8
|
-
from pip._vendor.packaging.utils import canonicalize_name
|
|
9
|
-
|
|
10
|
-
from pip._internal.models.index import PyPI
|
|
11
|
-
from pip._internal.utils.compat import has_tls
|
|
12
|
-
from pip._internal.utils.misc import normalize_path, redact_auth_from_url
|
|
13
|
-
|
|
14
|
-
logger = logging.getLogger(__name__)
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@dataclass(frozen=True)
|
|
18
|
-
class SearchScope:
|
|
19
|
-
"""
|
|
20
|
-
Encapsulates the locations that pip is configured to search.
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
__slots__ = ["find_links", "index_urls", "no_index"]
|
|
24
|
-
|
|
25
|
-
find_links: list[str]
|
|
26
|
-
index_urls: list[str]
|
|
27
|
-
no_index: bool
|
|
28
|
-
|
|
29
|
-
@classmethod
|
|
30
|
-
def create(
|
|
31
|
-
cls,
|
|
32
|
-
find_links: list[str],
|
|
33
|
-
index_urls: list[str],
|
|
34
|
-
no_index: bool,
|
|
35
|
-
) -> "SearchScope":
|
|
36
|
-
"""
|
|
37
|
-
Create a SearchScope object after normalizing the `find_links`.
|
|
38
|
-
"""
|
|
39
|
-
# Build find_links. If an argument starts with ~, it may be
|
|
40
|
-
# a local file relative to a home directory. So try normalizing
|
|
41
|
-
# it and if it exists, use the normalized version.
|
|
42
|
-
# This is deliberately conservative - it might be fine just to
|
|
43
|
-
# blindly normalize anything starting with a ~...
|
|
44
|
-
built_find_links: list[str] = []
|
|
45
|
-
for link in find_links:
|
|
46
|
-
if link.startswith("~"):
|
|
47
|
-
new_link = normalize_path(link)
|
|
48
|
-
if os.path.exists(new_link):
|
|
49
|
-
link = new_link
|
|
50
|
-
built_find_links.append(link)
|
|
51
|
-
|
|
52
|
-
# If we don't have TLS enabled, then WARN if anyplace we're looking
|
|
53
|
-
# relies on TLS.
|
|
54
|
-
if not has_tls():
|
|
55
|
-
for link in itertools.chain(index_urls, built_find_links):
|
|
56
|
-
parsed = urllib.parse.urlparse(link)
|
|
57
|
-
if parsed.scheme == "https":
|
|
58
|
-
logger.warning(
|
|
59
|
-
"pip is configured with locations that require "
|
|
60
|
-
"TLS/SSL, however the ssl module in Python is not "
|
|
61
|
-
"available."
|
|
62
|
-
)
|
|
63
|
-
break
|
|
64
|
-
|
|
65
|
-
return cls(
|
|
66
|
-
find_links=built_find_links,
|
|
67
|
-
index_urls=index_urls,
|
|
68
|
-
no_index=no_index,
|
|
69
|
-
)
|
|
70
|
-
|
|
71
|
-
def get_formatted_locations(self) -> str:
|
|
72
|
-
lines = []
|
|
73
|
-
redacted_index_urls = []
|
|
74
|
-
if self.index_urls and self.index_urls != [PyPI.simple_url]:
|
|
75
|
-
for url in self.index_urls:
|
|
76
|
-
redacted_index_url = redact_auth_from_url(url)
|
|
77
|
-
|
|
78
|
-
# Parse the URL
|
|
79
|
-
purl = urllib.parse.urlsplit(redacted_index_url)
|
|
80
|
-
|
|
81
|
-
# URL is generally invalid if scheme and netloc is missing
|
|
82
|
-
# there are issues with Python and URL parsing, so this test
|
|
83
|
-
# is a bit crude. See bpo-20271, bpo-23505. Python doesn't
|
|
84
|
-
# always parse invalid URLs correctly - it should raise
|
|
85
|
-
# exceptions for malformed URLs
|
|
86
|
-
if not purl.scheme and not purl.netloc:
|
|
87
|
-
logger.warning(
|
|
88
|
-
'The index url "%s" seems invalid, please provide a scheme.',
|
|
89
|
-
redacted_index_url,
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
redacted_index_urls.append(redacted_index_url)
|
|
93
|
-
|
|
94
|
-
lines.append(
|
|
95
|
-
"Looking in indexes: {}".format(", ".join(redacted_index_urls))
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
if self.find_links:
|
|
99
|
-
lines.append(
|
|
100
|
-
"Looking in links: {}".format(
|
|
101
|
-
", ".join(redact_auth_from_url(url) for url in self.find_links)
|
|
102
|
-
)
|
|
103
|
-
)
|
|
104
|
-
return "\n".join(lines)
|
|
105
|
-
|
|
106
|
-
def get_index_urls_locations(self, project_name: str) -> list[str]:
|
|
107
|
-
"""Returns the locations found via self.index_urls
|
|
108
|
-
|
|
109
|
-
Checks the url_name on the main (first in the list) index and
|
|
110
|
-
use this url_name to produce all locations
|
|
111
|
-
"""
|
|
112
|
-
|
|
113
|
-
def mkurl_pypi_url(url: str) -> str:
|
|
114
|
-
loc = posixpath.join(
|
|
115
|
-
url, urllib.parse.quote(canonicalize_name(project_name))
|
|
116
|
-
)
|
|
117
|
-
# For maximum compatibility with easy_install, ensure the path
|
|
118
|
-
# ends in a trailing slash. Although this isn't in the spec
|
|
119
|
-
# (and PyPI can handle it without the slash) some other index
|
|
120
|
-
# implementations might break if they relied on easy_install's
|
|
121
|
-
# behavior.
|
|
122
|
-
if not loc.endswith("/"):
|
|
123
|
-
loc = loc + "/"
|
|
124
|
-
return loc
|
|
125
|
-
|
|
126
|
-
return [mkurl_pypi_url(url) for url in self.index_urls]
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
from pip._internal.models.format_control import FormatControl
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# TODO: This needs Python 3.10's improved slots support for dataclasses
|
|
7
|
-
# to be converted into a dataclass.
|
|
8
|
-
class SelectionPreferences:
|
|
9
|
-
"""
|
|
10
|
-
Encapsulates the candidate selection preferences for downloading
|
|
11
|
-
and installing files.
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
__slots__ = [
|
|
15
|
-
"allow_yanked",
|
|
16
|
-
"allow_all_prereleases",
|
|
17
|
-
"format_control",
|
|
18
|
-
"prefer_binary",
|
|
19
|
-
"ignore_requires_python",
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
# Don't include an allow_yanked default value to make sure each call
|
|
23
|
-
# site considers whether yanked releases are allowed. This also causes
|
|
24
|
-
# that decision to be made explicit in the calling code, which helps
|
|
25
|
-
# people when reading the code.
|
|
26
|
-
def __init__(
|
|
27
|
-
self,
|
|
28
|
-
allow_yanked: bool,
|
|
29
|
-
allow_all_prereleases: bool = False,
|
|
30
|
-
format_control: FormatControl | None = None,
|
|
31
|
-
prefer_binary: bool = False,
|
|
32
|
-
ignore_requires_python: bool | None = None,
|
|
33
|
-
) -> None:
|
|
34
|
-
"""Create a SelectionPreferences object.
|
|
35
|
-
|
|
36
|
-
:param allow_yanked: Whether files marked as yanked (in the sense
|
|
37
|
-
of PEP 592) are permitted to be candidates for install.
|
|
38
|
-
:param format_control: A FormatControl object or None. Used to control
|
|
39
|
-
the selection of source packages / binary packages when consulting
|
|
40
|
-
the index and links.
|
|
41
|
-
:param prefer_binary: Whether to prefer an old, but valid, binary
|
|
42
|
-
dist over a new source dist.
|
|
43
|
-
:param ignore_requires_python: Whether to ignore incompatible
|
|
44
|
-
"Requires-Python" values in links. Defaults to False.
|
|
45
|
-
"""
|
|
46
|
-
if ignore_requires_python is None:
|
|
47
|
-
ignore_requires_python = False
|
|
48
|
-
|
|
49
|
-
self.allow_yanked = allow_yanked
|
|
50
|
-
self.allow_all_prereleases = allow_all_prereleases
|
|
51
|
-
self.format_control = format_control
|
|
52
|
-
self.prefer_binary = prefer_binary
|
|
53
|
-
self.ignore_requires_python = ignore_requires_python
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import sys
|
|
4
|
-
|
|
5
|
-
from pip._vendor.packaging.tags import Tag
|
|
6
|
-
|
|
7
|
-
from pip._internal.utils.compatibility_tags import get_supported, version_info_to_nodot
|
|
8
|
-
from pip._internal.utils.misc import normalize_version_info
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class TargetPython:
|
|
12
|
-
"""
|
|
13
|
-
Encapsulates the properties of a Python interpreter one is targeting
|
|
14
|
-
for a package install, download, etc.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
__slots__ = [
|
|
18
|
-
"_given_py_version_info",
|
|
19
|
-
"abis",
|
|
20
|
-
"implementation",
|
|
21
|
-
"platforms",
|
|
22
|
-
"py_version",
|
|
23
|
-
"py_version_info",
|
|
24
|
-
"_valid_tags",
|
|
25
|
-
"_valid_tags_set",
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
def __init__(
|
|
29
|
-
self,
|
|
30
|
-
platforms: list[str] | None = None,
|
|
31
|
-
py_version_info: tuple[int, ...] | None = None,
|
|
32
|
-
abis: list[str] | None = None,
|
|
33
|
-
implementation: str | None = None,
|
|
34
|
-
) -> None:
|
|
35
|
-
"""
|
|
36
|
-
:param platforms: A list of strings or None. If None, searches for
|
|
37
|
-
packages that are supported by the current system. Otherwise, will
|
|
38
|
-
find packages that can be built on the platforms passed in. These
|
|
39
|
-
packages will only be downloaded for distribution: they will
|
|
40
|
-
not be built locally.
|
|
41
|
-
:param py_version_info: An optional tuple of ints representing the
|
|
42
|
-
Python version information to use (e.g. `sys.version_info[:3]`).
|
|
43
|
-
This can have length 1, 2, or 3 when provided.
|
|
44
|
-
:param abis: A list of strings or None. This is passed to
|
|
45
|
-
compatibility_tags.py's get_supported() function as is.
|
|
46
|
-
:param implementation: A string or None. This is passed to
|
|
47
|
-
compatibility_tags.py's get_supported() function as is.
|
|
48
|
-
"""
|
|
49
|
-
# Store the given py_version_info for when we call get_supported().
|
|
50
|
-
self._given_py_version_info = py_version_info
|
|
51
|
-
|
|
52
|
-
if py_version_info is None:
|
|
53
|
-
py_version_info = sys.version_info[:3]
|
|
54
|
-
else:
|
|
55
|
-
py_version_info = normalize_version_info(py_version_info)
|
|
56
|
-
|
|
57
|
-
py_version = ".".join(map(str, py_version_info[:2]))
|
|
58
|
-
|
|
59
|
-
self.abis = abis
|
|
60
|
-
self.implementation = implementation
|
|
61
|
-
self.platforms = platforms
|
|
62
|
-
self.py_version = py_version
|
|
63
|
-
self.py_version_info = py_version_info
|
|
64
|
-
|
|
65
|
-
# This is used to cache the return value of get_(un)sorted_tags.
|
|
66
|
-
self._valid_tags: list[Tag] | None = None
|
|
67
|
-
self._valid_tags_set: set[Tag] | None = None
|
|
68
|
-
|
|
69
|
-
def format_given(self) -> str:
|
|
70
|
-
"""
|
|
71
|
-
Format the given, non-None attributes for display.
|
|
72
|
-
"""
|
|
73
|
-
display_version = None
|
|
74
|
-
if self._given_py_version_info is not None:
|
|
75
|
-
display_version = ".".join(
|
|
76
|
-
str(part) for part in self._given_py_version_info
|
|
77
|
-
)
|
|
78
|
-
|
|
79
|
-
key_values = [
|
|
80
|
-
("platforms", self.platforms),
|
|
81
|
-
("version_info", display_version),
|
|
82
|
-
("abis", self.abis),
|
|
83
|
-
("implementation", self.implementation),
|
|
84
|
-
]
|
|
85
|
-
return " ".join(
|
|
86
|
-
f"{key}={value!r}" for key, value in key_values if value is not None
|
|
87
|
-
)
|
|
88
|
-
|
|
89
|
-
def get_sorted_tags(self) -> list[Tag]:
|
|
90
|
-
"""
|
|
91
|
-
Return the supported PEP 425 tags to check wheel candidates against.
|
|
92
|
-
|
|
93
|
-
The tags are returned in order of preference (most preferred first).
|
|
94
|
-
"""
|
|
95
|
-
if self._valid_tags is None:
|
|
96
|
-
# Pass versions=None if no py_version_info was given since
|
|
97
|
-
# versions=None uses special default logic.
|
|
98
|
-
py_version_info = self._given_py_version_info
|
|
99
|
-
if py_version_info is None:
|
|
100
|
-
version = None
|
|
101
|
-
else:
|
|
102
|
-
version = version_info_to_nodot(py_version_info)
|
|
103
|
-
|
|
104
|
-
tags = get_supported(
|
|
105
|
-
version=version,
|
|
106
|
-
platforms=self.platforms,
|
|
107
|
-
abis=self.abis,
|
|
108
|
-
impl=self.implementation,
|
|
109
|
-
)
|
|
110
|
-
self._valid_tags = tags
|
|
111
|
-
|
|
112
|
-
return self._valid_tags
|
|
113
|
-
|
|
114
|
-
def get_unsorted_tags(self) -> set[Tag]:
|
|
115
|
-
"""Exactly the same as get_sorted_tags, but returns a set.
|
|
116
|
-
|
|
117
|
-
This is important for performance.
|
|
118
|
-
"""
|
|
119
|
-
if self._valid_tags_set is None:
|
|
120
|
-
self._valid_tags_set = set(self.get_sorted_tags())
|
|
121
|
-
|
|
122
|
-
return self._valid_tags_set
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"""Represents a wheel file and provides access to the various parts of the
|
|
2
|
-
name that have meaning.
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
import re
|
|
8
|
-
from collections.abc import Iterable
|
|
9
|
-
|
|
10
|
-
from pip._vendor.packaging.tags import Tag
|
|
11
|
-
from pip._vendor.packaging.utils import BuildTag, parse_wheel_filename
|
|
12
|
-
from pip._vendor.packaging.utils import (
|
|
13
|
-
InvalidWheelFilename as _PackagingInvalidWheelFilename,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
|
-
from pip._internal.exceptions import InvalidWheelFilename
|
|
17
|
-
from pip._internal.utils.deprecation import deprecated
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class Wheel:
|
|
21
|
-
"""A wheel file"""
|
|
22
|
-
|
|
23
|
-
legacy_wheel_file_re = re.compile(
|
|
24
|
-
r"""^(?P<namever>(?P<name>[^\s-]+?)-(?P<ver>[^\s-]*?))
|
|
25
|
-
((-(?P<build>\d[^-]*?))?-(?P<pyver>[^\s-]+?)-(?P<abi>[^\s-]+?)-(?P<plat>[^\s-]+?)
|
|
26
|
-
\.whl|\.dist-info)$""",
|
|
27
|
-
re.VERBOSE,
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
def __init__(self, filename: str) -> None:
|
|
31
|
-
self.filename = filename
|
|
32
|
-
|
|
33
|
-
# To make mypy happy specify type hints that can come from either
|
|
34
|
-
# parse_wheel_filename or the legacy_wheel_file_re match.
|
|
35
|
-
self.name: str
|
|
36
|
-
self._build_tag: BuildTag | None = None
|
|
37
|
-
|
|
38
|
-
try:
|
|
39
|
-
wheel_info = parse_wheel_filename(filename)
|
|
40
|
-
self.name, _version, self._build_tag, self.file_tags = wheel_info
|
|
41
|
-
self.version = str(_version)
|
|
42
|
-
except _PackagingInvalidWheelFilename as e:
|
|
43
|
-
# Check if the wheel filename is in the legacy format
|
|
44
|
-
legacy_wheel_info = self.legacy_wheel_file_re.match(filename)
|
|
45
|
-
if not legacy_wheel_info:
|
|
46
|
-
raise InvalidWheelFilename(e.args[0]) from None
|
|
47
|
-
|
|
48
|
-
deprecated(
|
|
49
|
-
reason=(
|
|
50
|
-
f"Wheel filename {filename!r} is not correctly normalised. "
|
|
51
|
-
"Future versions of pip will raise the following error:\n"
|
|
52
|
-
f"{e.args[0]}\n\n"
|
|
53
|
-
),
|
|
54
|
-
replacement=(
|
|
55
|
-
"to rename the wheel to use a correctly normalised "
|
|
56
|
-
"name (this may require updating the version in "
|
|
57
|
-
"the project metadata)"
|
|
58
|
-
),
|
|
59
|
-
gone_in="25.3",
|
|
60
|
-
issue=12938,
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
self.name = legacy_wheel_info.group("name").replace("_", "-")
|
|
64
|
-
self.version = legacy_wheel_info.group("ver").replace("_", "-")
|
|
65
|
-
|
|
66
|
-
# Generate the file tags from the legacy wheel filename
|
|
67
|
-
pyversions = legacy_wheel_info.group("pyver").split(".")
|
|
68
|
-
abis = legacy_wheel_info.group("abi").split(".")
|
|
69
|
-
plats = legacy_wheel_info.group("plat").split(".")
|
|
70
|
-
self.file_tags = frozenset(
|
|
71
|
-
Tag(interpreter=py, abi=abi, platform=plat)
|
|
72
|
-
for py in pyversions
|
|
73
|
-
for abi in abis
|
|
74
|
-
for plat in plats
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
@property
|
|
78
|
-
def build_tag(self) -> BuildTag:
|
|
79
|
-
if self._build_tag is not None:
|
|
80
|
-
return self._build_tag
|
|
81
|
-
|
|
82
|
-
# Parse the build tag from the legacy wheel filename
|
|
83
|
-
legacy_wheel_info = self.legacy_wheel_file_re.match(self.filename)
|
|
84
|
-
assert legacy_wheel_info is not None, "guaranteed by filename validation"
|
|
85
|
-
build_tag = legacy_wheel_info.group("build")
|
|
86
|
-
match = re.match(r"^(\d+)(.*)$", build_tag)
|
|
87
|
-
assert match is not None, "guaranteed by filename validation"
|
|
88
|
-
build_tag_groups = match.groups()
|
|
89
|
-
self._build_tag = (int(build_tag_groups[0]), build_tag_groups[1])
|
|
90
|
-
|
|
91
|
-
return self._build_tag
|
|
92
|
-
|
|
93
|
-
def get_formatted_file_tags(self) -> list[str]:
|
|
94
|
-
"""Return the wheel's tags as a sorted list of strings."""
|
|
95
|
-
return sorted(str(tag) for tag in self.file_tags)
|
|
96
|
-
|
|
97
|
-
def support_index_min(self, tags: list[Tag]) -> int:
|
|
98
|
-
"""Return the lowest index that one of the wheel's file_tag combinations
|
|
99
|
-
achieves in the given list of supported tags.
|
|
100
|
-
|
|
101
|
-
For example, if there are 8 supported tags and one of the file tags
|
|
102
|
-
is first in the list, then return 0.
|
|
103
|
-
|
|
104
|
-
:param tags: the PEP 425 tags to check the wheel against, in order
|
|
105
|
-
with most preferred first.
|
|
106
|
-
|
|
107
|
-
:raises ValueError: If none of the wheel's file tags match one of
|
|
108
|
-
the supported tags.
|
|
109
|
-
"""
|
|
110
|
-
try:
|
|
111
|
-
return next(i for i, t in enumerate(tags) if t in self.file_tags)
|
|
112
|
-
except StopIteration:
|
|
113
|
-
raise ValueError()
|
|
114
|
-
|
|
115
|
-
def find_most_preferred_tag(
|
|
116
|
-
self, tags: list[Tag], tag_to_priority: dict[Tag, int]
|
|
117
|
-
) -> int:
|
|
118
|
-
"""Return the priority of the most preferred tag that one of the wheel's file
|
|
119
|
-
tag combinations achieves in the given list of supported tags using the given
|
|
120
|
-
tag_to_priority mapping, where lower priorities are more-preferred.
|
|
121
|
-
|
|
122
|
-
This is used in place of support_index_min in some cases in order to avoid
|
|
123
|
-
an expensive linear scan of a large list of tags.
|
|
124
|
-
|
|
125
|
-
:param tags: the PEP 425 tags to check the wheel against.
|
|
126
|
-
:param tag_to_priority: a mapping from tag to priority of that tag, where
|
|
127
|
-
lower is more preferred.
|
|
128
|
-
|
|
129
|
-
:raises ValueError: If none of the wheel's file tags match one of
|
|
130
|
-
the supported tags.
|
|
131
|
-
"""
|
|
132
|
-
return min(
|
|
133
|
-
tag_to_priority[tag] for tag in self.file_tags if tag in tag_to_priority
|
|
134
|
-
)
|
|
135
|
-
|
|
136
|
-
def supported(self, tags: Iterable[Tag]) -> bool:
|
|
137
|
-
"""Return whether the wheel is compatible with one of the given tags.
|
|
138
|
-
|
|
139
|
-
:param tags: the PEP 425 tags to check the wheel against.
|
|
140
|
-
"""
|
|
141
|
-
return not self.file_tags.isdisjoint(tags)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"""Contains purely network-related utilities."""
|