kpip 0.0.1__tar.gz
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.
- kpip-0.0.1/.gitattributes +1 -0
- kpip-0.0.1/.github/FUNDING.yml +1 -0
- kpip-0.0.1/.github/workflows/checks.yml +100 -0
- kpip-0.0.1/.github/workflows/codspeed.yml +39 -0
- kpip-0.0.1/.gitignore +17 -0
- kpip-0.0.1/LICENSE.txt +20 -0
- kpip-0.0.1/PKG-INFO +240 -0
- kpip-0.0.1/README.md +213 -0
- kpip-0.0.1/conftest.py +1085 -0
- kpip-0.0.1/docs/architecture.md +255 -0
- kpip-0.0.1/pyproject.toml +135 -0
- kpip-0.0.1/scripts/benchmark/.python-version +1 -0
- kpip-0.0.1/scripts/benchmark/README.md +179 -0
- kpip-0.0.1/scripts/benchmark/pyproject.toml +28 -0
- kpip-0.0.1/scripts/benchmark/requirements/README.md +14 -0
- kpip-0.0.1/scripts/benchmark/requirements/airflow.in +2 -0
- kpip-0.0.1/scripts/benchmark/requirements/airflow2-constraints.txt +299 -0
- kpip-0.0.1/scripts/benchmark/requirements/airflow2-req.in +7 -0
- kpip-0.0.1/scripts/benchmark/requirements/all-kinds.in +12 -0
- kpip-0.0.1/scripts/benchmark/requirements/backtracking/apache-beam-dill.in +5 -0
- kpip-0.0.1/scripts/benchmark/requirements/backtracking/numpy-numba.in +9 -0
- kpip-0.0.1/scripts/benchmark/requirements/backtracking/numpy-sparse.in +9 -0
- kpip-0.0.1/scripts/benchmark/requirements/backtracking/sentry.in +11 -0
- kpip-0.0.1/scripts/benchmark/requirements/backtracking/starlette-fastapi.in +14 -0
- kpip-0.0.1/scripts/benchmark/requirements/bio_embeddings.in +2 -0
- kpip-0.0.1/scripts/benchmark/requirements/black.in +1 -0
- kpip-0.0.1/scripts/benchmark/requirements/boto3.in +3 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/all-kinds.txt +74 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/black.txt +17 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/boto3.txt +19 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/dtlssocket.txt +5 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/flyte.txt +256 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/jupyter.txt +300 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/pdm_2193.txt +31 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/scispacy.txt +216 -0
- kpip-0.0.1/scripts/benchmark/requirements/compiled/trio.txt +81 -0
- kpip-0.0.1/scripts/benchmark/requirements/dtlssocket.in +1 -0
- kpip-0.0.1/scripts/benchmark/requirements/flyte.in +35 -0
- kpip-0.0.1/scripts/benchmark/requirements/home-assistant.in +3031 -0
- kpip-0.0.1/scripts/benchmark/requirements/jupyter.in +1 -0
- kpip-0.0.1/scripts/benchmark/requirements/meine_stadt_transparent.in +1 -0
- kpip-0.0.1/scripts/benchmark/requirements/pdm_2193.in +5 -0
- kpip-0.0.1/scripts/benchmark/requirements/pydantic.in +42 -0
- kpip-0.0.1/scripts/benchmark/requirements/scispacy.in +29 -0
- kpip-0.0.1/scripts/benchmark/requirements/slow.in +16 -0
- kpip-0.0.1/scripts/benchmark/requirements/transformers/pyproject.toml +297 -0
- kpip-0.0.1/scripts/benchmark/requirements/transformers-extras.in +274 -0
- kpip-0.0.1/scripts/benchmark/requirements/trio.in +23 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/__init__.py +1 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/cli.py +667 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/compare.py +113 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/hyperfine.py +117 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/record.py +250 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/runner.py +106 -0
- kpip-0.0.1/scripts/benchmark/src/kpip_benchmark/workloads.py +363 -0
- kpip-0.0.1/scripts/benchmark/tests/test_compare.py +113 -0
- kpip-0.0.1/scripts/benchmark/tests/test_harness.py +416 -0
- kpip-0.0.1/scripts/benchmark/tests/test_record.py +83 -0
- kpip-0.0.1/scripts/benchmark/uv.lock +182 -0
- kpip-0.0.1/scripts/bump_version.py +207 -0
- kpip-0.0.1/src/kpip/__init__.py +14 -0
- kpip-0.0.1/src/kpip/__kpip-runner__.py +36 -0
- kpip-0.0.1/src/kpip/__main__.py +19 -0
- kpip-0.0.1/src/kpip/_launchers/DISTLIB-LICENSE.txt +284 -0
- kpip-0.0.1/src/kpip/_launchers/__init__.py +0 -0
- kpip-0.0.1/src/kpip/_launchers/t32.exe +0 -0
- kpip-0.0.1/src/kpip/_launchers/t64-arm.exe +0 -0
- kpip-0.0.1/src/kpip/_launchers/t64.exe +0 -0
- kpip-0.0.1/src/kpip/_launchers/w32.exe +0 -0
- kpip-0.0.1/src/kpip/_launchers/w64-arm.exe +0 -0
- kpip-0.0.1/src/kpip/_launchers/w64.exe +0 -0
- kpip-0.0.1/src/kpip/_vendor/VENDORED.md +49 -0
- kpip-0.0.1/src/kpip/_vendor/certifi/LICENSE +20 -0
- kpip-0.0.1/src/kpip/_vendor/certifi/__init__.py +4 -0
- kpip-0.0.1/src/kpip/_vendor/certifi/__main__.py +12 -0
- kpip-0.0.1/src/kpip/_vendor/certifi/cacert.pem +3959 -0
- kpip-0.0.1/src/kpip/_vendor/certifi/core.py +89 -0
- kpip-0.0.1/src/kpip/_vendor/certifi/py.typed +0 -0
- kpip-0.0.1/src/kpip/_vendor/idna/LICENSE.md +31 -0
- kpip-0.0.1/src/kpip/_vendor/idna/__init__.py +45 -0
- kpip-0.0.1/src/kpip/_vendor/idna/__main__.py +6 -0
- kpip-0.0.1/src/kpip/_vendor/idna/cli.py +128 -0
- kpip-0.0.1/src/kpip/_vendor/idna/codec.py +159 -0
- kpip-0.0.1/src/kpip/_vendor/idna/compat.py +41 -0
- kpip-0.0.1/src/kpip/_vendor/idna/core.py +648 -0
- kpip-0.0.1/src/kpip/_vendor/idna/idnadata.py +1897 -0
- kpip-0.0.1/src/kpip/_vendor/idna/intranges.py +55 -0
- kpip-0.0.1/src/kpip/_vendor/idna/package_data.py +1 -0
- kpip-0.0.1/src/kpip/_vendor/idna/py.typed +0 -0
- kpip-0.0.1/src/kpip/_vendor/idna/uts46data.py +16896 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/LICENSE +21 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/__init__.py +17 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/_compat.py +22 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/conflict.py +554 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/decide.py +221 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/decision_queue.py +197 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/errors.py +50 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/incompat_index.py +256 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/partial_solution.py +747 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/propagate.py +473 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/py.typed +0 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/ranges.py +940 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/report.py +458 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/resolver.py +1049 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/result.py +89 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/root.py +31 -0
- kpip-0.0.1/src/kpip/_vendor/nab_resolver/types.py +441 -0
- kpip-0.0.1/src/kpip/_vendor/tomli/LICENSE +21 -0
- kpip-0.0.1/src/kpip/_vendor/tomli/__init__.py +8 -0
- kpip-0.0.1/src/kpip/_vendor/tomli/_parser.py +793 -0
- kpip-0.0.1/src/kpip/_vendor/tomli/_re.py +119 -0
- kpip-0.0.1/src/kpip/_vendor/tomli/_types.py +10 -0
- kpip-0.0.1/src/kpip/_vendor/tomli/py.typed +1 -0
- kpip-0.0.1/src/kpip/_vendor/typing_extensions.LICENSE +279 -0
- kpip-0.0.1/src/kpip/_vendor/typing_extensions.py +4422 -0
- kpip-0.0.1/src/kpip/_vendor/typing_extensions.pyi +1 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/LICENSE.txt +21 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/__init__.py +211 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/_base_connection.py +165 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/_collections.py +487 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/_request_methods.py +278 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/_version.py +34 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/connection.py +1099 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/connectionpool.py +1178 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/__init__.py +0 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/emscripten/__init__.py +17 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/emscripten/connection.py +260 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/emscripten/emscripten_fetch_worker.js +110 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/emscripten/fetch.py +726 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/emscripten/request.py +22 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/emscripten/response.py +277 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/pyopenssl.py +564 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/contrib/socks.py +228 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/exceptions.py +335 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/fields.py +341 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/filepost.py +89 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/http2/__init__.py +53 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/http2/connection.py +356 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/http2/probe.py +87 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/poolmanager.py +651 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/py.typed +2 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/response.py +1480 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/__init__.py +42 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/connection.py +137 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/proxy.py +43 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/request.py +263 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/response.py +101 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/retry.py +549 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/ssl_.py +527 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/ssl_match_hostname.py +159 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/ssltransport.py +271 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/timeout.py +275 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/url.py +469 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/util.py +42 -0
- kpip-0.0.1/src/kpip/_vendor/urllib3/util/wait.py +124 -0
- kpip-0.0.1/src/kpip/_vendor/vendor.txt +6 -0
- kpip-0.0.1/src/kpip/build/__init__.py +1 -0
- kpip-0.0.1/src/kpip/build/build.py +133 -0
- kpip-0.0.1/src/kpip/build/build_backend.py +2029 -0
- kpip-0.0.1/src/kpip/build/metadata.py +487 -0
- kpip-0.0.1/src/kpip/build/pep517_hooks.py +173 -0
- kpip-0.0.1/src/kpip/build/query.py +535 -0
- kpip-0.0.1/src/kpip/cli/__init__.py +7 -0
- kpip-0.0.1/src/kpip/cli/cache.py +243 -0
- kpip-0.0.1/src/kpip/cli/config.py +261 -0
- kpip-0.0.1/src/kpip/cli/dependency_groups.py +133 -0
- kpip-0.0.1/src/kpip/cli/download.py +131 -0
- kpip-0.0.1/src/kpip/cli/entrypoint.py +429 -0
- kpip-0.0.1/src/kpip/cli/exit_codes.py +11 -0
- kpip-0.0.1/src/kpip/cli/fast.py +1033 -0
- kpip-0.0.1/src/kpip/cli/fast_install.py +1551 -0
- kpip-0.0.1/src/kpip/cli/freeze.py +387 -0
- kpip-0.0.1/src/kpip/cli/index.py +53 -0
- kpip-0.0.1/src/kpip/cli/inspect.py +68 -0
- kpip-0.0.1/src/kpip/cli/inspect_check.py +71 -0
- kpip-0.0.1/src/kpip/cli/inspect_hash.py +30 -0
- kpip-0.0.1/src/kpip/cli/inspect_show.py +106 -0
- kpip-0.0.1/src/kpip/cli/install.py +1744 -0
- kpip-0.0.1/src/kpip/cli/list.py +164 -0
- kpip-0.0.1/src/kpip/cli/lock.py +570 -0
- kpip-0.0.1/src/kpip/cli/lock_format.py +43 -0
- kpip-0.0.1/src/kpip/cli/logging_config.py +50 -0
- kpip-0.0.1/src/kpip/cli/main.py +21 -0
- kpip-0.0.1/src/kpip/cli/parser.py +152 -0
- kpip-0.0.1/src/kpip/cli/parsers/__init__.py +13 -0
- kpip-0.0.1/src/kpip/cli/parsers/cache.py +27 -0
- kpip-0.0.1/src/kpip/cli/parsers/download.py +66 -0
- kpip-0.0.1/src/kpip/cli/parsers/freeze.py +27 -0
- kpip-0.0.1/src/kpip/cli/parsers/index.py +38 -0
- kpip-0.0.1/src/kpip/cli/parsers/inspect.py +44 -0
- kpip-0.0.1/src/kpip/cli/parsers/install.py +122 -0
- kpip-0.0.1/src/kpip/cli/parsers/list.py +66 -0
- kpip-0.0.1/src/kpip/cli/parsers/lock.py +44 -0
- kpip-0.0.1/src/kpip/cli/parsers/uninstall.py +29 -0
- kpip-0.0.1/src/kpip/cli/parsers/wheel.py +92 -0
- kpip-0.0.1/src/kpip/cli/registry.py +181 -0
- kpip-0.0.1/src/kpip/cli/requirements.py +837 -0
- kpip-0.0.1/src/kpip/cli/resolution_errors.py +78 -0
- kpip-0.0.1/src/kpip/cli/target.py +24 -0
- kpip-0.0.1/src/kpip/cli/uninstall.py +71 -0
- kpip-0.0.1/src/kpip/cli/wheel.py +126 -0
- kpip-0.0.1/src/kpip/core/__init__.py +3 -0
- kpip-0.0.1/src/kpip/core/appdirs.py +119 -0
- kpip-0.0.1/src/kpip/core/archive.py +294 -0
- kpip-0.0.1/src/kpip/core/caches.py +74 -0
- kpip-0.0.1/src/kpip/core/direct_url.py +307 -0
- kpip-0.0.1/src/kpip/core/egg_link.py +35 -0
- kpip-0.0.1/src/kpip/core/errors.py +206 -0
- kpip-0.0.1/src/kpip/core/format_control.py +77 -0
- kpip-0.0.1/src/kpip/core/hashes.py +145 -0
- kpip-0.0.1/src/kpip/core/http.py +67 -0
- kpip-0.0.1/src/kpip/core/kpip_version.py +22 -0
- kpip-0.0.1/src/kpip/core/libc.py +305 -0
- kpip-0.0.1/src/kpip/core/light_metadata.py +461 -0
- kpip-0.0.1/src/kpip/core/markers.py +449 -0
- kpip-0.0.1/src/kpip/core/metadata.py +527 -0
- kpip-0.0.1/src/kpip/core/names.py +69 -0
- kpip-0.0.1/src/kpip/core/packaging.py +1056 -0
- kpip-0.0.1/src/kpip/core/release_control.py +60 -0
- kpip-0.0.1/src/kpip/core/subprocess.py +120 -0
- kpip-0.0.1/src/kpip/core/target_python.py +70 -0
- kpip-0.0.1/src/kpip/core/temp_dir.py +168 -0
- kpip-0.0.1/src/kpip/core/urls.py +112 -0
- kpip-0.0.1/src/kpip/core/utils.py +172 -0
- kpip-0.0.1/src/kpip/core/versions.py +322 -0
- kpip-0.0.1/src/kpip/core/wheel.py +1623 -0
- kpip-0.0.1/src/kpip/core/wheel_metadata.py +97 -0
- kpip-0.0.1/src/kpip/index/__init__.py +1 -0
- kpip-0.0.1/src/kpip/index/artifact_cache.py +261 -0
- kpip-0.0.1/src/kpip/index/artifacts.py +338 -0
- kpip-0.0.1/src/kpip/index/cache.py +42 -0
- kpip-0.0.1/src/kpip/index/candidate_cache.py +104 -0
- kpip-0.0.1/src/kpip/index/candidate_evaluators.py +408 -0
- kpip-0.0.1/src/kpip/index/candidate_filters.py +91 -0
- kpip-0.0.1/src/kpip/index/candidate_materialization.py +1701 -0
- kpip-0.0.1/src/kpip/index/candidate_metadata_cache.py +196 -0
- kpip-0.0.1/src/kpip/index/candidate_stream.py +124 -0
- kpip-0.0.1/src/kpip/index/candidates.py +245 -0
- kpip-0.0.1/src/kpip/index/catalog_cache.py +837 -0
- kpip-0.0.1/src/kpip/index/config.py +3 -0
- kpip-0.0.1/src/kpip/index/datetime.py +15 -0
- kpip-0.0.1/src/kpip/index/directory_index.py +87 -0
- kpip-0.0.1/src/kpip/index/hashes.py +15 -0
- kpip-0.0.1/src/kpip/index/links.py +585 -0
- kpip-0.0.1/src/kpip/index/metadata_cache.py +255 -0
- kpip-0.0.1/src/kpip/index/page_parsing.py +415 -0
- kpip-0.0.1/src/kpip/index/paths.py +21 -0
- kpip-0.0.1/src/kpip/index/prefetch.py +76 -0
- kpip-0.0.1/src/kpip/index/provider.py +2993 -0
- kpip-0.0.1/src/kpip/index/release_facts_cache.py +76 -0
- kpip-0.0.1/src/kpip/index/source_locations.py +336 -0
- kpip-0.0.1/src/kpip/index/source_models.py +268 -0
- kpip-0.0.1/src/kpip/index/sqlite_cache.py +129 -0
- kpip-0.0.1/src/kpip/index/vcs.py +137 -0
- kpip-0.0.1/src/kpip/install/__init__.py +1 -0
- kpip-0.0.1/src/kpip/install/_compile_worker.py +64 -0
- kpip-0.0.1/src/kpip/install/build_env/__init__.py +0 -0
- kpip-0.0.1/src/kpip/install/build_env/venv.py +166 -0
- kpip-0.0.1/src/kpip/install/bytecode.py +432 -0
- kpip-0.0.1/src/kpip/install/metadata.py +405 -0
- kpip-0.0.1/src/kpip/install/output.py +222 -0
- kpip-0.0.1/src/kpip/install/requirement_set.py +73 -0
- kpip-0.0.1/src/kpip/install/requirements.py +110 -0
- kpip-0.0.1/src/kpip/install/target.py +166 -0
- kpip-0.0.1/src/kpip/install/transaction.py +364 -0
- kpip-0.0.1/src/kpip/install/uninstall.py +237 -0
- kpip-0.0.1/src/kpip/install/wheel_archive.py +382 -0
- kpip-0.0.1/src/kpip/install/wheel_archive_cache.py +749 -0
- kpip-0.0.1/src/kpip/install/wheel_archive_installer.py +1027 -0
- kpip-0.0.1/src/kpip/install/wheel_archive_runtime.py +256 -0
- kpip-0.0.1/src/kpip/install/wheel_install_plan_cache.py +453 -0
- kpip-0.0.1/src/kpip/install/wheel_scripts.py +274 -0
- kpip-0.0.1/src/kpip/install/wheel_state.py +336 -0
- kpip-0.0.1/src/kpip/install/wheel_transaction.py +977 -0
- kpip-0.0.1/src/kpip/install/wheel_transaction_direct.py +197 -0
- kpip-0.0.1/src/kpip/network/__init__.py +1 -0
- kpip-0.0.1/src/kpip/network/auth.py +542 -0
- kpip-0.0.1/src/kpip/network/cache.py +248 -0
- kpip-0.0.1/src/kpip/network/download.py +412 -0
- kpip-0.0.1/src/kpip/network/exceptions.py +104 -0
- kpip-0.0.1/src/kpip/network/http.py +1431 -0
- kpip-0.0.1/src/kpip/network/lazy_wheel.py +362 -0
- kpip-0.0.1/src/kpip/platform/__init__.py +1 -0
- kpip-0.0.1/src/kpip/platform/clone.py +384 -0
- kpip-0.0.1/src/kpip/platform/filesystem.py +95 -0
- kpip-0.0.1/src/kpip/platform/locations/__init__.py +1 -0
- kpip-0.0.1/src/kpip/platform/locations/base.py +49 -0
- kpip-0.0.1/src/kpip/platform/locations/sysconfig.py +199 -0
- kpip-0.0.1/src/kpip/platform/lock.py +149 -0
- kpip-0.0.1/src/kpip/platform/scheme.py +25 -0
- kpip-0.0.1/src/kpip/platform/tar_reader.py +431 -0
- kpip-0.0.1/src/kpip/platform/unpacking.py +647 -0
- kpip-0.0.1/src/kpip/platform/virtualenv.py +8 -0
- kpip-0.0.1/src/kpip/py.typed +4 -0
- kpip-0.0.1/src/kpip/resolution/__init__.py +1 -0
- kpip-0.0.1/src/kpip/resolution/api.py +209 -0
- kpip-0.0.1/src/kpip/resolution/files/__init__.py +39 -0
- kpip-0.0.1/src/kpip/resolution/files/contracts.py +35 -0
- kpip-0.0.1/src/kpip/resolution/files/models.py +48 -0
- kpip-0.0.1/src/kpip/resolution/files/options.py +94 -0
- kpip-0.0.1/src/kpip/resolution/files/parser.py +605 -0
- kpip-0.0.1/src/kpip/resolution/files/pylock.py +335 -0
- kpip-0.0.1/src/kpip/resolution/hash_checking.py +136 -0
- kpip-0.0.1/src/kpip/resolution/input_paths.py +85 -0
- kpip-0.0.1/src/kpip/resolution/input_requirements.py +282 -0
- kpip-0.0.1/src/kpip/resolution/inputs.py +252 -0
- kpip-0.0.1/src/kpip/resolution/models.py +202 -0
- kpip-0.0.1/src/kpip/resolution/nab_provider.py +1677 -0
- kpip-0.0.1/src/kpip/resolution/nab_types.py +128 -0
- kpip-0.0.1/src/kpip/resolution/req_install.py +719 -0
- kpip-0.0.1/src/kpip/vcs/__init__.py +1 -0
- kpip-0.0.1/src/kpip/vcs/bazaar.py +138 -0
- kpip-0.0.1/src/kpip/vcs/errors.py +8 -0
- kpip-0.0.1/src/kpip/vcs/git.py +699 -0
- kpip-0.0.1/src/kpip/vcs/mercurial.py +185 -0
- kpip-0.0.1/src/kpip/vcs/subprocess.py +96 -0
- kpip-0.0.1/src/kpip/vcs/subversion.py +291 -0
- kpip-0.0.1/src/kpip/vcs/support.py +76 -0
- kpip-0.0.1/src/kpip/vcs/versioncontrol.py +753 -0
- kpip-0.0.1/tests/__init__.py +0 -0
- kpip-0.0.1/tests/benchmarks/README.md +26 -0
- kpip-0.0.1/tests/benchmarks/benchmark_support.py +629 -0
- kpip-0.0.1/tests/benchmarks/conftest.py +312 -0
- kpip-0.0.1/tests/benchmarks/corpus/pypi_snapshot.json +123 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/README.md +15 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/all-kinds.txt +74 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/black.txt +17 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/boto3.txt +19 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/dtlssocket.txt +5 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/flyte.txt +256 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/jupyter.txt +300 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/pdm_2193.txt +31 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/scispacy.txt +216 -0
- kpip-0.0.1/tests/benchmarks/corpus/uv_workloads/trio.txt +81 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_additional.py +388 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_catastrophic.py +129 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_corpus.py +64 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_index.py +452 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_install.py +208 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_live_index.py +99 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_nab_smoke.py +183 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_network.py +455 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_packaging.py +139 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_resolution.py +321 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_support.py +116 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_uv_corpus.py +39 -0
- kpip-0.0.1/tests/benchmarks/test_benchmark_warm_cache.py +518 -0
- kpip-0.0.1/tests/build/test_build.py +73 -0
- kpip-0.0.1/tests/build/test_build_backend.py +553 -0
- kpip-0.0.1/tests/build/test_query.py +179 -0
- kpip-0.0.1/tests/cli/__init__.py +1 -0
- kpip-0.0.1/tests/cli/functional/__init__.py +1 -0
- kpip-0.0.1/tests/cli/functional/minimal/__init__.py +1 -0
- kpip-0.0.1/tests/cli/functional/minimal/test_smoke.py +241 -0
- kpip-0.0.1/tests/cli/functional/test_bad_url.py +10 -0
- kpip-0.0.1/tests/cli/functional/test_broken_stdout.py +70 -0
- kpip-0.0.1/tests/cli/functional/test_build_constraints.py +294 -0
- kpip-0.0.1/tests/cli/functional/test_cache.py +679 -0
- kpip-0.0.1/tests/cli/functional/test_check.py +376 -0
- kpip-0.0.1/tests/cli/functional/test_config_settings.py +306 -0
- kpip-0.0.1/tests/cli/functional/test_freeze.py +875 -0
- kpip-0.0.1/tests/cli/functional/test_hash.py +44 -0
- kpip-0.0.1/tests/cli/functional/test_index_invalid_wheels.py +115 -0
- kpip-0.0.1/tests/cli/functional/test_inspect.py +40 -0
- kpip-0.0.1/tests/cli/functional/test_install_check.py +129 -0
- kpip-0.0.1/tests/cli/functional/test_install_cleanup.py +26 -0
- kpip-0.0.1/tests/cli/functional/test_install_compat.py +66 -0
- kpip-0.0.1/tests/cli/functional/test_install_config.py +577 -0
- kpip-0.0.1/tests/cli/functional/test_install_direct_url.py +56 -0
- kpip-0.0.1/tests/cli/functional/test_install_extras.py +310 -0
- kpip-0.0.1/tests/cli/functional/test_install_force_reinstall.py +60 -0
- kpip-0.0.1/tests/cli/functional/test_install_format_control.py +112 -0
- kpip-0.0.1/tests/cli/functional/test_install_index.py +95 -0
- kpip-0.0.1/tests/cli/functional/test_install_pylock_reqs.py +239 -0
- kpip-0.0.1/tests/cli/functional/test_install_release_control.py +311 -0
- kpip-0.0.1/tests/cli/functional/test_install_report.py +431 -0
- kpip-0.0.1/tests/cli/functional/test_install_reqs.py +989 -0
- kpip-0.0.1/tests/cli/functional/test_install_requested.py +158 -0
- kpip-0.0.1/tests/cli/functional/test_install_satisfied.py +51 -0
- kpip-0.0.1/tests/cli/functional/test_install_script.py +137 -0
- kpip-0.0.1/tests/cli/functional/test_install_upgrade.py +395 -0
- kpip-0.0.1/tests/cli/functional/test_install_user.py +359 -0
- kpip-0.0.1/tests/cli/functional/test_install_vcs_git.py +548 -0
- kpip-0.0.1/tests/cli/functional/test_install_wheel.py +813 -0
- kpip-0.0.1/tests/cli/functional/test_invalid_versions_and_specifiers.py +126 -0
- kpip-0.0.1/tests/cli/functional/test_kpip_runner_script.py +19 -0
- kpip-0.0.1/tests/cli/functional/test_list.py +847 -0
- kpip-0.0.1/tests/cli/functional/test_lock.py +295 -0
- kpip-0.0.1/tests/cli/functional/test_new_resolver.py +2537 -0
- kpip-0.0.1/tests/cli/functional/test_new_resolver_errors.py +181 -0
- kpip-0.0.1/tests/cli/functional/test_new_resolver_hashes.py +391 -0
- kpip-0.0.1/tests/cli/functional/test_no_color.py +41 -0
- kpip-0.0.1/tests/cli/functional/test_pep660.py +261 -0
- kpip-0.0.1/tests/cli/functional/test_proxy.py +123 -0
- kpip-0.0.1/tests/cli/functional/test_python_option.py +49 -0
- kpip-0.0.1/tests/cli/functional/test_self_update.py +11 -0
- kpip-0.0.1/tests/cli/functional/test_truststore.py +33 -0
- kpip-0.0.1/tests/cli/functional/test_uninstall_user.py +101 -0
- kpip-0.0.1/tests/cli/functional/test_uploaded_prior_to.py +147 -0
- kpip-0.0.1/tests/cli/functional/test_vcs_bazaar.py +35 -0
- kpip-0.0.1/tests/cli/functional/test_vcs_git.py +447 -0
- kpip-0.0.1/tests/cli/functional/test_vcs_mercurial.py +19 -0
- kpip-0.0.1/tests/cli/functional/test_vcs_subversion.py +35 -0
- kpip-0.0.1/tests/cli/kpip_test_support/__init__.py +1271 -0
- kpip-0.0.1/tests/cli/kpip_test_support/certs.py +60 -0
- kpip-0.0.1/tests/cli/kpip_test_support/compat.py +27 -0
- kpip-0.0.1/tests/cli/kpip_test_support/filesystem.py +44 -0
- kpip-0.0.1/tests/cli/kpip_test_support/git_submodule_helpers.py +83 -0
- kpip-0.0.1/tests/cli/kpip_test_support/index.py +20 -0
- kpip-0.0.1/tests/cli/kpip_test_support/local_repos.py +64 -0
- kpip-0.0.1/tests/cli/kpip_test_support/output.py +3 -0
- kpip-0.0.1/tests/cli/kpip_test_support/server.py +227 -0
- kpip-0.0.1/tests/cli/kpip_test_support/transport_mocks.py +75 -0
- kpip-0.0.1/tests/cli/kpip_test_support/venv.py +161 -0
- kpip-0.0.1/tests/cli/kpip_test_support/wheel.py +407 -0
- kpip-0.0.1/tests/cli/kpip_test_support/wheel_test_support.py +247 -0
- kpip-0.0.1/tests/cli/migrated/__init__.py +1 -0
- kpip-0.0.1/tests/cli/migrated/test_cli_lifecycle.py +21 -0
- kpip-0.0.1/tests/cli/migrated/test_command_help.py +53 -0
- kpip-0.0.1/tests/cli/migrated/test_group_options.py +66 -0
- kpip-0.0.1/tests/cli/migrated/test_layered_cli.py +16 -0
- kpip-0.0.1/tests/cli/migrated/test_layered_cli_install.py +32 -0
- kpip-0.0.1/tests/cli/migrated/test_requirements.py +16 -0
- kpip-0.0.1/tests/cli/migrated/test_source_config.py +99 -0
- kpip-0.0.1/tests/cli/test_download_cache.py +92 -0
- kpip-0.0.1/tests/cli/test_fast_freeze.py +141 -0
- kpip-0.0.1/tests/cli/test_fast_install_record.py +100 -0
- kpip-0.0.1/tests/cli/test_fast_list.py +182 -0
- kpip-0.0.1/tests/cli/test_fast_satisfied.py +184 -0
- kpip-0.0.1/tests/cli/test_lock_fast_path.py +77 -0
- kpip-0.0.1/tests/core/import_harness.py +336 -0
- kpip-0.0.1/tests/core/migrated/test_appdirs.py +49 -0
- kpip-0.0.1/tests/core/migrated/test_compatibility_tags.py +84 -0
- kpip-0.0.1/tests/core/migrated/test_datetime.py +51 -0
- kpip-0.0.1/tests/core/migrated/test_dependency_groups.py +138 -0
- kpip-0.0.1/tests/core/migrated/test_direct_url.py +152 -0
- kpip-0.0.1/tests/core/migrated/test_retry.py +122 -0
- kpip-0.0.1/tests/core/migrated/test_urls.py +72 -0
- kpip-0.0.1/tests/core/test_architecture_imports.py +70 -0
- kpip-0.0.1/tests/core/test_bump_version_script.py +113 -0
- kpip-0.0.1/tests/core/test_cache_registry.py +110 -0
- kpip-0.0.1/tests/core/test_cache_version.py +118 -0
- kpip-0.0.1/tests/core/test_core_http.py +40 -0
- kpip-0.0.1/tests/core/test_core_wheel.py +474 -0
- kpip-0.0.1/tests/core/test_hashes.py +39 -0
- kpip-0.0.1/tests/core/test_light_metadata.py +48 -0
- kpip-0.0.1/tests/core/test_linux_tags.py +191 -0
- kpip-0.0.1/tests/core/test_markers.py +268 -0
- kpip-0.0.1/tests/core/test_metadata_cache.py +167 -0
- kpip-0.0.1/tests/core/test_metadata_installed.py +707 -0
- kpip-0.0.1/tests/core/test_packaging.py +706 -0
- kpip-0.0.1/tests/core/test_packaging_oracle.py +258 -0
- kpip-0.0.1/tests/core/test_packaging_predicates.py +195 -0
- kpip-0.0.1/tests/core/test_startup_imports.py +374 -0
- kpip-0.0.1/tests/core/test_wheel_metadata_package.py +221 -0
- kpip-0.0.1/tests/index/__init__.py +0 -0
- kpip-0.0.1/tests/index/migrated/test_link.py +306 -0
- kpip-0.0.1/tests/index/test_artifacts.py +174 -0
- kpip-0.0.1/tests/index/test_candidate_evaluators.py +93 -0
- kpip-0.0.1/tests/index/test_candidate_materialization.py +469 -0
- kpip-0.0.1/tests/index/test_candidate_metadata_cache.py +98 -0
- kpip-0.0.1/tests/index/test_candidate_records_from_catalog.py +382 -0
- kpip-0.0.1/tests/index/test_catalog_cache.py +251 -0
- kpip-0.0.1/tests/index/test_lazy_catalog_records.py +377 -0
- kpip-0.0.1/tests/index/test_lazy_materialization.py +91 -0
- kpip-0.0.1/tests/index/test_local_links.py +182 -0
- kpip-0.0.1/tests/index/test_metadata_cache_scoping.py +68 -0
- kpip-0.0.1/tests/index/test_page_parsing.py +414 -0
- kpip-0.0.1/tests/index/test_pep700_size.py +130 -0
- kpip-0.0.1/tests/index/test_prefetch.py +61 -0
- kpip-0.0.1/tests/index/test_release_candidates.py +136 -0
- kpip-0.0.1/tests/index/test_release_facts_cache.py +20 -0
- kpip-0.0.1/tests/index/test_sources_package.py +1426 -0
- kpip-0.0.1/tests/index/test_summary_revalidation.py +210 -0
- kpip-0.0.1/tests/install/__init__.py +1 -0
- kpip-0.0.1/tests/install/migrated/test_preparer.py +181 -0
- kpip-0.0.1/tests/install/migrated/test_unpacking.py +739 -0
- kpip-0.0.1/tests/install/test_archive_extraction.py +163 -0
- kpip-0.0.1/tests/install/test_bytecode_workers.py +159 -0
- kpip-0.0.1/tests/install/test_clone_import_visibility.py +209 -0
- kpip-0.0.1/tests/install/test_fast_unzip.py +400 -0
- kpip-0.0.1/tests/install/test_fetch_candidate_sources.py +84 -0
- kpip-0.0.1/tests/install/test_install_wheel_owner.py +945 -0
- kpip-0.0.1/tests/install/test_member_paths.py +264 -0
- kpip-0.0.1/tests/install/test_requirements.py +29 -0
- kpip-0.0.1/tests/install/test_tar_reader.py +760 -0
- kpip-0.0.1/tests/install/test_target.py +29 -0
- kpip-0.0.1/tests/install/test_transaction.py +447 -0
- kpip-0.0.1/tests/install/test_uninstall_transaction.py +76 -0
- kpip-0.0.1/tests/install/test_wheel_archive_installer.py +634 -0
- kpip-0.0.1/tests/install/test_wheel_archive_runtime.py +141 -0
- kpip-0.0.1/tests/install/test_wheel_digest.py +176 -0
- kpip-0.0.1/tests/install/test_wheel_layout_rules.py +187 -0
- kpip-0.0.1/tests/install/test_write_stream_to_path.py +73 -0
- kpip-0.0.1/tests/network/migrated/test_auth.py +778 -0
- kpip-0.0.1/tests/network/migrated/test_cache.py +135 -0
- kpip-0.0.1/tests/network/migrated/test_download.py +623 -0
- kpip-0.0.1/tests/network/migrated/test_http.py +980 -0
- kpip-0.0.1/tests/network/migrated/test_lazy_wheel.py +71 -0
- kpip-0.0.1/tests/network/test_lazy_wheel_suffix_range.py +152 -0
- kpip-0.0.1/tests/network/test_range_capability.py +91 -0
- kpip-0.0.1/tests/network/test_vendored_manifest.py +65 -0
- kpip-0.0.1/tests/platform/migrated/test_locations.py +102 -0
- kpip-0.0.1/tests/platform/migrated/test_virtualenv.py +26 -0
- kpip-0.0.1/tests/platform/test_clone_speed_probe.py +79 -0
- kpip-0.0.1/tests/platform/test_environment_lock.py +166 -0
- kpip-0.0.1/tests/resolution/__init__.py +0 -0
- kpip-0.0.1/tests/resolution/migrated/test_direct_url_helpers.py +191 -0
- kpip-0.0.1/tests/resolution/test_archive.py +504 -0
- kpip-0.0.1/tests/resolution/test_decision_key_cache.py +348 -0
- kpip-0.0.1/tests/resolution/test_dependency_clause_interning.py +542 -0
- kpip-0.0.1/tests/resolution/test_descent_prefetch.py +205 -0
- kpip-0.0.1/tests/resolution/test_engine_api.py +365 -0
- kpip-0.0.1/tests/resolution/test_exact_pin.py +30 -0
- kpip-0.0.1/tests/resolution/test_forward_check.py +804 -0
- kpip-0.0.1/tests/resolution/test_hash_checking.py +128 -0
- kpip-0.0.1/tests/resolution/test_nab_provider.py +771 -0
- kpip-0.0.1/tests/resolution/test_nab_types.py +65 -0
- kpip-0.0.1/tests/resolution/test_output.py +159 -0
- kpip-0.0.1/tests/resolution/test_partial_solution.py +377 -0
- kpip-0.0.1/tests/resolution/test_provider_memos.py +210 -0
- kpip-0.0.1/tests/resolution/test_ranges.py +422 -0
- kpip-0.0.1/tests/resolution/test_req_install_package.py +564 -0
- kpip-0.0.1/tests/resolution/test_requirement_parser.py +146 -0
- kpip-0.0.1/tests/resolution/test_requirement_set_package.py +51 -0
- kpip-0.0.1/tests/resolution/test_requirements_file_preprocess.py +85 -0
- kpip-0.0.1/tests/resolution/test_targeted_backtrack_queue.py +104 -0
- kpip-0.0.1/tests/resolution/test_version_order_keys.py +75 -0
- kpip-0.0.1/tests/ruff.toml +14 -0
- kpip-0.0.1/tests/typing/pyproject.toml +28 -0
- kpip-0.0.1/tests/unit/__init__.py +0 -0
- kpip-0.0.1/tests/unit/resolution_resolvelib/__init__.py +0 -0
- kpip-0.0.1/tests/vcs/migrated/test_mercurial.py +31 -0
- kpip-0.0.1/tests/vcs/migrated/test_vcs.py +1280 -0
- kpip-0.0.1/tests/vcs/test_backend_detection.py +191 -0
- kpip-0.0.1/tests/wheel_helpers.py +163 -0
- kpip-0.0.1/tools/vendoring/patches/certifi.patch +41 -0
- kpip-0.0.1/tools/vendoring/patches/nab-resolver.patch +1809 -0
- kpip-0.0.1/uv.lock +1571 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
tools/vendoring/patches/*.patch -whitespace
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
github: [KRRT7]
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
name: Checks
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
# Keep failures readable: pytest's own progress output is enough, and a
|
|
18
|
+
# traceback per failure beats a screenful of locals.
|
|
19
|
+
PYTEST_ADDOPTS: "--color=yes -q --tb=short"
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
lint:
|
|
23
|
+
name: Lint and types
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
27
|
+
with:
|
|
28
|
+
persist-credentials: false
|
|
29
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.12"
|
|
32
|
+
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
|
33
|
+
with:
|
|
34
|
+
enable-cache: true
|
|
35
|
+
# Type checking traverses optional integrations that are exercised by
|
|
36
|
+
# the test suite, so make their importable packages available too.
|
|
37
|
+
- run: uv sync --locked --group typing --group test
|
|
38
|
+
- name: ruff check
|
|
39
|
+
run: uv run ruff check src tests conftest.py
|
|
40
|
+
- name: ruff format
|
|
41
|
+
run: uv run ruff format --check src tests conftest.py
|
|
42
|
+
- name: ty
|
|
43
|
+
run: uv run ty check src
|
|
44
|
+
|
|
45
|
+
tests:
|
|
46
|
+
name: Tests / Python ${{ matrix.python-version }}
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
strategy:
|
|
49
|
+
fail-fast: false
|
|
50
|
+
matrix:
|
|
51
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
54
|
+
with:
|
|
55
|
+
persist-credentials: false
|
|
56
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
57
|
+
with:
|
|
58
|
+
python-version: ${{ matrix.python-version }}
|
|
59
|
+
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
|
60
|
+
with:
|
|
61
|
+
enable-cache: true
|
|
62
|
+
- name: Install Subversion
|
|
63
|
+
run: sudo apt-get update && sudo apt-get install --yes subversion
|
|
64
|
+
- run: uv sync --locked --group test
|
|
65
|
+
- name: Unit and package tests
|
|
66
|
+
# Excludes tests/cli/functional, which drives a real kpip in a
|
|
67
|
+
# subprocess and runs in its own job below. Network-marked tests are
|
|
68
|
+
# deselected here so a slow index cannot fail an unrelated pull
|
|
69
|
+
# request; the functional job covers what needs the network.
|
|
70
|
+
run: >
|
|
71
|
+
uv run pytest tests
|
|
72
|
+
--ignore=tests/cli/functional
|
|
73
|
+
--ignore=tests/benchmarks
|
|
74
|
+
-m "not network"
|
|
75
|
+
-p no:randomly
|
|
76
|
+
|
|
77
|
+
functional:
|
|
78
|
+
name: Functional / Python ${{ matrix.python-version }}
|
|
79
|
+
runs-on: ubuntu-latest
|
|
80
|
+
strategy:
|
|
81
|
+
fail-fast: false
|
|
82
|
+
matrix:
|
|
83
|
+
# setup-python does not publish 3.15 builds yet. Keep the minimum and
|
|
84
|
+
# newest available supported interpreter as the functional gates.
|
|
85
|
+
python-version: ["3.10", "3.14"]
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
88
|
+
with:
|
|
89
|
+
persist-credentials: false
|
|
90
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
91
|
+
with:
|
|
92
|
+
python-version: ${{ matrix.python-version }}
|
|
93
|
+
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
|
94
|
+
with:
|
|
95
|
+
enable-cache: true
|
|
96
|
+
- name: Install Subversion
|
|
97
|
+
run: sudo apt-get update && sudo apt-get install --yes subversion
|
|
98
|
+
- run: uv sync --locked --group test
|
|
99
|
+
- name: Functional tests
|
|
100
|
+
run: uv run pytest tests/cli/functional -n auto
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: CodSpeed
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
# Allows CodSpeed to trigger backtest performance analysis.
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
benchmarks:
|
|
19
|
+
name: CodSpeed / Python 3.12
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
permissions:
|
|
22
|
+
contents: read
|
|
23
|
+
id-token: write # OpenID Connect authentication with CodSpeed
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
26
|
+
with:
|
|
27
|
+
persist-credentials: false
|
|
28
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.12"
|
|
31
|
+
- uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0
|
|
32
|
+
with:
|
|
33
|
+
enable-cache: true
|
|
34
|
+
- run: uv sync --locked --all-groups
|
|
35
|
+
- name: Run benchmarks
|
|
36
|
+
uses: CodSpeedHQ/action@88472375d0a4572cf70a9f1fe3a4e0ab8da1b924 # v5.0.1
|
|
37
|
+
with:
|
|
38
|
+
mode: simulation
|
|
39
|
+
run: uv run pytest tests/benchmarks --codspeed
|
kpip-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
|
|
5
|
+
.pytest_cache/
|
|
6
|
+
.ruff_cache/
|
|
7
|
+
.mypy_cache/
|
|
8
|
+
|
|
9
|
+
.venv/
|
|
10
|
+
/build/
|
|
11
|
+
# The package's build module is source code, not the root build output.
|
|
12
|
+
!src/kpip/build/
|
|
13
|
+
dist/
|
|
14
|
+
*.egg-info/
|
|
15
|
+
|
|
16
|
+
# Recorded kpip-bench baselines (kpip-bench-record).
|
|
17
|
+
benchmark-runs/
|
kpip-0.0.1/LICENSE.txt
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Copyright (c) 2008-present The kpip developers
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
4
|
+
a copy of this software and associated documentation files (the
|
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
9
|
+
the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be
|
|
12
|
+
included in all copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
kpip-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kpip
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
License-Expression: MIT
|
|
5
|
+
License-File: LICENSE.txt
|
|
6
|
+
Summary: Pip Reimagined for Performance
|
|
7
|
+
Author-email: Kevin Turcios <turcioskevinr@gmail.com>
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
21
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
22
|
+
Project-URL: Homepage, https://github.com/warpforgedotco/kpip
|
|
23
|
+
Project-URL: Documentation, https://github.com/warpforgedotco/kpip#readme
|
|
24
|
+
Project-URL: Source, https://github.com/warpforgedotco/kpip
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
|
|
28
|
+
# kpip
|
|
29
|
+
|
|
30
|
+
[](https://github.com/warpforgedotco/kpip/actions/workflows/checks.yml)
|
|
31
|
+
[](pyproject.toml)
|
|
32
|
+
[](LICENSE.txt)
|
|
33
|
+
|
|
34
|
+
**A working reflection of what pip can be when performance engineering is a
|
|
35
|
+
design constraint.**
|
|
36
|
+
|
|
37
|
+
kpip is a working, performance-engineered interpretation of pip. It brings
|
|
38
|
+
together concrete improvements across startup, resolution, caching, artifact
|
|
39
|
+
handling, and installation into a familiar command model that can be measured,
|
|
40
|
+
tested, and evaluated as a complete system.
|
|
41
|
+
|
|
42
|
+
The goal is not to establish another permanent package-manager ecosystem. All
|
|
43
|
+
work here is intended to inform, adapt into, and ultimately flow upstream to
|
|
44
|
+
pip.
|
|
45
|
+
|
|
46
|
+
> [!WARNING]
|
|
47
|
+
> kpip is an early-alpha experimental implementation, published on PyPI for
|
|
48
|
+
> testing and evaluation. It is not a supported pip distribution or a drop-in
|
|
49
|
+
> replacement and should not be used to manage critical or system Python
|
|
50
|
+
> environments. Interfaces, behavior, and cache formats may change.
|
|
51
|
+
|
|
52
|
+
## Why kpip exists
|
|
53
|
+
|
|
54
|
+
[pip](https://pip.pypa.io/) established the package-installation workflow that
|
|
55
|
+
Python users know, and it must evolve while serving an enormous compatibility
|
|
56
|
+
surface. [uv](https://github.com/astral-sh/uv) demonstrated how much performance
|
|
57
|
+
headroom exists when packaging is reconsidered end to end.
|
|
58
|
+
|
|
59
|
+
kpip creates room to explore that headroom in a Python-native implementation,
|
|
60
|
+
while keeping pip's users, semantics, and upstream constraints in view. It asks
|
|
61
|
+
what pip can become when startup, resolution, artifact handling, caching, and
|
|
62
|
+
installation are treated as first-class performance problems.
|
|
63
|
+
|
|
64
|
+
## Upstream is the destination
|
|
65
|
+
|
|
66
|
+
kpip now contains a working body of performance engineering intended to flow
|
|
67
|
+
back to pip and the wider Python packaging ecosystem. The current goal is to
|
|
68
|
+
determine how best to upstream that work: identify the improvements that
|
|
69
|
+
transfer cleanly, separate them into focused and reviewable changes, adapt them
|
|
70
|
+
to pip's architecture and compatibility requirements, and validate them in
|
|
71
|
+
pip's own test and benchmark environments.
|
|
72
|
+
|
|
73
|
+
The repository is not expected to map commit-for-commit onto pip. Its
|
|
74
|
+
implementation combines several architectural changes and, in places, narrows
|
|
75
|
+
compatibility to make performance gains measurable. Upstreaming means
|
|
76
|
+
extracting the underlying ideas and evidence, then reshaping them into changes
|
|
77
|
+
that fit pip's maintenance and compatibility constraints.
|
|
78
|
+
|
|
79
|
+
Each upstream proposal should carry forward:
|
|
80
|
+
|
|
81
|
+
- a reproducible measurement of the problem and the improvement;
|
|
82
|
+
- behavioral and compatibility tests that preserve pip's contract;
|
|
83
|
+
- the smallest maintainable implementation that can be proposed upstream; and
|
|
84
|
+
- a clear account of tradeoffs, limitations, and results that did not hold up.
|
|
85
|
+
|
|
86
|
+
Negative results matter too. If an optimization does not survive realistic
|
|
87
|
+
workloads or cannot preserve behavior, the useful outcome is the evidence—not a
|
|
88
|
+
performance claim.
|
|
89
|
+
|
|
90
|
+
## Installation
|
|
91
|
+
|
|
92
|
+
Install kpip from PyPI as an isolated tool with uv:
|
|
93
|
+
|
|
94
|
+
```console
|
|
95
|
+
uv tool install kpip
|
|
96
|
+
kpip --version
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Or run it from a source checkout:
|
|
100
|
+
|
|
101
|
+
```console
|
|
102
|
+
git clone https://github.com/warpforgedotco/kpip.git
|
|
103
|
+
cd kpip
|
|
104
|
+
uv sync --locked
|
|
105
|
+
uv run kpip --version
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Quick start
|
|
109
|
+
|
|
110
|
+
Create an environment, then point an isolated kpip installation at it with the
|
|
111
|
+
global `--python` option:
|
|
112
|
+
|
|
113
|
+
```console
|
|
114
|
+
python -m venv .venv
|
|
115
|
+
kpip --python .venv install httpx
|
|
116
|
+
kpip --python .venv list
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Install a requirements file:
|
|
120
|
+
|
|
121
|
+
```console
|
|
122
|
+
kpip --python .venv install -r requirements.txt
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Resolve an input file into `pylock.toml`, then install it:
|
|
126
|
+
|
|
127
|
+
```console
|
|
128
|
+
kpip lock -r requirements.in
|
|
129
|
+
kpip --python .venv install -r pylock.toml
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If kpip is installed inside the environment it should manage, omit
|
|
133
|
+
`--python .venv` and invoke `kpip` directly.
|
|
134
|
+
|
|
135
|
+
## Commands
|
|
136
|
+
|
|
137
|
+
| Task | Commands |
|
|
138
|
+
| --- | --- |
|
|
139
|
+
| Install or prepare packages | `install`, `wheel`, `download` |
|
|
140
|
+
| Remove packages | `uninstall` |
|
|
141
|
+
| Inspect an environment | `list`, `freeze`, `show`, `inspect`, `check` |
|
|
142
|
+
| Resolve reproducibly | `lock` |
|
|
143
|
+
| Work with indexes and artifacts | `index`, `hash` |
|
|
144
|
+
| Inspect or clear local state | `cache` |
|
|
145
|
+
|
|
146
|
+
Run `kpip <command> --help` for command-specific options.
|
|
147
|
+
|
|
148
|
+
## Benchmarking
|
|
149
|
+
|
|
150
|
+
The benchmark suite uses [Hyperfine](https://github.com/sharkdp/hyperfine) to
|
|
151
|
+
compare kpip and uv through the same inputs and isolated targets. uv serves as
|
|
152
|
+
an external performance reference; before-and-after kpip runs show whether a
|
|
153
|
+
specific experiment helped. Neither replaces measuring an eventual patch in
|
|
154
|
+
pip's own architecture and test environment. The default offline workload is
|
|
155
|
+
generated locally and avoids network variance.
|
|
156
|
+
|
|
157
|
+
With `hyperfine` and `uv` available on `PATH`:
|
|
158
|
+
|
|
159
|
+
```console
|
|
160
|
+
cd scripts/benchmark
|
|
161
|
+
uv sync --locked --group tests
|
|
162
|
+
uv run kpip-bench --workload offline
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
The harness includes startup, cold and warm locking, cold and warm
|
|
166
|
+
installation, and incremental installation cases. It can also run the
|
|
167
|
+
workloads used by uv's public benchmarks, but those are opt-in because live
|
|
168
|
+
indexes and platform-specific wheels make them less reproducible.
|
|
169
|
+
|
|
170
|
+
See the [benchmark guide](scripts/benchmark/README.md) for workload selection,
|
|
171
|
+
recording quiet-machine baselines, exporting raw Hyperfine results, and
|
|
172
|
+
comparing two commits. The measurement philosophy follows the
|
|
173
|
+
[X-Ray Performance Laboratory](https://github.com/KRRT7/xray): benchmark first,
|
|
174
|
+
then optimize what the evidence identifies.
|
|
175
|
+
|
|
176
|
+
## Design
|
|
177
|
+
|
|
178
|
+
The main path is intentionally layered:
|
|
179
|
+
|
|
180
|
+
```text
|
|
181
|
+
CLI -> resolution -> candidate discovery -> artifact preparation -> transaction
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Each layer owns one part of the package-installation process. Fast paths are
|
|
185
|
+
narrow recognizers that decline to the general implementation whenever they
|
|
186
|
+
cannot preserve the same semantics. Persistent caches are optional: a missing,
|
|
187
|
+
stale, or corrupt entry must become a cache miss rather than a correctness
|
|
188
|
+
failure.
|
|
189
|
+
|
|
190
|
+
The [architecture guide](docs/architecture.md) maps these boundaries, the
|
|
191
|
+
runtime dependency rules between packages, the resolver flow, and every
|
|
192
|
+
persistent cache.
|
|
193
|
+
|
|
194
|
+
## Development
|
|
195
|
+
|
|
196
|
+
Set up the test and typing environments:
|
|
197
|
+
|
|
198
|
+
```console
|
|
199
|
+
git clone https://github.com/warpforgedotco/kpip.git
|
|
200
|
+
cd kpip
|
|
201
|
+
uv sync --locked --group test --group typing
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
Run the main local checks:
|
|
205
|
+
|
|
206
|
+
```console
|
|
207
|
+
uv run ruff check src tests conftest.py
|
|
208
|
+
uv run ruff format --check src tests conftest.py
|
|
209
|
+
uv run ty check src
|
|
210
|
+
uv run pytest tests \
|
|
211
|
+
--ignore=tests/cli/functional \
|
|
212
|
+
--ignore=tests/benchmarks \
|
|
213
|
+
-m "not network"
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Functional tests exercise the real CLI in subprocesses:
|
|
217
|
+
|
|
218
|
+
```console
|
|
219
|
+
uv run pytest tests/cli/functional -n auto
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The [checks workflow](.github/workflows/checks.yml) is the source of truth for
|
|
223
|
+
the supported CI matrix. Before proposing a performance change, record a
|
|
224
|
+
comparable before-and-after benchmark; a locally faster microbenchmark is not
|
|
225
|
+
enough on its own. A change is not finished merely because it lands in kpip:
|
|
226
|
+
identify how its implementation, tests, and evidence can move upstream.
|
|
227
|
+
|
|
228
|
+
## Acknowledgements
|
|
229
|
+
|
|
230
|
+
kpip exists because of—and in service of—the interfaces, behavior, and testing
|
|
231
|
+
knowledge developed by [pip and PyPA](https://github.com/pypa/pip). It is meant
|
|
232
|
+
to help that work move forward, not to pull users or contributors into a
|
|
233
|
+
permanently separate ecosystem. Its performance experiments also learn from
|
|
234
|
+
the techniques and public workloads in [uv](https://github.com/astral-sh/uv).
|
|
235
|
+
Third-party code shipped with kpip is documented in the [vendoring
|
|
236
|
+
manifest](src/kpip/_vendor/VENDORED.md).
|
|
237
|
+
|
|
238
|
+
## License
|
|
239
|
+
|
|
240
|
+
kpip is available under the [MIT License](LICENSE.txt).
|
kpip-0.0.1/README.md
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# kpip
|
|
2
|
+
|
|
3
|
+
[](https://github.com/warpforgedotco/kpip/actions/workflows/checks.yml)
|
|
4
|
+
[](pyproject.toml)
|
|
5
|
+
[](LICENSE.txt)
|
|
6
|
+
|
|
7
|
+
**A working reflection of what pip can be when performance engineering is a
|
|
8
|
+
design constraint.**
|
|
9
|
+
|
|
10
|
+
kpip is a working, performance-engineered interpretation of pip. It brings
|
|
11
|
+
together concrete improvements across startup, resolution, caching, artifact
|
|
12
|
+
handling, and installation into a familiar command model that can be measured,
|
|
13
|
+
tested, and evaluated as a complete system.
|
|
14
|
+
|
|
15
|
+
The goal is not to establish another permanent package-manager ecosystem. All
|
|
16
|
+
work here is intended to inform, adapt into, and ultimately flow upstream to
|
|
17
|
+
pip.
|
|
18
|
+
|
|
19
|
+
> [!WARNING]
|
|
20
|
+
> kpip is an early-alpha experimental implementation, published on PyPI for
|
|
21
|
+
> testing and evaluation. It is not a supported pip distribution or a drop-in
|
|
22
|
+
> replacement and should not be used to manage critical or system Python
|
|
23
|
+
> environments. Interfaces, behavior, and cache formats may change.
|
|
24
|
+
|
|
25
|
+
## Why kpip exists
|
|
26
|
+
|
|
27
|
+
[pip](https://pip.pypa.io/) established the package-installation workflow that
|
|
28
|
+
Python users know, and it must evolve while serving an enormous compatibility
|
|
29
|
+
surface. [uv](https://github.com/astral-sh/uv) demonstrated how much performance
|
|
30
|
+
headroom exists when packaging is reconsidered end to end.
|
|
31
|
+
|
|
32
|
+
kpip creates room to explore that headroom in a Python-native implementation,
|
|
33
|
+
while keeping pip's users, semantics, and upstream constraints in view. It asks
|
|
34
|
+
what pip can become when startup, resolution, artifact handling, caching, and
|
|
35
|
+
installation are treated as first-class performance problems.
|
|
36
|
+
|
|
37
|
+
## Upstream is the destination
|
|
38
|
+
|
|
39
|
+
kpip now contains a working body of performance engineering intended to flow
|
|
40
|
+
back to pip and the wider Python packaging ecosystem. The current goal is to
|
|
41
|
+
determine how best to upstream that work: identify the improvements that
|
|
42
|
+
transfer cleanly, separate them into focused and reviewable changes, adapt them
|
|
43
|
+
to pip's architecture and compatibility requirements, and validate them in
|
|
44
|
+
pip's own test and benchmark environments.
|
|
45
|
+
|
|
46
|
+
The repository is not expected to map commit-for-commit onto pip. Its
|
|
47
|
+
implementation combines several architectural changes and, in places, narrows
|
|
48
|
+
compatibility to make performance gains measurable. Upstreaming means
|
|
49
|
+
extracting the underlying ideas and evidence, then reshaping them into changes
|
|
50
|
+
that fit pip's maintenance and compatibility constraints.
|
|
51
|
+
|
|
52
|
+
Each upstream proposal should carry forward:
|
|
53
|
+
|
|
54
|
+
- a reproducible measurement of the problem and the improvement;
|
|
55
|
+
- behavioral and compatibility tests that preserve pip's contract;
|
|
56
|
+
- the smallest maintainable implementation that can be proposed upstream; and
|
|
57
|
+
- a clear account of tradeoffs, limitations, and results that did not hold up.
|
|
58
|
+
|
|
59
|
+
Negative results matter too. If an optimization does not survive realistic
|
|
60
|
+
workloads or cannot preserve behavior, the useful outcome is the evidence—not a
|
|
61
|
+
performance claim.
|
|
62
|
+
|
|
63
|
+
## Installation
|
|
64
|
+
|
|
65
|
+
Install kpip from PyPI as an isolated tool with uv:
|
|
66
|
+
|
|
67
|
+
```console
|
|
68
|
+
uv tool install kpip
|
|
69
|
+
kpip --version
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Or run it from a source checkout:
|
|
73
|
+
|
|
74
|
+
```console
|
|
75
|
+
git clone https://github.com/warpforgedotco/kpip.git
|
|
76
|
+
cd kpip
|
|
77
|
+
uv sync --locked
|
|
78
|
+
uv run kpip --version
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Quick start
|
|
82
|
+
|
|
83
|
+
Create an environment, then point an isolated kpip installation at it with the
|
|
84
|
+
global `--python` option:
|
|
85
|
+
|
|
86
|
+
```console
|
|
87
|
+
python -m venv .venv
|
|
88
|
+
kpip --python .venv install httpx
|
|
89
|
+
kpip --python .venv list
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Install a requirements file:
|
|
93
|
+
|
|
94
|
+
```console
|
|
95
|
+
kpip --python .venv install -r requirements.txt
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Resolve an input file into `pylock.toml`, then install it:
|
|
99
|
+
|
|
100
|
+
```console
|
|
101
|
+
kpip lock -r requirements.in
|
|
102
|
+
kpip --python .venv install -r pylock.toml
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If kpip is installed inside the environment it should manage, omit
|
|
106
|
+
`--python .venv` and invoke `kpip` directly.
|
|
107
|
+
|
|
108
|
+
## Commands
|
|
109
|
+
|
|
110
|
+
| Task | Commands |
|
|
111
|
+
| --- | --- |
|
|
112
|
+
| Install or prepare packages | `install`, `wheel`, `download` |
|
|
113
|
+
| Remove packages | `uninstall` |
|
|
114
|
+
| Inspect an environment | `list`, `freeze`, `show`, `inspect`, `check` |
|
|
115
|
+
| Resolve reproducibly | `lock` |
|
|
116
|
+
| Work with indexes and artifacts | `index`, `hash` |
|
|
117
|
+
| Inspect or clear local state | `cache` |
|
|
118
|
+
|
|
119
|
+
Run `kpip <command> --help` for command-specific options.
|
|
120
|
+
|
|
121
|
+
## Benchmarking
|
|
122
|
+
|
|
123
|
+
The benchmark suite uses [Hyperfine](https://github.com/sharkdp/hyperfine) to
|
|
124
|
+
compare kpip and uv through the same inputs and isolated targets. uv serves as
|
|
125
|
+
an external performance reference; before-and-after kpip runs show whether a
|
|
126
|
+
specific experiment helped. Neither replaces measuring an eventual patch in
|
|
127
|
+
pip's own architecture and test environment. The default offline workload is
|
|
128
|
+
generated locally and avoids network variance.
|
|
129
|
+
|
|
130
|
+
With `hyperfine` and `uv` available on `PATH`:
|
|
131
|
+
|
|
132
|
+
```console
|
|
133
|
+
cd scripts/benchmark
|
|
134
|
+
uv sync --locked --group tests
|
|
135
|
+
uv run kpip-bench --workload offline
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The harness includes startup, cold and warm locking, cold and warm
|
|
139
|
+
installation, and incremental installation cases. It can also run the
|
|
140
|
+
workloads used by uv's public benchmarks, but those are opt-in because live
|
|
141
|
+
indexes and platform-specific wheels make them less reproducible.
|
|
142
|
+
|
|
143
|
+
See the [benchmark guide](scripts/benchmark/README.md) for workload selection,
|
|
144
|
+
recording quiet-machine baselines, exporting raw Hyperfine results, and
|
|
145
|
+
comparing two commits. The measurement philosophy follows the
|
|
146
|
+
[X-Ray Performance Laboratory](https://github.com/KRRT7/xray): benchmark first,
|
|
147
|
+
then optimize what the evidence identifies.
|
|
148
|
+
|
|
149
|
+
## Design
|
|
150
|
+
|
|
151
|
+
The main path is intentionally layered:
|
|
152
|
+
|
|
153
|
+
```text
|
|
154
|
+
CLI -> resolution -> candidate discovery -> artifact preparation -> transaction
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Each layer owns one part of the package-installation process. Fast paths are
|
|
158
|
+
narrow recognizers that decline to the general implementation whenever they
|
|
159
|
+
cannot preserve the same semantics. Persistent caches are optional: a missing,
|
|
160
|
+
stale, or corrupt entry must become a cache miss rather than a correctness
|
|
161
|
+
failure.
|
|
162
|
+
|
|
163
|
+
The [architecture guide](docs/architecture.md) maps these boundaries, the
|
|
164
|
+
runtime dependency rules between packages, the resolver flow, and every
|
|
165
|
+
persistent cache.
|
|
166
|
+
|
|
167
|
+
## Development
|
|
168
|
+
|
|
169
|
+
Set up the test and typing environments:
|
|
170
|
+
|
|
171
|
+
```console
|
|
172
|
+
git clone https://github.com/warpforgedotco/kpip.git
|
|
173
|
+
cd kpip
|
|
174
|
+
uv sync --locked --group test --group typing
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Run the main local checks:
|
|
178
|
+
|
|
179
|
+
```console
|
|
180
|
+
uv run ruff check src tests conftest.py
|
|
181
|
+
uv run ruff format --check src tests conftest.py
|
|
182
|
+
uv run ty check src
|
|
183
|
+
uv run pytest tests \
|
|
184
|
+
--ignore=tests/cli/functional \
|
|
185
|
+
--ignore=tests/benchmarks \
|
|
186
|
+
-m "not network"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Functional tests exercise the real CLI in subprocesses:
|
|
190
|
+
|
|
191
|
+
```console
|
|
192
|
+
uv run pytest tests/cli/functional -n auto
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The [checks workflow](.github/workflows/checks.yml) is the source of truth for
|
|
196
|
+
the supported CI matrix. Before proposing a performance change, record a
|
|
197
|
+
comparable before-and-after benchmark; a locally faster microbenchmark is not
|
|
198
|
+
enough on its own. A change is not finished merely because it lands in kpip:
|
|
199
|
+
identify how its implementation, tests, and evidence can move upstream.
|
|
200
|
+
|
|
201
|
+
## Acknowledgements
|
|
202
|
+
|
|
203
|
+
kpip exists because of—and in service of—the interfaces, behavior, and testing
|
|
204
|
+
knowledge developed by [pip and PyPA](https://github.com/pypa/pip). It is meant
|
|
205
|
+
to help that work move forward, not to pull users or contributors into a
|
|
206
|
+
permanently separate ecosystem. Its performance experiments also learn from
|
|
207
|
+
the techniques and public workloads in [uv](https://github.com/astral-sh/uv).
|
|
208
|
+
Third-party code shipped with kpip is documented in the [vendoring
|
|
209
|
+
manifest](src/kpip/_vendor/VENDORED.md).
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
kpip is available under the [MIT License](LICENSE.txt).
|