shortcutxl 0.3.76 → 0.3.78
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.
- package/BINARY-INVENTORY.json +813 -813
- package/CHANGELOG.md +14 -0
- package/dist/ai/models.d.ts +10 -6
- package/dist/ai/models.generated.d.ts +72 -0
- package/dist/ai/models.generated.js +33 -0
- package/dist/ai/models.js +36 -13
- package/dist/ai/providers/anthropic.d.ts +4 -2
- package/dist/ai/providers/anthropic.js +59 -29
- package/dist/ai/providers/azure-openai-responses.d.ts +2 -1
- package/dist/ai/providers/azure-openai-responses.js +4 -20
- package/dist/ai/providers/google-vertex.d.ts +8 -2
- package/dist/ai/providers/google-vertex.js +66 -54
- package/dist/ai/providers/google.js +15 -48
- package/dist/ai/providers/openai-completions.d.ts +4 -1
- package/dist/ai/providers/openai-completions.js +26 -10
- package/dist/ai/providers/openai-reasoning.d.ts +5 -0
- package/dist/ai/providers/openai-reasoning.js +13 -0
- package/dist/ai/providers/openai-responses-shared.js +1 -1
- package/dist/ai/providers/openai-responses.d.ts +6 -2
- package/dist/ai/providers/openai-responses.js +28 -23
- package/dist/ai/providers/simple-options.d.ts +2 -3
- package/dist/ai/providers/simple-options.js +4 -6
- package/dist/ai/types.d.ts +19 -2
- package/dist/app/agent-session-runtime-adapter.js +7 -6
- package/dist/app/agent-session.d.ts +0 -15
- package/dist/app/agent-session.js +0 -37
- package/dist/app/approvals/approval-errors.d.ts +15 -0
- package/dist/app/approvals/approval-errors.js +14 -0
- package/dist/app/approvals/runtime-approval-gates.d.ts +1 -2
- package/dist/app/approvals/tool-approval.d.ts +1 -0
- package/dist/app/approvals/tool-approval.js +11 -23
- package/dist/app/approvals/types.d.ts +0 -14
- package/dist/app/approvals/types.js +0 -2
- package/dist/app/background/tool-summaries.js +0 -2
- package/dist/app/extensions/slash-commands.js +1 -3
- package/dist/app/local/tools/execute-code/executor.d.ts +1 -1
- package/dist/app/local/tools/execute-code/executor.js +20 -10
- package/dist/app/local/tools/execute-code/tool.js +21 -2
- package/dist/app/modes/action/agent.js +4 -5
- package/dist/app/modes/ask/agent.js +4 -6
- package/dist/app/modes/index.js +20 -10
- package/dist/app/modes/installation/agent.js +4 -5
- package/dist/app/modes/manage/agent.js +3 -4
- package/dist/app/modes/manage/prompt.js +1 -2
- package/dist/app/modes/metadata.d.ts +31 -0
- package/dist/app/modes/metadata.js +35 -0
- package/dist/app/modes/plan/agent.js +5 -8
- package/dist/app/modes/plan/prompt.js +3 -3
- package/dist/app/permissions/runtime-approval-flow.d.ts +1 -5
- package/dist/app/permissions/runtime-approval-flow.js +0 -28
- package/dist/app/permissions/tool-gates.d.ts +2 -3
- package/dist/app/permissions/tool-gates.js +3 -81
- package/dist/app/prompts/com-api.js +1 -1
- package/dist/app/prompts/shared-guidelines.js +7 -3
- package/dist/app/providers/google-vertex-gateway.js +4 -51
- package/dist/app/providers/model-registry.d.ts +1 -0
- package/dist/app/providers/model-registry.js +39 -0
- package/dist/app/providers/model-resolver.js +10 -7
- package/dist/app/providers/register-shortcut-provider.js +6 -6
- package/dist/app/providers/shortcut-api-v2-transport.js +4 -0
- package/dist/app/providers/shortcut-llm-proxy-client.d.ts +2 -2
- package/dist/app/providers/shortcut-llm-proxy-client.js +1 -0
- package/dist/app/resources/package-manager.js +2 -123
- package/dist/app/resources/resource-patterns.d.ts +9 -0
- package/dist/app/resources/resource-patterns.js +120 -0
- package/dist/app/session/forked-agent.d.ts +2 -2
- package/dist/app/session/model-manager.js +3 -2
- package/dist/app/session/session-lifecycle.js +3 -2
- package/dist/app/session/session-models.d.ts +2 -0
- package/dist/app/session/session-models.js +14 -6
- package/dist/app/settings-manager.d.ts +3 -3
- package/dist/app/shared/tools/execute-code/mog.d.ts +3 -1
- package/dist/app/shared/tools/execute-code/mog.js +18 -2
- package/dist/app/tools/bash.js +3 -3
- package/dist/app/tools/execute-code/index.d.ts +1 -0
- package/dist/app/tools/execute-code/index.js +3 -1
- package/dist/app/tools/find-ignore-files.d.ts +3 -0
- package/dist/app/tools/find-ignore-files.js +33 -0
- package/dist/app/tools/find.js +2 -21
- package/dist/app/tools/llm-analysis.js +0 -2
- package/dist/app/tools/refresh-context.d.ts +1 -1
- package/dist/app/tools/session-settings/update-session-settings.js +2 -2
- package/dist/app/tools/switch-mode.js +2 -2
- package/dist/app/tools/take-screenshot.js +0 -2
- package/dist/app/tools/task/runner.js +1 -2
- package/dist/app/tools/task/task.d.ts +1 -3
- package/dist/app/tools/task/task.js +20 -40
- package/dist/app/tools/web-search.js +12 -2
- package/dist/autocomplete/core.d.ts +33 -0
- package/dist/autocomplete/core.js +113 -0
- package/dist/{tui → autocomplete}/fuzzy.d.ts +0 -1
- package/dist/{tui → autocomplete}/fuzzy.js +0 -1
- package/dist/{tui/autocomplete.d.ts → autocomplete/index.d.ts} +0 -1
- package/dist/{tui/autocomplete.js → autocomplete/index.js} +62 -158
- package/dist/cli/args.js +1 -1
- package/dist/cli/list-models.js +1 -1
- package/dist/cli.js +26227 -30480
- package/dist/constants.d.ts +0 -2
- package/dist/constants.js +0 -3
- package/dist/contracts/agent-session-store.d.ts +1 -1
- package/dist/contracts/agent-settings.d.ts +1 -0
- package/dist/contracts/agent-settings.js +2 -1
- package/dist/contracts/model-call.d.ts +1 -2
- package/dist/contracts/model-call.js +1 -2
- package/dist/contracts/model-stream.d.ts +1 -0
- package/dist/contracts/model-stream.js +1 -0
- package/dist/contracts/wire.d.ts +10 -7
- package/dist/contracts/wire.js +8 -0
- package/dist/core/agent-engine.js +1 -1
- package/dist/core/core-types.d.ts +1 -21
- package/dist/core/defaults.d.ts +1 -1
- package/dist/core/defaults.js +9 -1
- package/dist/core/prompts/agent-guidelines.d.ts +4 -5
- package/dist/core/prompts/agent-guidelines.js +28 -42
- package/dist/core/session-schema.d.ts +1 -1
- package/dist/embedded-agent/ai-invoke.d.ts +1 -2
- package/dist/embedded-agent/ai-invoke.js +2 -70
- package/dist/embedded-agent/anthropic-messages-transport.d.ts +4 -20
- package/dist/embedded-agent/anthropic-messages-transport.js +23 -786
- package/dist/embedded-agent/bootstrap.js +2 -2
- package/dist/embedded-agent/compose.js +8 -7
- package/dist/embedded-agent/gateway-base-url.d.ts +3 -0
- package/dist/embedded-agent/gateway-base-url.js +35 -0
- package/dist/embedded-agent/google-vertex-transport.d.ts +2 -11
- package/dist/embedded-agent/google-vertex-transport.js +20 -117
- package/dist/embedded-agent/host-runtime-options.d.ts +0 -8
- package/dist/embedded-agent/host-runtime-options.js +10 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.d.ts +2 -2
- package/dist/embedded-agent/host-tools/invoke-llm/contract.js +4 -2
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.d.ts +8 -3
- package/dist/embedded-agent/host-tools/sandbox-llm/contract.js +12 -8
- package/dist/embedded-agent/host-tools/sandbox-llm/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/sandbox-llm/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/shared/index.js +1 -1
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.d.ts +7 -0
- package/dist/embedded-agent/host-tools/shared/llm-stream-error.js +10 -0
- package/dist/embedded-agent/host-tools/take-screenshot/contract.d.ts +0 -2
- package/dist/embedded-agent/host-tools/take-screenshot/contract.js +1 -3
- package/dist/embedded-agent/host-tools/take-screenshot/index.d.ts +1 -1
- package/dist/embedded-agent/host-tools/take-screenshot/index.js +1 -1
- package/dist/embedded-agent/host-tools/task/agents/clone.js +1 -2
- package/dist/embedded-agent/host-tools/task/contract.js +1 -1
- package/dist/embedded-agent/index.d.ts +3 -4
- package/dist/embedded-agent/index.js +2 -3
- package/dist/embedded-agent/model-selection.d.ts +0 -6
- package/dist/embedded-agent/model-selection.js +15 -8
- package/dist/embedded-agent/openai-completions-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-completions-transport.js +20 -120
- package/dist/embedded-agent/openai-responses-transport.d.ts +2 -11
- package/dist/embedded-agent/openai-responses-transport.js +15 -170
- package/dist/embedded-agent/prompt/build.js +1 -2
- package/dist/embedded-agent/prompt/sections.d.ts +1 -1
- package/dist/embedded-agent/prompt/sections.js +2 -0
- package/dist/embedded-agent/provider-native-request.d.ts +29 -0
- package/dist/embedded-agent/provider-native-request.js +65 -0
- package/dist/embedded-agent/run-stats.d.ts +1 -1
- package/dist/embedded-agent/stream.d.ts +10 -96
- package/dist/embedded-agent/stream.js +31 -556
- package/dist/embedded-agent/suggestions.d.ts +1 -1
- package/dist/embedded-agent/suggestions.js +1 -1
- package/dist/embedded-agent/worker-bridge/host-client.d.ts +7 -0
- package/dist/embedded-agent/worker-bridge/host-client.js +15 -0
- package/dist/embedded-agent/worker-bridge/worker-port.js +17 -1
- package/dist/main.js +18 -14
- package/dist/rpc/index.d.ts +1 -1
- package/dist/rpc/rpc-approval-gates.js +1 -2
- package/dist/rpc/rpc-host.d.ts +4 -0
- package/dist/rpc/rpc-host.js +13 -24
- package/dist/rpc/rpc-types.d.ts +6 -17
- package/dist/shared/platform/open.d.ts +4 -1
- package/dist/shared/platform/open.js +14 -2
- package/dist/shell/approvals/runtime-approval-gates.js +1 -3
- package/dist/shell/components/selectors/model-selector.js +2 -1
- package/dist/shell/components/selectors/session-selector-search.js +1 -1
- package/dist/shell/components/selectors/thinking-selector.js +7 -6
- package/dist/shell/index.d.ts +0 -1
- package/dist/shell/index.js +0 -1
- package/dist/shell/interactive/interactive-mode-options.d.ts +10 -0
- package/dist/shell/interactive/interactive-mode.d.ts +6 -12
- package/dist/shell/interactive/interactive-mode.js +39 -158
- package/dist/shell/interactive/slash-commands.d.ts +0 -34
- package/dist/shell/interactive/slash-commands.js +0 -2
- package/dist/shell/links/local-file-link-input.d.ts +15 -0
- package/dist/shell/links/local-file-link-input.js +38 -0
- package/dist/shell/links/local-file-link.d.ts +7 -0
- package/dist/shell/links/local-file-link.js +35 -0
- package/dist/shell/links/local-file-opener.d.ts +16 -0
- package/dist/shell/links/local-file-opener.js +90 -0
- package/dist/shell/session-client.d.ts +0 -1
- package/dist/shell/session-client.js +0 -6
- package/dist/shell/status/update-check-scheduler.d.ts +30 -0
- package/dist/shell/status/update-check-scheduler.js +71 -0
- package/dist/shell/status/update-reminder-controller.d.ts +22 -0
- package/dist/shell/status/update-reminder-controller.js +40 -0
- package/dist/shell/status/update-reminder.d.ts +6 -0
- package/dist/shell/status/update-reminder.js +4 -0
- package/dist/shell/theme/dark.json +1 -2
- package/dist/shell/theme/light.json +1 -2
- package/dist/shell/theme/runtime.d.ts +2 -3
- package/dist/shell/theme/runtime.js +2 -6
- package/dist/shell/theme/theme-schema.json +1 -6
- package/dist/shortcut-model-catalog.d.ts +7 -2
- package/dist/shortcut-model-catalog.js +134 -10
- package/dist/startup/update-manager.d.ts +6 -6
- package/dist/startup/update-manager.js +23 -38
- package/dist/startup/update-prompt.d.ts +1 -0
- package/dist/startup/update-prompt.js +2 -2
- package/dist/tui/components/editor.d.ts +1 -1
- package/dist/tui/components/editor.js +1 -1
- package/dist/tui/components/markdown.js +15 -6
- package/dist/tui/components/settings-list.js +1 -1
- package/dist/tui/editor-component.d.ts +1 -1
- package/dist/tui/index.d.ts +7 -8
- package/dist/tui/index.js +7 -6
- package/dist/tui/tui.d.ts +2 -0
- package/dist/tui/tui.js +16 -1
- package/dist/tui/utils.d.ts +7 -0
- package/dist/tui/utils.js +58 -8
- package/native-app/main/index.js +3200 -48
- package/native-app/main/{photon_rs-SoVDgheu.js → photon_rs-XkYyYTVA.js} +2 -2
- package/native-app/package.json +1 -1
- package/native-app/preload/index.cjs +2 -0
- package/native-app/renderer/assets/{index-CFc-oZuS.js → index-B4jz6epR.js} +825 -155
- package/native-app/renderer/assets/{index-OhGE0UY4.css → index-C__g36ft.css} +412 -162
- package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
- package/native-app/renderer/index.html +2 -2
- package/package.json +17 -3
- package/skills/add-custom-model/SKILL.md +52 -0
- package/user-docs/dist/index.html +1 -1
- package/user-docs/dist/shortcutxl-docs.pdf +0 -0
- package/xll/ShortcutXL.xll +0 -0
- package/xll/modules/shortcut_xl/_managed.py +26 -7
- package/xll/modules/shortcut_xl/_tracking.py +141 -251
- package/xll/modules/shortcut_xl/api/__init__.py +60 -0
- package/xll/modules/shortcut_xl/api/workbook.py +9 -1
- package/xll/modules/shortcut_xl/api/worksheet.py +4 -1
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/build_env/__init__.py +25 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/base.py +103 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/installer.py +333 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/noop.py +42 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/venv.py +145 -0
- package/xll/python/Lib/site-packages/pip/_internal/build_env/virtual.py +139 -0
- package/xll/python/Lib/site-packages/pip/_internal/cache.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/autocompletion.py +4 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/base_command.py +11 -14
- package/xll/python/Lib/site-packages/pip/_internal/cli/cmdoptions.py +133 -22
- package/xll/python/Lib/site-packages/pip/_internal/cli/index_command.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/cli/main.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/cli/main_parser.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/parser.py +10 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/progress_bars.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/cli/req_command.py +57 -25
- package/xll/python/Lib/site-packages/pip/_internal/cli/status_codes.py +1 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/cache.py +7 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/configuration.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/debug.py +4 -5
- package/xll/python/Lib/site-packages/pip/_internal/commands/download.py +4 -0
- package/xll/python/Lib/site-packages/pip/_internal/commands/freeze.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/index.py +10 -3
- package/xll/python/Lib/site-packages/pip/_internal/commands/inspect.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/commands/install.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/list.py +11 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/lock.py +4 -6
- package/xll/python/Lib/site-packages/pip/_internal/commands/show.py +14 -8
- package/xll/python/Lib/site-packages/pip/_internal/commands/wheel.py +7 -1
- package/xll/python/Lib/site-packages/pip/_internal/configuration.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/base.py +5 -3
- package/xll/python/Lib/site-packages/pip/_internal/distributions/installed.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/distributions/sdist.py +45 -20
- package/xll/python/Lib/site-packages/pip/_internal/distributions/wheel.py +3 -2
- package/xll/python/Lib/site-packages/pip/_internal/exceptions.py +174 -0
- package/xll/python/Lib/site-packages/pip/_internal/index/collector.py +70 -48
- package/xll/python/Lib/site-packages/pip/_internal/index/package_finder.py +46 -7
- package/xll/python/Lib/site-packages/pip/_internal/index/sources.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/locations/_sysconfig.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/locations/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/base.py +10 -5
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +8 -3
- package/xll/python/Lib/site-packages/pip/_internal/models/candidate.py +5 -1
- package/xll/python/Lib/site-packages/pip/_internal/models/link.py +53 -13
- package/xll/python/Lib/site-packages/pip/_internal/network/auth.py +38 -21
- package/xll/python/Lib/site-packages/pip/_internal/network/cache.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/network/download.py +58 -11
- package/xll/python/Lib/site-packages/pip/_internal/network/session.py +35 -40
- package/xll/python/Lib/site-packages/pip/_internal/network/utils.py +109 -1
- package/xll/python/Lib/site-packages/pip/_internal/operations/check.py +2 -3
- package/xll/python/Lib/site-packages/pip/_internal/operations/install/wheel.py +23 -18
- package/xll/python/Lib/site-packages/pip/_internal/operations/prepare.py +152 -7
- package/xll/python/Lib/site-packages/pip/_internal/req/__init__.py +2 -0
- package/xll/python/Lib/site-packages/pip/_internal/req/constructors.py +54 -69
- package/xll/python/Lib/site-packages/pip/_internal/req/req_file.py +6 -6
- package/xll/python/Lib/site-packages/pip/_internal/req/req_install.py +25 -21
- package/xll/python/Lib/site-packages/pip/_internal/req/req_uninstall.py +13 -8
- package/xll/python/Lib/site-packages/pip/_internal/resolution/base.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +1 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -1
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +39 -52
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +3 -3
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +3 -0
- package/xll/python/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +9 -0
- package/xll/python/Lib/site-packages/pip/_internal/utils/compat.py +15 -9
- package/xll/python/Lib/site-packages/pip/_internal/utils/deprecation.py +6 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/filesystem.py +2 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/logging.py +11 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/misc.py +48 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/pylock.py +18 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/retry.py +2 -1
- package/xll/python/Lib/site-packages/pip/_internal/utils/subprocess.py +4 -3
- package/xll/python/Lib/site-packages/pip/_internal/utils/temp_dir.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/unpacking.py +30 -4
- package/xll/python/Lib/site-packages/pip/_internal/utils/urls.py +5 -2
- package/xll/python/Lib/site-packages/pip/_internal/utils/virtualenv.py +2 -36
- package/xll/python/Lib/site-packages/pip/_internal/vcs/git.py +8 -5
- package/xll/python/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +1 -2
- package/xll/python/Lib/site-packages/pip/_internal/wheel_builder.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/bom.cdx.json +231 -0
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/certifi/cacert.pem +0 -631
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/compat.py +34 -64
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/resources.py +28 -14
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/scripts.py +7 -3
- package/xll/python/Lib/site-packages/pip/_vendor/distlib/util.py +48 -11
- package/xll/python/Lib/site-packages/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/__main__.py +6 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/cli.py +128 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/codec.py +50 -13
- package/xll/python/Lib/site-packages/pip/_vendor/idna/compat.py +26 -0
- package/xll/python/Lib/site-packages/pip/_vendor/idna/core.py +352 -141
- package/xll/python/Lib/site-packages/pip/_vendor/idna/idnadata.py +571 -2983
- package/xll/python/Lib/site-packages/pip/_vendor/idna/intranges.py +5 -7
- package/xll/python/Lib/site-packages/pip/_vendor/idna/package_data.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/idna/uts46data.py +16887 -8832
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +352 -66
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +11 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/_xdg.py +171 -0
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/android.py +92 -41
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/api.py +213 -49
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/macos.py +128 -51
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/unix.py +176 -127
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/platformdirs/windows.py +185 -68
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__init__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/__main__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/console.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +10 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatter.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexer.py +7 -5
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +9 -8
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +35 -32
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/modeline.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/plugin.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/regexopt.py +13 -2
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/scanner.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/style.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/token.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/unistring.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/pygments/util.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__init__.py +52 -16
- package/xll/python/Lib/site-packages/pip/_vendor/requests/__version__.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/_types.py +183 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/adapters.py +101 -50
- package/xll/python/Lib/site-packages/pip/_vendor/requests/api.py +31 -8
- package/xll/python/Lib/site-packages/pip/_vendor/requests/auth.py +80 -40
- package/xll/python/Lib/site-packages/pip/_vendor/requests/compat.py +9 -3
- package/xll/python/Lib/site-packages/pip/_vendor/requests/cookies.py +143 -79
- package/xll/python/Lib/site-packages/pip/_vendor/requests/exceptions.py +15 -5
- package/xll/python/Lib/site-packages/pip/_vendor/requests/help.py +13 -10
- package/xll/python/Lib/site-packages/pip/_vendor/requests/hooks.py +23 -9
- package/xll/python/Lib/site-packages/pip/_vendor/requests/models.py +265 -126
- package/xll/python/Lib/site-packages/pip/_vendor/requests/py.typed +0 -0
- package/xll/python/Lib/site-packages/pip/_vendor/requests/sessions.py +164 -78
- package/xll/python/Lib/site-packages/pip/_vendor/requests/status_codes.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/requests/structures.py +51 -20
- package/xll/python/Lib/site-packages/pip/_vendor/requests/utils.py +161 -89
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/__init__.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_parser.py +9 -4
- package/xll/python/Lib/site-packages/pip/_vendor/tomli/_re.py +13 -9
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_base_connection.py +3 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/_version.py +8 -18
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connection.py +4 -4
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +23 -10
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/emscripten/response.py +5 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +7 -8
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +1 -1
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +2 -2
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/fields.py +14 -14
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +8 -6
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/response.py +35 -22
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +8 -0
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +11 -61
- package/xll/python/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +5 -11
- package/xll/python/Lib/site-packages/pip/_vendor/vendor.txt +8 -8
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/METADATA +3 -2
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/RECORD +208 -188
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/AUTHORS.txt +20 -0
- package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/idna/LICENSE.md +1 -1
- package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/idna.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.13.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
- package/xll/python/Scripts/pywin32_testall.exe +0 -0
- package/dist/app/collab/awareness.d.ts +0 -32
- package/dist/app/collab/awareness.js +0 -52
- package/dist/app/collab/collab-client.d.ts +0 -37
- package/dist/app/collab/collab-client.js +0 -208
- package/dist/app/collab/collab-manager.d.ts +0 -91
- package/dist/app/collab/collab-manager.js +0 -218
- package/dist/app/collab/collab-sync.d.ts +0 -62
- package/dist/app/collab/collab-sync.js +0 -215
- package/dist/app/collab/index.d.ts +0 -9
- package/dist/app/collab/index.js +0 -6
- package/dist/app/collab/super-fight.d.ts +0 -90
- package/dist/app/collab/super-fight.js +0 -310
- package/dist/app/collab/sync-bridge.d.ts +0 -35
- package/dist/app/collab/sync-bridge.js +0 -109
- package/dist/app/collab/types.d.ts +0 -75
- package/dist/app/collab/types.js +0 -5
- package/dist/embedded-agent/ai-content.d.ts +0 -52
- package/dist/embedded-agent/ai-content.js +0 -101
- package/dist/embedded-agent/host-tools/shared/llm-stream.d.ts +0 -31
- package/dist/embedded-agent/host-tools/shared/llm-stream.js +0 -136
- package/dist/embedded-agent/model-call-orchestrator.d.ts +0 -22
- package/dist/embedded-agent/model-call-orchestrator.js +0 -22
- package/dist/embedded-agent/stream-errors.d.ts +0 -10
- package/dist/embedded-agent/stream-errors.js +0 -73
- package/dist/embedded-agent/stream-message-state.d.ts +0 -14
- package/dist/embedded-agent/stream-message-state.js +0 -271
- package/dist/embedded-agent/stream-sse.d.ts +0 -78
- package/dist/embedded-agent/stream-sse.js +0 -73
- package/dist/shell/approvals/task-spawn-approval.d.ts +0 -20
- package/dist/shell/approvals/task-spawn-approval.js +0 -93
- package/dist/shell/interactive/collab-command.d.ts +0 -9
- package/dist/shell/interactive/collab-command.js +0 -115
- package/dist/shell/interactive/super-fight-ui.d.ts +0 -80
- package/dist/shell/interactive/super-fight-ui.js +0 -484
- package/dist/shell/status/collab-status.d.ts +0 -18
- package/dist/shell/status/collab-status.js +0 -46
- package/xll/python/Lib/site-packages/pip/_internal/build_env.py +0 -606
- /package/dist/{tui → autocomplete}/skill-autocomplete.js +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/INSTALLER +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/REQUESTED +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/WHEEL +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/entry_points.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/cachecontrol/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/certifi/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distlib/LICENSE.txt +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/distro/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/msgpack/COPYING +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.APACHE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/packaging/LICENSE.BSD +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pkg_resources/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/platformdirs/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pygments/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/pyproject_hooks/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/requests/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/resolvelib/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/rich/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/tomli_w/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/truststore/LICENSE +0 -0
- /package/xll/python/Lib/site-packages/{pip-26.1.2.dist-info → pip-26.2.dist-info}/licenses/src/pip/_vendor/urllib3/LICENSE.txt +0 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import sysconfig
|
|
6
|
+
from collections.abc import Iterable
|
|
7
|
+
from types import TracebackType
|
|
8
|
+
from typing import TYPE_CHECKING
|
|
9
|
+
|
|
10
|
+
from pip._internal.build_env.base import (
|
|
11
|
+
BuildEnvironment,
|
|
12
|
+
BuildEnvironmentInstaller,
|
|
13
|
+
Prefix,
|
|
14
|
+
)
|
|
15
|
+
from pip._internal.exceptions import VenvCreationError, VenvImportError
|
|
16
|
+
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from pip._internal.req.req_install import InstallRequirement
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _get_venv_path_from_sysconfig(name: str, env_dir: str) -> str:
|
|
23
|
+
vars = {
|
|
24
|
+
"base": env_dir,
|
|
25
|
+
"platbase": env_dir,
|
|
26
|
+
}
|
|
27
|
+
return sysconfig.get_path(name, scheme="venv", vars=vars)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class VenvBuildEnvironment(BuildEnvironment):
|
|
31
|
+
"""A venv-based build environment."""
|
|
32
|
+
|
|
33
|
+
def __init__(self, installer: BuildEnvironmentInstaller) -> None:
|
|
34
|
+
# We defer this import because certain distributions of Python do not include
|
|
35
|
+
# a functional venv out of the box.
|
|
36
|
+
try:
|
|
37
|
+
import venv
|
|
38
|
+
except ImportError:
|
|
39
|
+
raise VenvImportError
|
|
40
|
+
|
|
41
|
+
self._env_path = TempDirectory(
|
|
42
|
+
kind=tempdir_kinds.BUILD_ENV, globally_managed=True
|
|
43
|
+
).path
|
|
44
|
+
# Use symlinks to support relocatable Python installations on POSIX, including
|
|
45
|
+
# python-build-standalone. This matches upstream venv CLI's behaviour.
|
|
46
|
+
env = venv.EnvBuilder(symlinks=(os.name != "nt"))
|
|
47
|
+
try:
|
|
48
|
+
context = env.ensure_directories(self._env_path)
|
|
49
|
+
env.create(self._env_path)
|
|
50
|
+
except OSError as e:
|
|
51
|
+
raise VenvCreationError(str(e))
|
|
52
|
+
|
|
53
|
+
if sys.version_info >= (3, 12):
|
|
54
|
+
# The context object was only documented in Python 3.12
|
|
55
|
+
self.lib_dirs = [context.lib_path]
|
|
56
|
+
self._bin_path = context.bin_path
|
|
57
|
+
elif sys.version_info[:2] == (3, 11):
|
|
58
|
+
# On Python 3.11, we can use sysconfig.
|
|
59
|
+
self.lib_dirs = [_get_venv_path_from_sysconfig("purelib", self._env_path)]
|
|
60
|
+
self._bin_path = _get_venv_path_from_sysconfig("scripts", self._env_path)
|
|
61
|
+
else:
|
|
62
|
+
# Otherwise, we need to manually construct all the paths... sigh.
|
|
63
|
+
if sys.platform == "win32":
|
|
64
|
+
libpath = os.path.join(self._env_path, "Lib", "site-packages")
|
|
65
|
+
else:
|
|
66
|
+
python = "pypy" if sys.implementation.name == "pypy" else "python"
|
|
67
|
+
libpath = os.path.join(
|
|
68
|
+
self._env_path,
|
|
69
|
+
"lib",
|
|
70
|
+
f"{python}{sys.version_info.major}.{sys.version_info.minor}",
|
|
71
|
+
"site-packages",
|
|
72
|
+
)
|
|
73
|
+
self.lib_dirs = [libpath]
|
|
74
|
+
# Same reasoning for try-except as for python_executable below.
|
|
75
|
+
try:
|
|
76
|
+
self._bin_path = context.bin_path
|
|
77
|
+
except AttributeError:
|
|
78
|
+
scripts_dir = "Scripts" if os.name == "nt" else "bin"
|
|
79
|
+
self._bin_path = os.path.join(self._env_path, scripts_dir)
|
|
80
|
+
|
|
81
|
+
# There are enough ways trying to construct the Python executable path can go
|
|
82
|
+
# wrong that we're better off assuming that the context object has the right
|
|
83
|
+
# attributes, and only when they don't exist do we try to guess.
|
|
84
|
+
#
|
|
85
|
+
# These attributes seem to exist in every CPython version after 3.10.1 and
|
|
86
|
+
# are documented to exist on 3.12 and higher.
|
|
87
|
+
try:
|
|
88
|
+
self.python_executable = context.env_exec_cmd
|
|
89
|
+
except AttributeError:
|
|
90
|
+
try:
|
|
91
|
+
self.python_executable = context.env_exe
|
|
92
|
+
except AttributeError:
|
|
93
|
+
executable_name = "python.exe" if os.name == "nt" else "python"
|
|
94
|
+
self.python_executable = os.path.join(self._bin_path, executable_name)
|
|
95
|
+
|
|
96
|
+
self._save_env: dict[str, str | None] = {}
|
|
97
|
+
self._installer = installer
|
|
98
|
+
|
|
99
|
+
if not os.path.exists(self.python_executable):
|
|
100
|
+
# This error is only likely on Windows due to interference from AV software.
|
|
101
|
+
raise VenvCreationError(
|
|
102
|
+
f"Python executable failed to copy to {self.python_executable}"
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
def __enter__(self) -> None:
|
|
106
|
+
# We want backend calls to be able to use binaries installed as if this
|
|
107
|
+
# virtual environment was "activated".
|
|
108
|
+
self._save_env = {
|
|
109
|
+
name: os.environ.get(name, None) for name in ("PATH", "PYTHONPATH")
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
new_path = [self._bin_path]
|
|
113
|
+
if old_path := self._save_env["PATH"]:
|
|
114
|
+
new_path.extend(old_path.split(os.pathsep))
|
|
115
|
+
# However, we don't want a pre-existing PYTHONPATH to influence the
|
|
116
|
+
# backend calls.
|
|
117
|
+
os.environ.update({"PATH": os.pathsep.join(new_path), "PYTHONPATH": ""})
|
|
118
|
+
|
|
119
|
+
def __exit__(
|
|
120
|
+
self,
|
|
121
|
+
exc_type: type[BaseException] | None,
|
|
122
|
+
exc_val: BaseException | None,
|
|
123
|
+
exc_tb: TracebackType | None,
|
|
124
|
+
) -> None:
|
|
125
|
+
for varname, old_value in self._save_env.items():
|
|
126
|
+
if old_value is None:
|
|
127
|
+
os.environ.pop(varname, None)
|
|
128
|
+
else:
|
|
129
|
+
os.environ[varname] = old_value
|
|
130
|
+
|
|
131
|
+
def install_requirements(
|
|
132
|
+
self,
|
|
133
|
+
requirements: Iterable[str],
|
|
134
|
+
prefix_as_string: str,
|
|
135
|
+
*,
|
|
136
|
+
kind: str,
|
|
137
|
+
for_req: InstallRequirement | None = None,
|
|
138
|
+
) -> None:
|
|
139
|
+
if not requirements:
|
|
140
|
+
return
|
|
141
|
+
|
|
142
|
+
# TODO: when better support for installing to arbitrary Python environments
|
|
143
|
+
# is added, replace this prefix hack with that.
|
|
144
|
+
prefix = Prefix(self._env_path, venv_executable=self.python_executable)
|
|
145
|
+
self._installer.install(requirements, prefix, kind=kind, for_req=for_req)
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import site
|
|
5
|
+
import sys
|
|
6
|
+
import textwrap
|
|
7
|
+
from collections import OrderedDict
|
|
8
|
+
from collections.abc import Iterable
|
|
9
|
+
from types import TracebackType
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
from pip._internal.build_env.base import (
|
|
13
|
+
BuildEnvironment,
|
|
14
|
+
BuildEnvironmentInstaller,
|
|
15
|
+
Prefix,
|
|
16
|
+
)
|
|
17
|
+
from pip._internal.utils.temp_dir import TempDirectory, tempdir_kinds
|
|
18
|
+
|
|
19
|
+
if TYPE_CHECKING:
|
|
20
|
+
from pip._internal.req.req_install import InstallRequirement
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def get_system_sitepackages() -> set[str]:
|
|
24
|
+
"""Get system site packages, as a normalized set of strings."""
|
|
25
|
+
system_sites = site.getsitepackages()
|
|
26
|
+
return {os.path.normcase(path) for path in system_sites}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class VirtualBuildEnvironment(BuildEnvironment):
|
|
30
|
+
"""Legacy build environment implementation.
|
|
31
|
+
|
|
32
|
+
Patches sys.path and uses sitecustomize.py to isolate Python processes. It has
|
|
33
|
+
known bugs and weird edge cases, but it exists as a fallback for platforms where
|
|
34
|
+
the venv module is unavailable or dysfunctional.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
def __init__(self, installer: BuildEnvironmentInstaller) -> None:
|
|
38
|
+
self.python_executable = sys.executable
|
|
39
|
+
self.installer = installer
|
|
40
|
+
temp_dir = TempDirectory(kind=tempdir_kinds.BUILD_ENV, globally_managed=True)
|
|
41
|
+
|
|
42
|
+
self._prefixes = OrderedDict(
|
|
43
|
+
(name, Prefix(os.path.join(temp_dir.path, name)))
|
|
44
|
+
for name in ("normal", "overlay")
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
self._bin_dirs: list[str] = []
|
|
48
|
+
self.lib_dirs: list[str] = []
|
|
49
|
+
for prefix in reversed(list(self._prefixes.values())):
|
|
50
|
+
self._bin_dirs.append(prefix.bin_dir)
|
|
51
|
+
self.lib_dirs.extend(prefix.lib_dirs)
|
|
52
|
+
|
|
53
|
+
# Customize site to:
|
|
54
|
+
# - ensure .pth files are honored
|
|
55
|
+
# - prevent access to system site packages
|
|
56
|
+
system_sites = get_system_sitepackages()
|
|
57
|
+
|
|
58
|
+
self._site_dir = os.path.join(temp_dir.path, "site")
|
|
59
|
+
if not os.path.exists(self._site_dir):
|
|
60
|
+
os.mkdir(self._site_dir)
|
|
61
|
+
with open(
|
|
62
|
+
os.path.join(self._site_dir, "sitecustomize.py"), "w", encoding="utf-8"
|
|
63
|
+
) as fp:
|
|
64
|
+
fp.write(textwrap.dedent("""
|
|
65
|
+
import os, site, sys
|
|
66
|
+
|
|
67
|
+
# First, discover all system-sites related paths.
|
|
68
|
+
original_sys_path = sys.path[:]
|
|
69
|
+
# Clear sys.path so addsitedir() will add system site paths and paths
|
|
70
|
+
# added by contained .pth files to sys.path reliably. This is necessary
|
|
71
|
+
# since Python 3.15, which notably no longer re-executes .pth files for
|
|
72
|
+
# known paths.
|
|
73
|
+
sys.path = []
|
|
74
|
+
known_paths = set()
|
|
75
|
+
for path in {system_sites!r}:
|
|
76
|
+
site.addsitedir(path, known_paths=known_paths)
|
|
77
|
+
system_paths = set(os.path.normcase(path) for path in sys.path)
|
|
78
|
+
|
|
79
|
+
# Drop discovered system-sites related paths.
|
|
80
|
+
original_sys_path = [
|
|
81
|
+
path for path in original_sys_path
|
|
82
|
+
if os.path.normcase(path) not in system_paths
|
|
83
|
+
]
|
|
84
|
+
sys.path = original_sys_path
|
|
85
|
+
|
|
86
|
+
# Second, add lib directories.
|
|
87
|
+
# ensuring .pth file are processed.
|
|
88
|
+
for path in {lib_dirs!r}:
|
|
89
|
+
assert not path in sys.path
|
|
90
|
+
site.addsitedir(path)
|
|
91
|
+
""").format(system_sites=system_sites, lib_dirs=self.lib_dirs))
|
|
92
|
+
|
|
93
|
+
def __enter__(self) -> None:
|
|
94
|
+
self._save_env = {
|
|
95
|
+
name: os.environ.get(name, None)
|
|
96
|
+
for name in ("PATH", "PYTHONNOUSERSITE", "PYTHONPATH")
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
path = self._bin_dirs[:]
|
|
100
|
+
old_path = self._save_env["PATH"]
|
|
101
|
+
if old_path:
|
|
102
|
+
path.extend(old_path.split(os.pathsep))
|
|
103
|
+
|
|
104
|
+
pythonpath = [self._site_dir]
|
|
105
|
+
|
|
106
|
+
os.environ.update(
|
|
107
|
+
{
|
|
108
|
+
"PATH": os.pathsep.join(path),
|
|
109
|
+
"PYTHONNOUSERSITE": "1",
|
|
110
|
+
"PYTHONPATH": os.pathsep.join(pythonpath),
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
def __exit__(
|
|
115
|
+
self,
|
|
116
|
+
exc_type: type[BaseException] | None,
|
|
117
|
+
exc_val: BaseException | None,
|
|
118
|
+
exc_tb: TracebackType | None,
|
|
119
|
+
) -> None:
|
|
120
|
+
for varname, old_value in self._save_env.items():
|
|
121
|
+
if old_value is None:
|
|
122
|
+
os.environ.pop(varname, None)
|
|
123
|
+
else:
|
|
124
|
+
os.environ[varname] = old_value
|
|
125
|
+
|
|
126
|
+
def install_requirements(
|
|
127
|
+
self,
|
|
128
|
+
requirements: Iterable[str],
|
|
129
|
+
prefix_as_string: str,
|
|
130
|
+
*,
|
|
131
|
+
kind: str,
|
|
132
|
+
for_req: InstallRequirement | None = None,
|
|
133
|
+
) -> None:
|
|
134
|
+
prefix = self._prefixes[prefix_as_string]
|
|
135
|
+
assert not prefix.setup
|
|
136
|
+
prefix.setup = True
|
|
137
|
+
if not requirements:
|
|
138
|
+
return
|
|
139
|
+
self.installer.install(requirements, prefix, kind=kind, for_req=for_req)
|
|
@@ -134,10 +134,13 @@ class SimpleWheelCache(Cache):
|
|
|
134
134
|
) -> Link:
|
|
135
135
|
candidates = []
|
|
136
136
|
|
|
137
|
+
if link.is_existing_dir():
|
|
138
|
+
return link
|
|
137
139
|
if not package_name:
|
|
138
140
|
return link
|
|
139
141
|
|
|
140
142
|
canonical_package_name = canonicalize_name(package_name)
|
|
143
|
+
supported_tags_set = set(supported_tags)
|
|
141
144
|
for wheel_name, wheel_dir in self._get_candidates(link, canonical_package_name):
|
|
142
145
|
try:
|
|
143
146
|
wheel = Wheel(wheel_name)
|
|
@@ -152,7 +155,7 @@ class SimpleWheelCache(Cache):
|
|
|
152
155
|
package_name,
|
|
153
156
|
)
|
|
154
157
|
continue
|
|
155
|
-
if not wheel.supported(
|
|
158
|
+
if not wheel.supported(supported_tags_set):
|
|
156
159
|
# Built for a different python/arch/etc
|
|
157
160
|
continue
|
|
158
161
|
candidates.append(
|
|
@@ -11,7 +11,6 @@ from typing import Any
|
|
|
11
11
|
|
|
12
12
|
from pip._internal.cli.main_parser import create_main_parser
|
|
13
13
|
from pip._internal.commands import commands_dict, create_command
|
|
14
|
-
from pip._internal.metadata import get_default_environment
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
def autocomplete() -> None:
|
|
@@ -51,6 +50,10 @@ def autocomplete() -> None:
|
|
|
51
50
|
"uninstall",
|
|
52
51
|
]
|
|
53
52
|
if should_list_installed:
|
|
53
|
+
# NOTE: this import is deferred until absolutely necessary as it's slow,
|
|
54
|
+
# and it's important that autocompletion is fast.
|
|
55
|
+
from pip._internal.metadata import get_default_environment
|
|
56
|
+
|
|
54
57
|
env = get_default_environment()
|
|
55
58
|
lc = current.lower()
|
|
56
59
|
installed = [
|
|
@@ -9,9 +9,8 @@ import optparse
|
|
|
9
9
|
import os
|
|
10
10
|
import sys
|
|
11
11
|
import traceback
|
|
12
|
-
from collections.abc import Iterator
|
|
12
|
+
from collections.abc import Callable, Iterator
|
|
13
13
|
from optparse import Values
|
|
14
|
-
from typing import Callable
|
|
15
14
|
|
|
16
15
|
from pip._vendor.rich import reconfigure
|
|
17
16
|
from pip._vendor.rich import traceback as rich_traceback
|
|
@@ -20,6 +19,7 @@ from pip._internal.cli import cmdoptions
|
|
|
20
19
|
from pip._internal.cli.command_context import CommandContextMixIn
|
|
21
20
|
from pip._internal.cli.parser import ConfigOptionParser, UpdatingDefaultsHelpFormatter
|
|
22
21
|
from pip._internal.cli.status_codes import (
|
|
22
|
+
BROKEN_STDOUT,
|
|
23
23
|
ERROR,
|
|
24
24
|
PREVIOUS_BUILD_DIR_ERROR,
|
|
25
25
|
UNKNOWN_ERROR,
|
|
@@ -147,7 +147,15 @@ class Command(CommandContextMixIn):
|
|
|
147
147
|
except OSError:
|
|
148
148
|
pass
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
# redirect stdout to os.devnull so that the exit cleanup doesn't
|
|
151
|
+
# produce "BrokenPipeError" when exiting.
|
|
152
|
+
devnull = os.open(os.devnull, os.O_WRONLY)
|
|
153
|
+
try:
|
|
154
|
+
os.dup2(devnull, 1)
|
|
155
|
+
finally:
|
|
156
|
+
os.close(devnull)
|
|
157
|
+
|
|
158
|
+
return BROKEN_STDOUT
|
|
151
159
|
except KeyboardInterrupt:
|
|
152
160
|
logger.critical("Operation cancelled by user")
|
|
153
161
|
logger.debug("Exception information:", exc_info=True)
|
|
@@ -244,17 +252,6 @@ class Command(CommandContextMixIn):
|
|
|
244
252
|
)
|
|
245
253
|
options.cache_dir = None
|
|
246
254
|
|
|
247
|
-
if (
|
|
248
|
-
"inprocess-build-deps" in options.features_enabled
|
|
249
|
-
and os.environ.get("PIP_CONSTRAINT", "")
|
|
250
|
-
and "build-constraint" not in options.features_enabled
|
|
251
|
-
):
|
|
252
|
-
logger.warning(
|
|
253
|
-
"In-process build dependencies are enabled, "
|
|
254
|
-
"PIP_CONSTRAINT will have no effect for build dependencies"
|
|
255
|
-
)
|
|
256
|
-
options.features_enabled.append("build-constraint")
|
|
257
|
-
|
|
258
255
|
return self._run_wrapper(level_number, options, args)
|
|
259
256
|
|
|
260
257
|
def handler_map(self) -> dict[str, Callable[[Values, list[str]], None]]:
|
|
@@ -16,11 +16,12 @@ import os
|
|
|
16
16
|
import pathlib
|
|
17
17
|
import re
|
|
18
18
|
import textwrap
|
|
19
|
+
from collections.abc import Callable
|
|
19
20
|
from datetime import datetime, timedelta, timezone
|
|
20
21
|
from functools import partial
|
|
21
22
|
from optparse import SUPPRESS_HELP, Option, OptionGroup, OptionParser, Values
|
|
22
23
|
from textwrap import dedent
|
|
23
|
-
from typing import Any
|
|
24
|
+
from typing import Any
|
|
24
25
|
|
|
25
26
|
from pip._vendor.packaging.utils import canonicalize_name
|
|
26
27
|
|
|
@@ -31,7 +32,6 @@ from pip._internal.models.format_control import FormatControl
|
|
|
31
32
|
from pip._internal.models.index import PyPI
|
|
32
33
|
from pip._internal.models.release_control import ReleaseControl
|
|
33
34
|
from pip._internal.models.target_python import TargetPython
|
|
34
|
-
from pip._internal.utils import pylock as pylock_utils
|
|
35
35
|
from pip._internal.utils.datetime import parse_iso_datetime
|
|
36
36
|
from pip._internal.utils.hashes import STRONG_HASHES
|
|
37
37
|
from pip._internal.utils.misc import strtobool
|
|
@@ -65,6 +65,37 @@ def make_option_group(group: dict[str, Any], parser: ConfigOptionParser) -> Opti
|
|
|
65
65
|
return option_group
|
|
66
66
|
|
|
67
67
|
|
|
68
|
+
def check_only_deps_option_does_not_conflict(options: Values) -> None:
|
|
69
|
+
"""Function for determining if --only-deps and other incompatible options are
|
|
70
|
+
specified.
|
|
71
|
+
|
|
72
|
+
:param options: The OptionParser options.
|
|
73
|
+
"""
|
|
74
|
+
if not options.only_dependencies:
|
|
75
|
+
return
|
|
76
|
+
conflicts = []
|
|
77
|
+
if options.ignore_dependencies:
|
|
78
|
+
conflicts.append("'--no-deps'")
|
|
79
|
+
if "legacy-resolver" in options.deprecated_features_enabled:
|
|
80
|
+
conflicts.append("'--use-deprecated legacy-resolver'")
|
|
81
|
+
if options.requirements:
|
|
82
|
+
conflicts.append("'--requirement'")
|
|
83
|
+
if options.requirements_from_scripts:
|
|
84
|
+
conflicts.append("'--requirements-from-script'")
|
|
85
|
+
if options.dependency_groups:
|
|
86
|
+
conflicts.append("'--group'")
|
|
87
|
+
if conflicts:
|
|
88
|
+
if len(conflicts) > 1:
|
|
89
|
+
conflicts[-1] = "or " + conflicts[-1]
|
|
90
|
+
conflict_message = ", ".join(conflicts)
|
|
91
|
+
raise CommandError(
|
|
92
|
+
f"Cannot use '--only-dependencies' in combination with {conflict_message}. "
|
|
93
|
+
"If this is unexpected, please refer to the user guide:\n"
|
|
94
|
+
"\n"
|
|
95
|
+
" https://pip.pypa.io/en/stable/user_guide/#installing-only-dependencies"
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
68
99
|
def check_dist_restriction(options: Values, check_target: bool = False) -> None:
|
|
69
100
|
"""Function for determining if custom platform options are allowed.
|
|
70
101
|
|
|
@@ -104,13 +135,17 @@ def check_dist_restriction(options: Values, check_target: bool = False) -> None:
|
|
|
104
135
|
"installing via '--target' or using '--dry-run'"
|
|
105
136
|
)
|
|
106
137
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
138
|
+
if dist_restriction_set:
|
|
139
|
+
# Lazy import to keep CLI startup fast
|
|
140
|
+
from pip._internal.utils import pylock as pylock_utils
|
|
141
|
+
|
|
142
|
+
for filename in options.requirements:
|
|
143
|
+
if pylock_utils.is_valid_pylock_filename(filename):
|
|
144
|
+
raise CommandError(
|
|
145
|
+
"Platform and interpreter constraints using "
|
|
146
|
+
"--python-version, --platform, --abi, or --implementation, "
|
|
147
|
+
f"are not supported when selecting requirements from {filename!r}"
|
|
148
|
+
)
|
|
114
149
|
|
|
115
150
|
|
|
116
151
|
def check_build_constraints(options: Values) -> None:
|
|
@@ -310,10 +345,19 @@ proxy: Callable[..., Option] = partial(
|
|
|
310
345
|
"--proxy",
|
|
311
346
|
dest="proxy",
|
|
312
347
|
type="str",
|
|
313
|
-
default=
|
|
348
|
+
default=None,
|
|
314
349
|
help="Specify a proxy in the form scheme://[user:passwd@]proxy.server:port.",
|
|
315
350
|
)
|
|
316
351
|
|
|
352
|
+
no_proxy_env: Callable[..., Option] = partial(
|
|
353
|
+
Option,
|
|
354
|
+
"--no-proxy-env",
|
|
355
|
+
dest="no_proxy_env",
|
|
356
|
+
action="store_true",
|
|
357
|
+
default=False,
|
|
358
|
+
help="Do not read proxy configuration from environment variables.",
|
|
359
|
+
)
|
|
360
|
+
|
|
317
361
|
retries: Callable[..., Option] = partial(
|
|
318
362
|
Option,
|
|
319
363
|
"--retries",
|
|
@@ -497,7 +541,7 @@ def uploaded_prior_to() -> Option:
|
|
|
497
541
|
"Accepts an ISO 8601 datetime (e.g., '2023-01-01T00:00:00Z', "
|
|
498
542
|
"uses local timezone if none specified) or a duration in days "
|
|
499
543
|
"(e.g., 'P3D' for packages uploaded at least 3 days ago). "
|
|
500
|
-
"Only effective when
|
|
544
|
+
"Only effective when using indexes that provide "
|
|
501
545
|
"upload-time metadata."
|
|
502
546
|
),
|
|
503
547
|
)
|
|
@@ -646,12 +690,13 @@ def no_binary() -> Option:
|
|
|
646
690
|
callback=_handle_no_binary,
|
|
647
691
|
type="str",
|
|
648
692
|
default=format_control,
|
|
649
|
-
help="Do not
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
"
|
|
653
|
-
"
|
|
654
|
-
"
|
|
693
|
+
help="Do not download binary packages. Cached binary packages may still "
|
|
694
|
+
"be used. Can be supplied multiple times, and each time adds to "
|
|
695
|
+
"the existing value. Accepts either ':all:' to disable all binary "
|
|
696
|
+
"packages, ':none:' to empty the set (notice the colons), or one "
|
|
697
|
+
"or more package names with commas between them (no colons). "
|
|
698
|
+
"Note that some packages are tricky to compile and may fail to "
|
|
699
|
+
"install when this option is used on them.",
|
|
655
700
|
)
|
|
656
701
|
|
|
657
702
|
|
|
@@ -821,15 +866,13 @@ python_version: Callable[..., Option] = partial(
|
|
|
821
866
|
callback=_handle_python_version,
|
|
822
867
|
type="str",
|
|
823
868
|
default=None,
|
|
824
|
-
help=dedent(
|
|
825
|
-
"""\
|
|
869
|
+
help=dedent("""\
|
|
826
870
|
The Python interpreter version to use for wheel and "Requires-Python"
|
|
827
871
|
compatibility checks. Defaults to a version derived from the running
|
|
828
872
|
interpreter. The version can be specified using up to three dot-separated
|
|
829
873
|
integers (e.g. "3" for 3.0.0, "3.7" for 3.7.0, or "3.7.3"). A major-minor
|
|
830
874
|
version can also be given as a string without dots (e.g. "37" for 3.7.0).
|
|
831
|
-
"""
|
|
832
|
-
),
|
|
875
|
+
"""),
|
|
833
876
|
)
|
|
834
877
|
|
|
835
878
|
|
|
@@ -958,6 +1001,60 @@ no_deps: Callable[..., Option] = partial(
|
|
|
958
1001
|
)
|
|
959
1002
|
|
|
960
1003
|
|
|
1004
|
+
def _handle_refresh_package(
|
|
1005
|
+
option: Option, opt_str: str, value: str, parser: OptionParser
|
|
1006
|
+
) -> None:
|
|
1007
|
+
if value.startswith("-"):
|
|
1008
|
+
raise CommandError("--refresh-package option requires 1 argument.")
|
|
1009
|
+
|
|
1010
|
+
existing: set[str] = getattr(parser.values, option.dest)
|
|
1011
|
+
|
|
1012
|
+
new = value.split(",")
|
|
1013
|
+
while ":all:" in new:
|
|
1014
|
+
existing.clear()
|
|
1015
|
+
existing.add(":all:")
|
|
1016
|
+
del new[: new.index(":all:") + 1]
|
|
1017
|
+
if ":none:" not in new:
|
|
1018
|
+
return
|
|
1019
|
+
|
|
1020
|
+
for name in new:
|
|
1021
|
+
if name == ":none:":
|
|
1022
|
+
existing.clear()
|
|
1023
|
+
else:
|
|
1024
|
+
existing.add(canonicalize_name(name))
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
def refresh_package() -> Option:
|
|
1028
|
+
return Option(
|
|
1029
|
+
"--refresh-package",
|
|
1030
|
+
dest="refresh_package",
|
|
1031
|
+
action="callback",
|
|
1032
|
+
callback=_handle_refresh_package,
|
|
1033
|
+
type="str",
|
|
1034
|
+
default=set(),
|
|
1035
|
+
help="Refresh package index information for the given packages instead "
|
|
1036
|
+
"of using cached responses. Accepts ':all:' to apply "
|
|
1037
|
+
"to all packages, or a comma-separated list of package names.",
|
|
1038
|
+
)
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
only_deps: Callable[..., Option] = partial(
|
|
1042
|
+
Option,
|
|
1043
|
+
"--only-deps",
|
|
1044
|
+
"--only-dependencies",
|
|
1045
|
+
dest="only_dependencies",
|
|
1046
|
+
action="store_true",
|
|
1047
|
+
default=False,
|
|
1048
|
+
help=(
|
|
1049
|
+
"Take only the dependencies of the provided requirements into account, "
|
|
1050
|
+
"not the requirements themselves. Cannot be used in combination with "
|
|
1051
|
+
"--no-deps, --group, --requirement, or --requirements-from-script. "
|
|
1052
|
+
"No user-supplied requirements will be handled, even if they were "
|
|
1053
|
+
"dependencies of other user-supplied requirements."
|
|
1054
|
+
),
|
|
1055
|
+
)
|
|
1056
|
+
|
|
1057
|
+
|
|
961
1058
|
def _handle_dependency_group(
|
|
962
1059
|
option: Option, opt: str, value: str, parser: OptionParser
|
|
963
1060
|
) -> None:
|
|
@@ -1165,6 +1262,17 @@ require_hashes: Callable[..., Option] = partial(
|
|
|
1165
1262
|
)
|
|
1166
1263
|
|
|
1167
1264
|
|
|
1265
|
+
no_require_hashes: Callable[..., Option] = partial(
|
|
1266
|
+
Option,
|
|
1267
|
+
"--no-require-hashes",
|
|
1268
|
+
dest="no_require_hashes",
|
|
1269
|
+
action="store_true",
|
|
1270
|
+
default=False,
|
|
1271
|
+
help="Do not automatically enable --require-hashes "
|
|
1272
|
+
"when encountering a requirement with hashes.",
|
|
1273
|
+
)
|
|
1274
|
+
|
|
1275
|
+
|
|
1168
1276
|
list_path: Callable[..., Option] = partial(
|
|
1169
1277
|
PipOption,
|
|
1170
1278
|
"--path",
|
|
@@ -1206,6 +1314,7 @@ no_python_version_warning: Callable[..., Option] = partial(
|
|
|
1206
1314
|
ALWAYS_ENABLED_FEATURES = [
|
|
1207
1315
|
"truststore", # always on since 24.2
|
|
1208
1316
|
"no-binary-enable-wheel-cache", # always on since 23.1
|
|
1317
|
+
"build-constraint", # always on since 26.2
|
|
1209
1318
|
]
|
|
1210
1319
|
|
|
1211
1320
|
use_new_feature: Callable[..., Option] = partial(
|
|
@@ -1217,8 +1326,8 @@ use_new_feature: Callable[..., Option] = partial(
|
|
|
1217
1326
|
default=[],
|
|
1218
1327
|
choices=[
|
|
1219
1328
|
"fast-deps",
|
|
1220
|
-
"build-constraint",
|
|
1221
1329
|
"inprocess-build-deps",
|
|
1330
|
+
"venv-isolation",
|
|
1222
1331
|
]
|
|
1223
1332
|
+ ALWAYS_ENABLED_FEATURES,
|
|
1224
1333
|
help="Enable new functionality, that may be backward incompatible.",
|
|
@@ -1257,6 +1366,7 @@ general_group: dict[str, Any] = {
|
|
|
1257
1366
|
no_input,
|
|
1258
1367
|
keyring_provider,
|
|
1259
1368
|
proxy,
|
|
1369
|
+
no_proxy_env,
|
|
1260
1370
|
retries,
|
|
1261
1371
|
timeout,
|
|
1262
1372
|
exists_action,
|
|
@@ -1280,6 +1390,7 @@ index_group: dict[str, Any] = {
|
|
|
1280
1390
|
index_url,
|
|
1281
1391
|
extra_index_url,
|
|
1282
1392
|
no_index,
|
|
1393
|
+
refresh_package,
|
|
1283
1394
|
find_links,
|
|
1284
1395
|
uploaded_prior_to,
|
|
1285
1396
|
],
|
|
@@ -107,6 +107,7 @@ class SessionCommandMixin(CommandContextMixIn):
|
|
|
107
107
|
trusted_hosts=options.trusted_hosts,
|
|
108
108
|
index_urls=self._get_index_urls(options),
|
|
109
109
|
ssl_context=ssl_context,
|
|
110
|
+
refresh_package=getattr(options, "refresh_package", set()),
|
|
110
111
|
)
|
|
111
112
|
|
|
112
113
|
# Handle custom ca-bundles from the user
|
|
@@ -121,14 +122,18 @@ class SessionCommandMixin(CommandContextMixIn):
|
|
|
121
122
|
if options.timeout or timeout:
|
|
122
123
|
session.timeout = timeout if timeout is not None else options.timeout
|
|
123
124
|
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
# An explicit --proxy (including "" to disable proxying) or --no-proxy-env
|
|
126
|
+
# makes the session ignore environment proxies; unset --proxy is None.
|
|
127
|
+
if options.proxy is not None or options.no_proxy_env:
|
|
128
|
+
if options.proxy:
|
|
129
|
+
session.proxies = {
|
|
130
|
+
"http": options.proxy,
|
|
131
|
+
"https": options.proxy,
|
|
132
|
+
}
|
|
130
133
|
session.trust_env = False
|
|
134
|
+
# Keep "" so an empty --proxy reaches build subprocesses.
|
|
131
135
|
session.pip_proxy = options.proxy
|
|
136
|
+
session.pip_no_proxy_env = options.no_proxy_env
|
|
132
137
|
|
|
133
138
|
# Determine if we can prompt the user for authentication or not
|
|
134
139
|
session.auth.prompting = not options.no_input
|