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,183 @@
|
|
|
1
|
+
"""
|
|
2
|
+
requests._types
|
|
3
|
+
~~~~~~~~~~~~~~~
|
|
4
|
+
|
|
5
|
+
This module contains type aliases used internally by the Requests library.
|
|
6
|
+
These types are not part of the public API and must not be relied upon
|
|
7
|
+
by external code.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
12
|
+
from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence
|
|
13
|
+
from typing import (
|
|
14
|
+
TYPE_CHECKING,
|
|
15
|
+
Any,
|
|
16
|
+
Protocol,
|
|
17
|
+
TypeAlias,
|
|
18
|
+
TypeVar,
|
|
19
|
+
runtime_checkable,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
_T_co = TypeVar("_T_co", covariant=True)
|
|
23
|
+
_KT_co = TypeVar("_KT_co", covariant=True)
|
|
24
|
+
_VT_co = TypeVar("_VT_co", covariant=True)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
@runtime_checkable
|
|
28
|
+
class SupportsRead(Protocol[_T_co]):
|
|
29
|
+
def read(self, length: int = ..., /) -> _T_co: ...
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@runtime_checkable
|
|
33
|
+
class SupportsItems(Protocol[_KT_co, _VT_co]):
|
|
34
|
+
def items(self) -> Iterable[tuple[_KT_co, _VT_co]]: ...
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# These are needed at runtime for default_hooks() return type
|
|
38
|
+
HookType: TypeAlias = Callable[["Response"], Any]
|
|
39
|
+
HooksInputType: TypeAlias = Mapping[str, Iterable[HookType] | HookType]
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def is_prepared(request: PreparedRequest) -> TypeIs[_ValidatedRequest]:
|
|
43
|
+
"""Verify a PreparedRequest has been fully prepared."""
|
|
44
|
+
if TYPE_CHECKING:
|
|
45
|
+
return request.url is not None and request.method is not None
|
|
46
|
+
# noop at runtime to avoid AssertionError
|
|
47
|
+
return True
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
if TYPE_CHECKING:
|
|
51
|
+
from http.cookiejar import CookieJar
|
|
52
|
+
from typing import TypeAlias, TypedDict
|
|
53
|
+
|
|
54
|
+
from typing_extensions import (
|
|
55
|
+
Buffer, # TODO: move to collections.abc when Python >= 3.12
|
|
56
|
+
TypeIs, # TODO: move to typing when Python >= 3.13
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
from .auth import AuthBase
|
|
60
|
+
from .cookies import RequestsCookieJar
|
|
61
|
+
from .models import PreparedRequest, Response
|
|
62
|
+
from .structures import CaseInsensitiveDict
|
|
63
|
+
|
|
64
|
+
class _ValidatedRequest(PreparedRequest):
|
|
65
|
+
"""Subtype asserting a PreparedRequest has been fully prepared before calling.
|
|
66
|
+
|
|
67
|
+
The override suppression is required because mutable attribute types are
|
|
68
|
+
invariant (Liskov), but we only narrow after preparation is complete. This
|
|
69
|
+
is the explicit contract for Requests but Python's typing doesn't have a
|
|
70
|
+
better way to represent the requirement.
|
|
71
|
+
"""
|
|
72
|
+
|
|
73
|
+
url: str # type: ignore[reportIncompatibleVariableOverride]
|
|
74
|
+
method: str # type: ignore[reportIncompatibleVariableOverride]
|
|
75
|
+
|
|
76
|
+
# Type aliases for core API concepts (ordered by request() signature)
|
|
77
|
+
UriType: TypeAlias = str | bytes
|
|
78
|
+
|
|
79
|
+
_ParamsMappingKeyType: TypeAlias = str | bytes | int | float
|
|
80
|
+
_ParamsMappingValueType: TypeAlias = (
|
|
81
|
+
str | bytes | int | float | Iterable[str | bytes | int | float] | None
|
|
82
|
+
)
|
|
83
|
+
ParamsType: TypeAlias = (
|
|
84
|
+
SupportsItems[_ParamsMappingKeyType, _ParamsMappingValueType]
|
|
85
|
+
| tuple[tuple[_ParamsMappingKeyType, _ParamsMappingValueType], ...]
|
|
86
|
+
| Iterable[tuple[_ParamsMappingKeyType, _ParamsMappingValueType]]
|
|
87
|
+
| str
|
|
88
|
+
| bytes
|
|
89
|
+
| None
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
KVDataType: TypeAlias = Iterable[tuple[Any, Any]] | SupportsItems[Any, Any]
|
|
93
|
+
|
|
94
|
+
RawDataType: TypeAlias = KVDataType | str | bytes
|
|
95
|
+
StreamDataType: TypeAlias = SupportsRead[str | bytes]
|
|
96
|
+
EncodableDataType: TypeAlias = RawDataType | StreamDataType
|
|
97
|
+
|
|
98
|
+
DataType: TypeAlias = (
|
|
99
|
+
KVDataType
|
|
100
|
+
| Iterable[bytes | str]
|
|
101
|
+
| str
|
|
102
|
+
| bytes
|
|
103
|
+
| Buffer
|
|
104
|
+
| SupportsRead[str | bytes]
|
|
105
|
+
| None
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
BodyType: TypeAlias = (
|
|
109
|
+
bytes | str | Iterable[bytes | str] | SupportsRead[bytes | str] | None
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
HeadersType: TypeAlias = Mapping[str, str | bytes] | None
|
|
113
|
+
|
|
114
|
+
CookiesType: TypeAlias = RequestsCookieJar | Mapping[str, str]
|
|
115
|
+
|
|
116
|
+
# Building blocks for FilesType
|
|
117
|
+
_FileName: TypeAlias = str | None
|
|
118
|
+
_FileContent: TypeAlias = SupportsRead[str | bytes] | str | bytes
|
|
119
|
+
_FileSpecBasic: TypeAlias = tuple[_FileName, _FileContent]
|
|
120
|
+
_FileSpecWithContentType: TypeAlias = tuple[_FileName, _FileContent, str]
|
|
121
|
+
_FileSpecWithHeaders: TypeAlias = tuple[
|
|
122
|
+
_FileName, _FileContent, str, CaseInsensitiveDict[str] | Mapping[str, str]
|
|
123
|
+
]
|
|
124
|
+
_FileSpec: TypeAlias = (
|
|
125
|
+
_FileContent | _FileSpecBasic | _FileSpecWithContentType | _FileSpecWithHeaders
|
|
126
|
+
)
|
|
127
|
+
FilesType: TypeAlias = (
|
|
128
|
+
Mapping[str, _FileSpec] | Iterable[tuple[str, _FileSpec]] | None
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
AuthType: TypeAlias = (
|
|
132
|
+
tuple[str, str] | AuthBase | Callable[[PreparedRequest], PreparedRequest] | None
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
TimeoutType: TypeAlias = float | tuple[float | None, float | None] | None
|
|
136
|
+
ProxiesType: TypeAlias = MutableMapping[str, str]
|
|
137
|
+
HooksType: TypeAlias = dict[str, list[HookType]] | None
|
|
138
|
+
VerifyType: TypeAlias = bool | str
|
|
139
|
+
CertType: TypeAlias = str | tuple[str, str] | None
|
|
140
|
+
JsonType: TypeAlias = (
|
|
141
|
+
None
|
|
142
|
+
| bool
|
|
143
|
+
| int
|
|
144
|
+
| float
|
|
145
|
+
| str
|
|
146
|
+
| Sequence["JsonType"]
|
|
147
|
+
| Mapping[str, "JsonType"]
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# TypedDicts for Unpack kwargs (PEP 692)
|
|
151
|
+
|
|
152
|
+
class BaseRequestKwargs(TypedDict, total=False):
|
|
153
|
+
headers: HeadersType
|
|
154
|
+
cookies: RequestsCookieJar | CookieJar | dict[str, str] | None
|
|
155
|
+
files: FilesType
|
|
156
|
+
auth: AuthType
|
|
157
|
+
timeout: TimeoutType
|
|
158
|
+
allow_redirects: bool
|
|
159
|
+
proxies: dict[str, str] | None
|
|
160
|
+
hooks: HooksInputType | None
|
|
161
|
+
stream: bool | None
|
|
162
|
+
verify: VerifyType | None
|
|
163
|
+
cert: CertType
|
|
164
|
+
|
|
165
|
+
class RequestKwargs(BaseRequestKwargs, total=False):
|
|
166
|
+
"""kwargs for request(), options(), head(), delete()."""
|
|
167
|
+
|
|
168
|
+
params: ParamsType
|
|
169
|
+
data: DataType
|
|
170
|
+
json: JsonType
|
|
171
|
+
|
|
172
|
+
class GetKwargs(BaseRequestKwargs, total=False):
|
|
173
|
+
data: DataType
|
|
174
|
+
json: JsonType
|
|
175
|
+
|
|
176
|
+
class PostKwargs(BaseRequestKwargs, total=False):
|
|
177
|
+
params: ParamsType
|
|
178
|
+
|
|
179
|
+
class DataKwargs(BaseRequestKwargs, total=False):
|
|
180
|
+
"""kwargs for put(), patch()."""
|
|
181
|
+
|
|
182
|
+
params: ParamsType
|
|
183
|
+
json: JsonType
|
|
@@ -6,10 +6,13 @@ This module contains the transport adapters that Requests uses to define
|
|
|
6
6
|
and maintain connections.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
9
11
|
import os.path
|
|
10
|
-
import socket # noqa: F401
|
|
12
|
+
import socket # noqa: F401 # type: ignore[reportUnusedImport]
|
|
11
13
|
import typing
|
|
12
14
|
import warnings
|
|
15
|
+
from typing import Any
|
|
13
16
|
|
|
14
17
|
from pip._vendor.urllib3.exceptions import (
|
|
15
18
|
ClosedPoolError,
|
|
@@ -30,7 +33,7 @@ from pip._vendor.urllib3.util import Timeout as TimeoutSauce
|
|
|
30
33
|
from pip._vendor.urllib3.util import parse_url
|
|
31
34
|
from pip._vendor.urllib3.util.retry import Retry
|
|
32
35
|
|
|
33
|
-
from .auth import _basic_auth_str
|
|
36
|
+
from .auth import _basic_auth_str # type: ignore[reportPrivateUsage]
|
|
34
37
|
from .compat import basestring, urlparse
|
|
35
38
|
from .cookies import extract_cookies_to_jar
|
|
36
39
|
from .exceptions import (
|
|
@@ -57,16 +60,21 @@ from .utils import (
|
|
|
57
60
|
)
|
|
58
61
|
|
|
59
62
|
try:
|
|
60
|
-
from pip._vendor.urllib3.contrib.socks import SOCKSProxyManager
|
|
63
|
+
from pip._vendor.urllib3.contrib.socks import SOCKSProxyManager # type: ignore[assignment]
|
|
61
64
|
except ImportError:
|
|
62
65
|
|
|
63
|
-
def SOCKSProxyManager(*args, **kwargs):
|
|
66
|
+
def SOCKSProxyManager(*args: Any, **kwargs: Any) -> None:
|
|
64
67
|
raise InvalidSchema("Missing dependencies for SOCKS support.")
|
|
65
68
|
|
|
66
69
|
|
|
67
70
|
if typing.TYPE_CHECKING:
|
|
71
|
+
from pip._vendor.urllib3.connectionpool import HTTPConnectionPool
|
|
72
|
+
from pip._vendor.urllib3.poolmanager import PoolManager as _PoolManager
|
|
73
|
+
|
|
74
|
+
from . import _types as _t
|
|
68
75
|
from .models import PreparedRequest
|
|
69
76
|
|
|
77
|
+
from ._types import is_prepared as _is_prepared
|
|
70
78
|
|
|
71
79
|
DEFAULT_POOLBLOCK = False
|
|
72
80
|
DEFAULT_POOLSIZE = 10
|
|
@@ -75,13 +83,13 @@ DEFAULT_POOL_TIMEOUT = None
|
|
|
75
83
|
|
|
76
84
|
|
|
77
85
|
def _urllib3_request_context(
|
|
78
|
-
request:
|
|
79
|
-
verify:
|
|
80
|
-
client_cert:
|
|
81
|
-
poolmanager:
|
|
82
|
-
) ->
|
|
83
|
-
host_params = {}
|
|
84
|
-
pool_kwargs = {}
|
|
86
|
+
request: PreparedRequest,
|
|
87
|
+
verify: bool | str | None,
|
|
88
|
+
client_cert: tuple[str, str] | str | None,
|
|
89
|
+
poolmanager: PoolManager,
|
|
90
|
+
) -> tuple[dict[str, Any], dict[str, Any]]:
|
|
91
|
+
host_params: dict[str, Any] = {}
|
|
92
|
+
pool_kwargs: dict[str, Any] = {}
|
|
85
93
|
parsed_request_url = urlparse(request.url)
|
|
86
94
|
scheme = parsed_request_url.scheme.lower()
|
|
87
95
|
port = parsed_request_url.port
|
|
@@ -114,12 +122,18 @@ def _urllib3_request_context(
|
|
|
114
122
|
class BaseAdapter:
|
|
115
123
|
"""The Base Transport Adapter"""
|
|
116
124
|
|
|
117
|
-
def __init__(self):
|
|
125
|
+
def __init__(self) -> None:
|
|
118
126
|
super().__init__()
|
|
119
127
|
|
|
120
128
|
def send(
|
|
121
|
-
self,
|
|
122
|
-
|
|
129
|
+
self,
|
|
130
|
+
request: PreparedRequest,
|
|
131
|
+
stream: bool = False,
|
|
132
|
+
timeout: _t.TimeoutType = None,
|
|
133
|
+
verify: _t.VerifyType = True,
|
|
134
|
+
cert: _t.CertType = None,
|
|
135
|
+
proxies: dict[str, str] | None = None,
|
|
136
|
+
) -> Response:
|
|
123
137
|
"""Sends PreparedRequest object. Returns Response object.
|
|
124
138
|
|
|
125
139
|
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
|
|
@@ -136,7 +150,7 @@ class BaseAdapter:
|
|
|
136
150
|
"""
|
|
137
151
|
raise NotImplementedError
|
|
138
152
|
|
|
139
|
-
def close(self):
|
|
153
|
+
def close(self) -> None:
|
|
140
154
|
"""Cleans up adapter specific items."""
|
|
141
155
|
raise NotImplementedError
|
|
142
156
|
|
|
@@ -168,7 +182,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
168
182
|
>>> s.mount('http://', a)
|
|
169
183
|
"""
|
|
170
184
|
|
|
171
|
-
__attrs__ = [
|
|
185
|
+
__attrs__: list[str] = [
|
|
172
186
|
"max_retries",
|
|
173
187
|
"config",
|
|
174
188
|
"_pool_connections",
|
|
@@ -176,13 +190,21 @@ class HTTPAdapter(BaseAdapter):
|
|
|
176
190
|
"_pool_block",
|
|
177
191
|
]
|
|
178
192
|
|
|
193
|
+
max_retries: Retry
|
|
194
|
+
config: dict[str, Any]
|
|
195
|
+
proxy_manager: dict[str, Any]
|
|
196
|
+
_pool_connections: int
|
|
197
|
+
_pool_maxsize: int
|
|
198
|
+
_pool_block: bool
|
|
199
|
+
poolmanager: _PoolManager
|
|
200
|
+
|
|
179
201
|
def __init__(
|
|
180
202
|
self,
|
|
181
|
-
pool_connections=DEFAULT_POOLSIZE,
|
|
182
|
-
pool_maxsize=DEFAULT_POOLSIZE,
|
|
183
|
-
max_retries=DEFAULT_RETRIES,
|
|
184
|
-
pool_block=DEFAULT_POOLBLOCK,
|
|
185
|
-
):
|
|
203
|
+
pool_connections: int = DEFAULT_POOLSIZE,
|
|
204
|
+
pool_maxsize: int = DEFAULT_POOLSIZE,
|
|
205
|
+
max_retries: int | Retry = DEFAULT_RETRIES,
|
|
206
|
+
pool_block: bool = DEFAULT_POOLBLOCK,
|
|
207
|
+
) -> None:
|
|
186
208
|
if max_retries == DEFAULT_RETRIES:
|
|
187
209
|
self.max_retries = Retry(0, read=False)
|
|
188
210
|
else:
|
|
@@ -198,10 +220,10 @@ class HTTPAdapter(BaseAdapter):
|
|
|
198
220
|
|
|
199
221
|
self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block)
|
|
200
222
|
|
|
201
|
-
def __getstate__(self):
|
|
223
|
+
def __getstate__(self) -> dict[str, Any]:
|
|
202
224
|
return {attr: getattr(self, attr, None) for attr in self.__attrs__}
|
|
203
225
|
|
|
204
|
-
def __setstate__(self, state):
|
|
226
|
+
def __setstate__(self, state: dict[str, Any]) -> None:
|
|
205
227
|
# Can't handle by adding 'proxy_manager' to self.__attrs__ because
|
|
206
228
|
# self.poolmanager uses a lambda function, which isn't pickleable.
|
|
207
229
|
self.proxy_manager = {}
|
|
@@ -215,8 +237,12 @@ class HTTPAdapter(BaseAdapter):
|
|
|
215
237
|
)
|
|
216
238
|
|
|
217
239
|
def init_poolmanager(
|
|
218
|
-
self,
|
|
219
|
-
|
|
240
|
+
self,
|
|
241
|
+
connections: int,
|
|
242
|
+
maxsize: int,
|
|
243
|
+
block: bool = DEFAULT_POOLBLOCK,
|
|
244
|
+
**pool_kwargs: Any,
|
|
245
|
+
) -> None:
|
|
220
246
|
"""Initializes a urllib3 PoolManager.
|
|
221
247
|
|
|
222
248
|
This method should not be called from user code, and is only
|
|
@@ -240,7 +266,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
240
266
|
**pool_kwargs,
|
|
241
267
|
)
|
|
242
268
|
|
|
243
|
-
def proxy_manager_for(self, proxy, **proxy_kwargs):
|
|
269
|
+
def proxy_manager_for(self, proxy: str, **proxy_kwargs: Any) -> Any:
|
|
244
270
|
"""Return urllib3 ProxyManager for the given proxy.
|
|
245
271
|
|
|
246
272
|
This method should not be called from user code, and is only
|
|
@@ -278,7 +304,9 @@ class HTTPAdapter(BaseAdapter):
|
|
|
278
304
|
|
|
279
305
|
return manager
|
|
280
306
|
|
|
281
|
-
def cert_verify(
|
|
307
|
+
def cert_verify(
|
|
308
|
+
self, conn: Any, url: str, verify: _t.VerifyType, cert: _t.CertType
|
|
309
|
+
) -> None:
|
|
282
310
|
"""Verify a SSL certificate. This method should not be called from user
|
|
283
311
|
code, and is only exposed for use when subclassing the
|
|
284
312
|
:class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
|
|
@@ -334,7 +362,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
334
362
|
f"Could not find the TLS key file, invalid path: {conn.key_file}"
|
|
335
363
|
)
|
|
336
364
|
|
|
337
|
-
def build_response(self, req, resp):
|
|
365
|
+
def build_response(self, req: PreparedRequest, resp: Any) -> Response:
|
|
338
366
|
"""Builds a :class:`Response <requests.Response>` object from a urllib3
|
|
339
367
|
response. This should not be called from user code, and is only exposed
|
|
340
368
|
for use when subclassing the
|
|
@@ -344,10 +372,11 @@ class HTTPAdapter(BaseAdapter):
|
|
|
344
372
|
:param resp: The urllib3 response object.
|
|
345
373
|
:rtype: requests.Response
|
|
346
374
|
"""
|
|
375
|
+
assert _is_prepared(req)
|
|
347
376
|
response = Response()
|
|
348
377
|
|
|
349
378
|
# Fallback to None if there's no status_code, for whatever reason.
|
|
350
|
-
response.status_code = getattr(resp, "status", None)
|
|
379
|
+
response.status_code = getattr(resp, "status", None) # type: ignore[assignment]
|
|
351
380
|
|
|
352
381
|
# Make headers case-insensitive.
|
|
353
382
|
response.headers = CaseInsensitiveDict(getattr(resp, "headers", {}))
|
|
@@ -371,7 +400,9 @@ class HTTPAdapter(BaseAdapter):
|
|
|
371
400
|
|
|
372
401
|
return response
|
|
373
402
|
|
|
374
|
-
def build_connection_pool_key_attributes(
|
|
403
|
+
def build_connection_pool_key_attributes(
|
|
404
|
+
self, request: PreparedRequest, verify: _t.VerifyType, cert: _t.CertType = None
|
|
405
|
+
) -> tuple[dict[str, Any], dict[str, Any]]:
|
|
375
406
|
"""Build the PoolKey attributes used by urllib3 to return a connection.
|
|
376
407
|
|
|
377
408
|
This looks at the PreparedRequest, the user-specified verify value,
|
|
@@ -401,7 +432,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
401
432
|
alter the other keys to ensure the desired behaviour.
|
|
402
433
|
|
|
403
434
|
:param request:
|
|
404
|
-
The
|
|
435
|
+
The PreparedRequest being sent over the connection.
|
|
405
436
|
:type request:
|
|
406
437
|
:class:`~requests.models.PreparedRequest`
|
|
407
438
|
:param verify:
|
|
@@ -421,7 +452,13 @@ class HTTPAdapter(BaseAdapter):
|
|
|
421
452
|
"""
|
|
422
453
|
return _urllib3_request_context(request, verify, cert, self.poolmanager)
|
|
423
454
|
|
|
424
|
-
def get_connection_with_tls_context(
|
|
455
|
+
def get_connection_with_tls_context(
|
|
456
|
+
self,
|
|
457
|
+
request: PreparedRequest,
|
|
458
|
+
verify: _t.VerifyType,
|
|
459
|
+
proxies: dict[str, str] | None = None,
|
|
460
|
+
cert: _t.CertType = None,
|
|
461
|
+
) -> HTTPConnectionPool:
|
|
425
462
|
"""Returns a urllib3 connection for the given request and TLS settings.
|
|
426
463
|
This should not be called from user code, and is only exposed for use
|
|
427
464
|
when subclassing the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
|
|
@@ -439,8 +476,10 @@ class HTTPAdapter(BaseAdapter):
|
|
|
439
476
|
(optional) Any user-provided SSL certificate to be used for client
|
|
440
477
|
authentication (a.k.a., mTLS).
|
|
441
478
|
:rtype:
|
|
442
|
-
urllib3.
|
|
479
|
+
urllib3.HTTPConnectionPool
|
|
443
480
|
"""
|
|
481
|
+
assert _is_prepared(request)
|
|
482
|
+
|
|
444
483
|
proxy = select_proxy(request.url, proxies)
|
|
445
484
|
try:
|
|
446
485
|
host_params, pool_kwargs = self.build_connection_pool_key_attributes(
|
|
@@ -470,7 +509,9 @@ class HTTPAdapter(BaseAdapter):
|
|
|
470
509
|
|
|
471
510
|
return conn
|
|
472
511
|
|
|
473
|
-
def get_connection(
|
|
512
|
+
def get_connection(
|
|
513
|
+
self, url: str, proxies: dict[str, str] | None = None
|
|
514
|
+
) -> HTTPConnectionPool:
|
|
474
515
|
"""DEPRECATED: Users should move to `get_connection_with_tls_context`
|
|
475
516
|
for all subclasses of HTTPAdapter using Requests>=2.32.2.
|
|
476
517
|
|
|
@@ -480,7 +521,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
480
521
|
|
|
481
522
|
:param url: The URL to connect to.
|
|
482
523
|
:param proxies: (optional) A Requests-style dictionary of proxies used on this request.
|
|
483
|
-
:rtype: urllib3.
|
|
524
|
+
:rtype: urllib3.HTTPConnectionPool
|
|
484
525
|
"""
|
|
485
526
|
warnings.warn(
|
|
486
527
|
(
|
|
@@ -511,7 +552,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
511
552
|
|
|
512
553
|
return conn
|
|
513
554
|
|
|
514
|
-
def close(self):
|
|
555
|
+
def close(self) -> None:
|
|
515
556
|
"""Disposes of any internal state.
|
|
516
557
|
|
|
517
558
|
Currently, this closes the PoolManager and any active ProxyManager,
|
|
@@ -521,7 +562,9 @@ class HTTPAdapter(BaseAdapter):
|
|
|
521
562
|
for proxy in self.proxy_manager.values():
|
|
522
563
|
proxy.clear()
|
|
523
564
|
|
|
524
|
-
def request_url(
|
|
565
|
+
def request_url(
|
|
566
|
+
self, request: PreparedRequest, proxies: dict[str, str] | None
|
|
567
|
+
) -> str:
|
|
525
568
|
"""Obtain the url to use when making the final request.
|
|
526
569
|
|
|
527
570
|
If the message is being sent through a HTTP proxy, the full URL has to
|
|
@@ -535,6 +578,8 @@ class HTTPAdapter(BaseAdapter):
|
|
|
535
578
|
:param proxies: A dictionary of schemes or schemes and hosts to proxy URLs.
|
|
536
579
|
:rtype: str
|
|
537
580
|
"""
|
|
581
|
+
assert _is_prepared(request)
|
|
582
|
+
|
|
538
583
|
proxy = select_proxy(request.url, proxies)
|
|
539
584
|
scheme = urlparse(request.url).scheme
|
|
540
585
|
|
|
@@ -545,15 +590,13 @@ class HTTPAdapter(BaseAdapter):
|
|
|
545
590
|
using_socks_proxy = proxy_scheme.startswith("socks")
|
|
546
591
|
|
|
547
592
|
url = request.path_url
|
|
548
|
-
if url.startswith("//"): # Don't confuse urllib3
|
|
549
|
-
url = f"/{url.lstrip('/')}"
|
|
550
593
|
|
|
551
594
|
if is_proxied_http_request and not using_socks_proxy:
|
|
552
595
|
url = urldefragauth(request.url)
|
|
553
596
|
|
|
554
597
|
return url
|
|
555
598
|
|
|
556
|
-
def add_headers(self, request, **kwargs):
|
|
599
|
+
def add_headers(self, request: PreparedRequest, **kwargs: Any) -> None:
|
|
557
600
|
"""Add any headers needed by the connection. As of v2.0 this does
|
|
558
601
|
nothing by default, but is left for overriding by users that subclass
|
|
559
602
|
the :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
|
|
@@ -567,7 +610,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
567
610
|
"""
|
|
568
611
|
pass
|
|
569
612
|
|
|
570
|
-
def proxy_headers(self, proxy):
|
|
613
|
+
def proxy_headers(self, proxy: str) -> dict[str, str]:
|
|
571
614
|
"""Returns a dictionary of the headers to add to any request sent
|
|
572
615
|
through a proxy. This works with urllib3 magic to ensure that they are
|
|
573
616
|
correctly sent to the proxy, rather than in a tunnelled request if
|
|
@@ -580,7 +623,7 @@ class HTTPAdapter(BaseAdapter):
|
|
|
580
623
|
:param proxy: The url of the proxy being used for this request.
|
|
581
624
|
:rtype: dict
|
|
582
625
|
"""
|
|
583
|
-
headers = {}
|
|
626
|
+
headers: dict[str, str] = {}
|
|
584
627
|
username, password = get_auth_from_url(proxy)
|
|
585
628
|
|
|
586
629
|
if username:
|
|
@@ -589,8 +632,14 @@ class HTTPAdapter(BaseAdapter):
|
|
|
589
632
|
return headers
|
|
590
633
|
|
|
591
634
|
def send(
|
|
592
|
-
self,
|
|
593
|
-
|
|
635
|
+
self,
|
|
636
|
+
request: PreparedRequest,
|
|
637
|
+
stream: bool = False,
|
|
638
|
+
timeout: _t.TimeoutType = None,
|
|
639
|
+
verify: _t.VerifyType = True,
|
|
640
|
+
cert: _t.CertType = None,
|
|
641
|
+
proxies: dict[str, str] | None = None,
|
|
642
|
+
) -> Response:
|
|
594
643
|
"""Sends PreparedRequest object. Returns Response object.
|
|
595
644
|
|
|
596
645
|
:param request: The :class:`PreparedRequest <PreparedRequest>` being sent.
|
|
@@ -607,6 +656,8 @@ class HTTPAdapter(BaseAdapter):
|
|
|
607
656
|
:rtype: requests.Response
|
|
608
657
|
"""
|
|
609
658
|
|
|
659
|
+
assert _is_prepared(request)
|
|
660
|
+
|
|
610
661
|
try:
|
|
611
662
|
conn = self.get_connection_with_tls_context(
|
|
612
663
|
request, verify, proxies=proxies, cert=cert
|
|
@@ -630,29 +681,29 @@ class HTTPAdapter(BaseAdapter):
|
|
|
630
681
|
if isinstance(timeout, tuple):
|
|
631
682
|
try:
|
|
632
683
|
connect, read = timeout
|
|
633
|
-
|
|
684
|
+
resolved_timeout = TimeoutSauce(connect=connect, read=read)
|
|
634
685
|
except ValueError:
|
|
635
686
|
raise ValueError(
|
|
636
687
|
f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, "
|
|
637
688
|
f"or a single float to set both timeouts to the same value."
|
|
638
689
|
)
|
|
639
690
|
elif isinstance(timeout, TimeoutSauce):
|
|
640
|
-
|
|
691
|
+
resolved_timeout = timeout
|
|
641
692
|
else:
|
|
642
|
-
|
|
693
|
+
resolved_timeout = TimeoutSauce(connect=timeout, read=timeout)
|
|
643
694
|
|
|
644
695
|
try:
|
|
645
696
|
resp = conn.urlopen(
|
|
646
697
|
method=request.method,
|
|
647
698
|
url=url,
|
|
648
|
-
body=request.body,
|
|
649
|
-
headers=request.headers,
|
|
699
|
+
body=request.body, # type: ignore[arg-type] # urllib3 stubs don't accept Iterable[bytes | str]
|
|
700
|
+
headers=request.headers, # type: ignore[arg-type] # urllib3#3072
|
|
650
701
|
redirect=False,
|
|
651
702
|
assert_same_host=False,
|
|
652
703
|
preload_content=False,
|
|
653
704
|
decode_content=False,
|
|
654
705
|
retries=self.max_retries,
|
|
655
|
-
timeout=
|
|
706
|
+
timeout=resolved_timeout,
|
|
656
707
|
chunked=chunked,
|
|
657
708
|
)
|
|
658
709
|
|
|
@@ -8,10 +8,22 @@ This module implements the Requests API.
|
|
|
8
8
|
:license: Apache2, see LICENSE for more details.
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from typing import TYPE_CHECKING
|
|
14
|
+
|
|
11
15
|
from . import sessions
|
|
16
|
+
from .models import Response
|
|
17
|
+
|
|
18
|
+
if TYPE_CHECKING:
|
|
19
|
+
from typing_extensions import Unpack
|
|
20
|
+
|
|
21
|
+
from . import _types as _t
|
|
12
22
|
|
|
13
23
|
|
|
14
|
-
def request(
|
|
24
|
+
def request(
|
|
25
|
+
method: str, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]
|
|
26
|
+
) -> Response:
|
|
15
27
|
"""Constructs and sends a :class:`Request <Request>`.
|
|
16
28
|
|
|
17
29
|
:param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``.
|
|
@@ -59,7 +71,9 @@ def request(method, url, **kwargs):
|
|
|
59
71
|
return session.request(method=method, url=url, **kwargs)
|
|
60
72
|
|
|
61
73
|
|
|
62
|
-
def get(
|
|
74
|
+
def get(
|
|
75
|
+
url: _t.UriType, params: _t.ParamsType = None, **kwargs: Unpack[_t.GetKwargs]
|
|
76
|
+
) -> Response:
|
|
63
77
|
r"""Sends a GET request.
|
|
64
78
|
|
|
65
79
|
:param url: URL for the new :class:`Request` object.
|
|
@@ -73,7 +87,7 @@ def get(url, params=None, **kwargs):
|
|
|
73
87
|
return request("get", url, params=params, **kwargs)
|
|
74
88
|
|
|
75
89
|
|
|
76
|
-
def options(url, **kwargs):
|
|
90
|
+
def options(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
|
|
77
91
|
r"""Sends an OPTIONS request.
|
|
78
92
|
|
|
79
93
|
:param url: URL for the new :class:`Request` object.
|
|
@@ -85,7 +99,7 @@ def options(url, **kwargs):
|
|
|
85
99
|
return request("options", url, **kwargs)
|
|
86
100
|
|
|
87
101
|
|
|
88
|
-
def head(url, **kwargs):
|
|
102
|
+
def head(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
|
|
89
103
|
r"""Sends a HEAD request.
|
|
90
104
|
|
|
91
105
|
:param url: URL for the new :class:`Request` object.
|
|
@@ -100,7 +114,12 @@ def head(url, **kwargs):
|
|
|
100
114
|
return request("head", url, **kwargs)
|
|
101
115
|
|
|
102
116
|
|
|
103
|
-
def post(
|
|
117
|
+
def post(
|
|
118
|
+
url: _t.UriType,
|
|
119
|
+
data: _t.DataType = None,
|
|
120
|
+
json: _t.JsonType = None,
|
|
121
|
+
**kwargs: Unpack[_t.PostKwargs],
|
|
122
|
+
) -> Response:
|
|
104
123
|
r"""Sends a POST request.
|
|
105
124
|
|
|
106
125
|
:param url: URL for the new :class:`Request` object.
|
|
@@ -115,7 +134,9 @@ def post(url, data=None, json=None, **kwargs):
|
|
|
115
134
|
return request("post", url, data=data, json=json, **kwargs)
|
|
116
135
|
|
|
117
136
|
|
|
118
|
-
def put(
|
|
137
|
+
def put(
|
|
138
|
+
url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs]
|
|
139
|
+
) -> Response:
|
|
119
140
|
r"""Sends a PUT request.
|
|
120
141
|
|
|
121
142
|
:param url: URL for the new :class:`Request` object.
|
|
@@ -130,7 +151,9 @@ def put(url, data=None, **kwargs):
|
|
|
130
151
|
return request("put", url, data=data, **kwargs)
|
|
131
152
|
|
|
132
153
|
|
|
133
|
-
def patch(
|
|
154
|
+
def patch(
|
|
155
|
+
url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs]
|
|
156
|
+
) -> Response:
|
|
134
157
|
r"""Sends a PATCH request.
|
|
135
158
|
|
|
136
159
|
:param url: URL for the new :class:`Request` object.
|
|
@@ -145,7 +168,7 @@ def patch(url, data=None, **kwargs):
|
|
|
145
168
|
return request("patch", url, data=data, **kwargs)
|
|
146
169
|
|
|
147
170
|
|
|
148
|
-
def delete(url, **kwargs):
|
|
171
|
+
def delete(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response:
|
|
149
172
|
r"""Sends a DELETE request.
|
|
150
173
|
|
|
151
174
|
:param url: URL for the new :class:`Request` object.
|