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
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
# Licensed to PSF under a Contributor Agreement.
|
|
4
4
|
|
|
5
5
|
__all__ = ("loads", "load", "TOMLDecodeError")
|
|
6
|
-
__version__ = "2.
|
|
6
|
+
__version__ = "2.4.1" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
|
|
7
7
|
|
|
8
8
|
from ._parser import TOMLDecodeError, load, loads
|
|
@@ -68,6 +68,7 @@ BASIC_STR_ESCAPE_REPLACEMENTS: Final = MappingProxyType(
|
|
|
68
68
|
"\\n": "\u000a", # linefeed
|
|
69
69
|
"\\f": "\u000c", # form feed
|
|
70
70
|
"\\r": "\u000d", # carriage return
|
|
71
|
+
"\\e": "\u001b", # escape
|
|
71
72
|
'\\"': "\u0022", # quote
|
|
72
73
|
"\\\\": "\u005c", # backslash
|
|
73
74
|
}
|
|
@@ -542,7 +543,7 @@ def parse_inline_table(
|
|
|
542
543
|
nested_dict = NestedDict()
|
|
543
544
|
flags = Flags()
|
|
544
545
|
|
|
545
|
-
pos =
|
|
546
|
+
pos = skip_comments_and_array_ws(src, pos)
|
|
546
547
|
if src.startswith("}", pos):
|
|
547
548
|
return pos + 1, nested_dict.dict
|
|
548
549
|
while True:
|
|
@@ -557,16 +558,18 @@ def parse_inline_table(
|
|
|
557
558
|
if key_stem in nest:
|
|
558
559
|
raise TOMLDecodeError(f"Duplicate inline table key {key_stem!r}", src, pos)
|
|
559
560
|
nest[key_stem] = value
|
|
560
|
-
pos =
|
|
561
|
+
pos = skip_comments_and_array_ws(src, pos)
|
|
561
562
|
c = src[pos : pos + 1]
|
|
562
563
|
if c == "}":
|
|
563
564
|
return pos + 1, nested_dict.dict
|
|
564
565
|
if c != ",":
|
|
565
566
|
raise TOMLDecodeError("Unclosed inline table", src, pos)
|
|
567
|
+
pos += 1
|
|
568
|
+
pos = skip_comments_and_array_ws(src, pos)
|
|
569
|
+
if src.startswith("}", pos):
|
|
570
|
+
return pos + 1, nested_dict.dict
|
|
566
571
|
if isinstance(value, (dict, list)):
|
|
567
572
|
flags.set(key, Flags.FROZEN, recursive=True)
|
|
568
|
-
pos += 1
|
|
569
|
-
pos = skip_chars(src, pos, TOML_WS)
|
|
570
573
|
|
|
571
574
|
|
|
572
575
|
def parse_basic_str_escape(
|
|
@@ -588,6 +591,8 @@ def parse_basic_str_escape(
|
|
|
588
591
|
pos += 1
|
|
589
592
|
pos = skip_chars(src, pos, TOML_WS_AND_NEWLINE)
|
|
590
593
|
return pos, ""
|
|
594
|
+
if escape_id == "\\x":
|
|
595
|
+
return parse_hex_char(src, pos, 2)
|
|
591
596
|
if escape_id == "\\u":
|
|
592
597
|
return parse_hex_char(src, pos, 4)
|
|
593
598
|
if escape_id == "\\U":
|
|
@@ -14,12 +14,14 @@ if TYPE_CHECKING:
|
|
|
14
14
|
|
|
15
15
|
from ._types import ParseFloat
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
)
|
|
17
|
+
_TIME_RE_STR: Final = r"""
|
|
18
|
+
([01][0-9]|2[0-3]) # hours
|
|
19
|
+
:([0-5][0-9]) # minutes
|
|
20
|
+
(?:
|
|
21
|
+
:([0-5][0-9]) # optional seconds
|
|
22
|
+
(?:\.([0-9]{1,6})[0-9]*)? # optional fractions of a second
|
|
23
|
+
)?
|
|
24
|
+
"""
|
|
23
25
|
|
|
24
26
|
RE_NUMBER: Final = re.compile(
|
|
25
27
|
r"""
|
|
@@ -40,7 +42,7 @@ RE_NUMBER: Final = re.compile(
|
|
|
40
42
|
""",
|
|
41
43
|
flags=re.VERBOSE,
|
|
42
44
|
)
|
|
43
|
-
RE_LOCALTIME: Final = re.compile(_TIME_RE_STR)
|
|
45
|
+
RE_LOCALTIME: Final = re.compile(_TIME_RE_STR, flags=re.VERBOSE)
|
|
44
46
|
RE_DATETIME: Final = re.compile(
|
|
45
47
|
rf"""
|
|
46
48
|
([0-9]{{4}})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]) # date, e.g. 1988-10-27
|
|
@@ -76,7 +78,8 @@ def match_to_datetime(match: re.Match[str]) -> datetime | date:
|
|
|
76
78
|
year, month, day = int(year_str), int(month_str), int(day_str)
|
|
77
79
|
if hour_str is None:
|
|
78
80
|
return date(year, month, day)
|
|
79
|
-
hour, minute
|
|
81
|
+
hour, minute = int(hour_str), int(minute_str)
|
|
82
|
+
sec = int(sec_str) if sec_str else 0
|
|
80
83
|
micros = int(micros_str.ljust(6, "0")) if micros_str else 0
|
|
81
84
|
if offset_sign_str:
|
|
82
85
|
tz: tzinfo | None = cached_tz(
|
|
@@ -105,8 +108,9 @@ def cached_tz(hour_str: str, minute_str: str, sign_str: str) -> timezone:
|
|
|
105
108
|
|
|
106
109
|
def match_to_localtime(match: re.Match[str]) -> time:
|
|
107
110
|
hour_str, minute_str, sec_str, micros_str = match.groups()
|
|
111
|
+
sec = int(sec_str) if sec_str else 0
|
|
108
112
|
micros = int(micros_str.ljust(6, "0")) if micros_str else 0
|
|
109
|
-
return time(int(hour_str), int(minute_str),
|
|
113
|
+
return time(int(hour_str), int(minute_str), sec, micros)
|
|
110
114
|
|
|
111
115
|
|
|
112
116
|
def match_to_number(match: re.Match[str], parse_float: ParseFloat) -> Any:
|
|
@@ -6,7 +6,9 @@ from .util.connection import _TYPE_SOCKET_OPTIONS
|
|
|
6
6
|
from .util.timeout import _DEFAULT_TIMEOUT, _TYPE_TIMEOUT
|
|
7
7
|
from .util.url import Url
|
|
8
8
|
|
|
9
|
-
_TYPE_BODY = typing.Union[
|
|
9
|
+
_TYPE_BODY = typing.Union[
|
|
10
|
+
bytes, typing.IO[typing.Any], typing.Iterable[bytes | str], str
|
|
11
|
+
]
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
class ProxyConfig(typing.NamedTuple):
|
|
@@ -356,7 +356,6 @@ class HTTPHeaderDict(typing.MutableMapping[str, str]):
|
|
|
356
356
|
for key, val in other.items():
|
|
357
357
|
self.add(key, val)
|
|
358
358
|
elif isinstance(other, typing.Iterable):
|
|
359
|
-
other = typing.cast(typing.Iterable[tuple[str, str]], other)
|
|
360
359
|
for key, value in other:
|
|
361
360
|
self.add(key, value)
|
|
362
361
|
elif hasattr(other, "keys") and hasattr(other, "__getitem__"):
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
# file generated by
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
2
|
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
3
4
|
|
|
4
5
|
__all__ = [
|
|
5
6
|
"__version__",
|
|
@@ -10,25 +11,14 @@ __all__ = [
|
|
|
10
11
|
"commit_id",
|
|
11
12
|
]
|
|
12
13
|
|
|
13
|
-
TYPE_CHECKING = False
|
|
14
|
-
if TYPE_CHECKING:
|
|
15
|
-
from typing import Tuple
|
|
16
|
-
from typing import Union
|
|
17
|
-
|
|
18
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
19
|
-
COMMIT_ID = Union[str, None]
|
|
20
|
-
else:
|
|
21
|
-
VERSION_TUPLE = object
|
|
22
|
-
COMMIT_ID = object
|
|
23
|
-
|
|
24
14
|
version: str
|
|
25
15
|
__version__: str
|
|
26
|
-
__version_tuple__:
|
|
27
|
-
version_tuple:
|
|
28
|
-
commit_id:
|
|
29
|
-
__commit_id__:
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
30
20
|
|
|
31
|
-
__version__ = version = '2.
|
|
32
|
-
__version_tuple__ = version_tuple = (2,
|
|
21
|
+
__version__ = version = '2.7.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 7, 0)
|
|
33
23
|
|
|
34
24
|
__commit_id__ = commit_id = None
|
|
@@ -531,8 +531,8 @@ class HTTPConnection(_HTTPConnection):
|
|
|
531
531
|
"""
|
|
532
532
|
warnings.warn(
|
|
533
533
|
"HTTPConnection.request_chunked() is deprecated and will be removed "
|
|
534
|
-
"in urllib3
|
|
535
|
-
category=
|
|
534
|
+
"in urllib3 v3.0. Instead use HTTPConnection.request(..., chunked=True).",
|
|
535
|
+
category=FutureWarning,
|
|
536
536
|
stacklevel=2,
|
|
537
537
|
)
|
|
538
538
|
self.request(method, url, body=body, headers=headers, chunked=True)
|
|
@@ -697,9 +697,9 @@ class HTTPSConnection(HTTPConnection):
|
|
|
697
697
|
"""
|
|
698
698
|
warnings.warn(
|
|
699
699
|
"HTTPSConnection.set_cert() is deprecated and will be removed "
|
|
700
|
-
"in urllib3
|
|
700
|
+
"in urllib3 v3.0. Instead provide the parameters to the "
|
|
701
701
|
"HTTPSConnection constructor.",
|
|
702
|
-
category=
|
|
702
|
+
category=FutureWarning,
|
|
703
703
|
stacklevel=2,
|
|
704
704
|
)
|
|
705
705
|
|
|
@@ -216,8 +216,8 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
|
|
|
216
216
|
|
|
217
217
|
if self.proxy:
|
|
218
218
|
# Enable Nagle's algorithm for proxies, to avoid packet fragmentation.
|
|
219
|
-
#
|
|
220
|
-
#
|
|
219
|
+
# Defaulting `socket_options` to an empty list avoids it defaulting to
|
|
220
|
+
# ``HTTPConnection.default_socket_options``.
|
|
221
221
|
self.conn_kw.setdefault("socket_options", [])
|
|
222
222
|
|
|
223
223
|
self.conn_kw["proxy"] = self.proxy
|
|
@@ -702,8 +702,15 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
|
|
|
702
702
|
redirect. Typically this won't need to be set because urllib3 will
|
|
703
703
|
auto-populate the value when needed.
|
|
704
704
|
"""
|
|
705
|
-
|
|
706
|
-
|
|
705
|
+
# Ensure that the URL we're connecting to is properly encoded
|
|
706
|
+
if url.startswith("/"):
|
|
707
|
+
# URLs starting with / are inherently schemeless.
|
|
708
|
+
url = to_str(_encode_target(url))
|
|
709
|
+
destination_scheme = None
|
|
710
|
+
else:
|
|
711
|
+
parsed_url = parse_url(url)
|
|
712
|
+
destination_scheme = parsed_url.scheme
|
|
713
|
+
url = to_str(parsed_url.url)
|
|
707
714
|
|
|
708
715
|
if headers is None:
|
|
709
716
|
headers = self.headers
|
|
@@ -718,12 +725,6 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
|
|
|
718
725
|
if assert_same_host and not self.is_same_host(url):
|
|
719
726
|
raise HostChangedError(self, url, retries)
|
|
720
727
|
|
|
721
|
-
# Ensure that the URL we're connecting to is properly encoded
|
|
722
|
-
if url.startswith("/"):
|
|
723
|
-
url = to_str(_encode_target(url))
|
|
724
|
-
else:
|
|
725
|
-
url = to_str(parsed_url.url)
|
|
726
|
-
|
|
727
728
|
conn = None
|
|
728
729
|
|
|
729
730
|
# Track whether `conn` needs to be released before
|
|
@@ -896,6 +897,18 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods):
|
|
|
896
897
|
body = None
|
|
897
898
|
headers = HTTPHeaderDict(headers)._prepare_for_method_change()
|
|
898
899
|
|
|
900
|
+
# Strip headers marked as unsafe to forward to the redirected location.
|
|
901
|
+
# Check remove_headers_on_redirect to avoid a potential network call within
|
|
902
|
+
# self.is_same_host() which may use socket.gethostbyname() in the future.
|
|
903
|
+
if retries.remove_headers_on_redirect and not self.is_same_host(
|
|
904
|
+
redirect_location
|
|
905
|
+
):
|
|
906
|
+
new_headers = headers.copy() # type: ignore[union-attr]
|
|
907
|
+
for header in headers:
|
|
908
|
+
if header.lower() in retries.remove_headers_on_redirect:
|
|
909
|
+
new_headers.pop(header, None)
|
|
910
|
+
headers = new_headers
|
|
911
|
+
|
|
899
912
|
try:
|
|
900
913
|
retries = retries.increment(method, url, response=response, _pool=self)
|
|
901
914
|
except MaxRetryError:
|
|
@@ -36,6 +36,7 @@ class EmscriptenHttpResponseWrapper(BaseHTTPResponse):
|
|
|
36
36
|
):
|
|
37
37
|
self._pool = None # set by pool class
|
|
38
38
|
self._body = None
|
|
39
|
+
self._uncached_read_occurred = False
|
|
39
40
|
self._response = internal_response
|
|
40
41
|
self._url = url
|
|
41
42
|
self._connection = connection
|
|
@@ -160,10 +161,13 @@ class EmscriptenHttpResponseWrapper(BaseHTTPResponse):
|
|
|
160
161
|
# don't cache partial content
|
|
161
162
|
cache_content = False
|
|
162
163
|
data = self._response.body.read(amt)
|
|
164
|
+
self._uncached_read_occurred = True
|
|
163
165
|
else: # read all we can (and cache it)
|
|
164
166
|
data = self._response.body.read()
|
|
165
|
-
if cache_content:
|
|
167
|
+
if cache_content and not self._uncached_read_occurred:
|
|
166
168
|
self._body = data
|
|
169
|
+
else:
|
|
170
|
+
self._uncached_read_occurred = True
|
|
167
171
|
if self.length_remaining is not None:
|
|
168
172
|
self.length_remaining = max(self.length_remaining - len(data), 0)
|
|
169
173
|
if len(data) == 0 or (
|
|
@@ -6,9 +6,9 @@ support for Python 2.7 all relevant Python versions support SNI so
|
|
|
6
6
|
|
|
7
7
|
This needs the following packages installed:
|
|
8
8
|
|
|
9
|
-
* `pyOpenSSL`_ (tested with
|
|
10
|
-
* `cryptography`_ (minimum
|
|
11
|
-
* `idna`_ (minimum 2.
|
|
9
|
+
* `pyOpenSSL`_ (tested with 19.0.0)
|
|
10
|
+
* `cryptography`_ (minimum 2.3, from pyopenssl)
|
|
11
|
+
* `idna`_ (minimum 2.1, from cryptography)
|
|
12
12
|
|
|
13
13
|
However, pyOpenSSL depends on cryptography, so while we use all three directly here we
|
|
14
14
|
end up having relatively few packages required.
|
|
@@ -56,7 +56,6 @@ import ssl
|
|
|
56
56
|
import typing
|
|
57
57
|
from io import BytesIO
|
|
58
58
|
from socket import socket as socket_cls
|
|
59
|
-
from socket import timeout
|
|
60
59
|
|
|
61
60
|
from .. import util
|
|
62
61
|
|
|
@@ -311,7 +310,7 @@ class WrappedSocket:
|
|
|
311
310
|
raise
|
|
312
311
|
except OpenSSL.SSL.WantReadError as e:
|
|
313
312
|
if not util.wait_for_read(self.socket, self.socket.gettimeout()):
|
|
314
|
-
raise
|
|
313
|
+
raise TimeoutError("The read operation timed out") from e
|
|
315
314
|
else:
|
|
316
315
|
return self.recv(*args, **kwargs)
|
|
317
316
|
|
|
@@ -336,7 +335,7 @@ class WrappedSocket:
|
|
|
336
335
|
raise
|
|
337
336
|
except OpenSSL.SSL.WantReadError as e:
|
|
338
337
|
if not util.wait_for_read(self.socket, self.socket.gettimeout()):
|
|
339
|
-
raise
|
|
338
|
+
raise TimeoutError("The read operation timed out") from e
|
|
340
339
|
else:
|
|
341
340
|
return self.recv_into(*args, **kwargs)
|
|
342
341
|
|
|
@@ -353,7 +352,7 @@ class WrappedSocket:
|
|
|
353
352
|
return self.connection.send(data) # type: ignore[no-any-return]
|
|
354
353
|
except OpenSSL.SSL.WantWriteError as e:
|
|
355
354
|
if not util.wait_for_write(self.socket, self.socket.gettimeout()):
|
|
356
|
-
raise
|
|
355
|
+
raise TimeoutError() from e
|
|
357
356
|
continue
|
|
358
357
|
except OpenSSL.SSL.SysCallError as e:
|
|
359
358
|
raise OSError(e.args[0], str(e)) from e
|
|
@@ -520,7 +519,7 @@ class PyOpenSSLContext:
|
|
|
520
519
|
cnx.do_handshake()
|
|
521
520
|
except OpenSSL.SSL.WantReadError as e:
|
|
522
521
|
if not util.wait_for_read(sock, sock.gettimeout()):
|
|
523
|
-
raise
|
|
522
|
+
raise TimeoutError("select timed out") from e
|
|
524
523
|
continue
|
|
525
524
|
except OpenSSL.SSL.Error as e:
|
|
526
525
|
raise ssl.SSLError(f"bad handshake: {e!r}") from e
|
|
@@ -141,7 +141,7 @@ class SOCKSConnection(HTTPConnection):
|
|
|
141
141
|
raise NewConnectionError(
|
|
142
142
|
self, f"Failed to establish a new connection: {error}"
|
|
143
143
|
)
|
|
144
|
-
else:
|
|
144
|
+
else: # Defensive: see https://github.com/urllib3/urllib3/pull/3728#pullrequestreview-3816302703
|
|
145
145
|
raise NewConnectionError(
|
|
146
146
|
self, f"Failed to establish a new connection: {e}"
|
|
147
147
|
) from e
|
|
@@ -155,8 +155,8 @@ class NewConnectionError(ConnectTimeoutError, HTTPError):
|
|
|
155
155
|
def pool(self) -> HTTPConnection:
|
|
156
156
|
warnings.warn(
|
|
157
157
|
"The 'pool' property is deprecated and will be removed "
|
|
158
|
-
"in urllib3
|
|
159
|
-
|
|
158
|
+
"in urllib3 v3.0. Use 'conn' instead.",
|
|
159
|
+
FutureWarning,
|
|
160
160
|
stacklevel=2,
|
|
161
161
|
)
|
|
162
162
|
|
|
@@ -45,16 +45,16 @@ def format_header_param_rfc2231(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
|
45
45
|
An RFC-2231-formatted unicode string.
|
|
46
46
|
|
|
47
47
|
.. deprecated:: 2.0.0
|
|
48
|
-
Will be removed in urllib3
|
|
48
|
+
Will be removed in urllib3 v3.0. This is not valid for
|
|
49
49
|
``multipart/form-data`` header parameters.
|
|
50
50
|
"""
|
|
51
51
|
import warnings
|
|
52
52
|
|
|
53
53
|
warnings.warn(
|
|
54
|
-
"'format_header_param_rfc2231' is deprecated and will be "
|
|
55
|
-
"removed in urllib3
|
|
54
|
+
"'format_header_param_rfc2231' is insecure, deprecated and will be "
|
|
55
|
+
"removed in urllib3 v3.0. This is not valid for "
|
|
56
56
|
"multipart/form-data header parameters.",
|
|
57
|
-
|
|
57
|
+
FutureWarning,
|
|
58
58
|
stacklevel=2,
|
|
59
59
|
)
|
|
60
60
|
|
|
@@ -104,7 +104,7 @@ def format_multipart_header_param(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
|
104
104
|
.. versionchanged:: 2.0.0
|
|
105
105
|
Renamed from ``format_header_param_html5`` and
|
|
106
106
|
``format_header_param``. The old names will be removed in
|
|
107
|
-
urllib3
|
|
107
|
+
urllib3 v3.0.
|
|
108
108
|
"""
|
|
109
109
|
if isinstance(value, bytes):
|
|
110
110
|
value = value.decode("utf-8")
|
|
@@ -118,15 +118,15 @@ def format_header_param_html5(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
|
118
118
|
"""
|
|
119
119
|
.. deprecated:: 2.0.0
|
|
120
120
|
Renamed to :func:`format_multipart_header_param`. Will be
|
|
121
|
-
removed in urllib3
|
|
121
|
+
removed in urllib3 v3.0.
|
|
122
122
|
"""
|
|
123
123
|
import warnings
|
|
124
124
|
|
|
125
125
|
warnings.warn(
|
|
126
126
|
"'format_header_param_html5' has been renamed to "
|
|
127
127
|
"'format_multipart_header_param'. The old name will be "
|
|
128
|
-
"removed in urllib3
|
|
129
|
-
|
|
128
|
+
"removed in urllib3 v3.0.",
|
|
129
|
+
FutureWarning,
|
|
130
130
|
stacklevel=2,
|
|
131
131
|
)
|
|
132
132
|
return format_multipart_header_param(name, value)
|
|
@@ -136,15 +136,15 @@ def format_header_param(name: str, value: _TYPE_FIELD_VALUE) -> str:
|
|
|
136
136
|
"""
|
|
137
137
|
.. deprecated:: 2.0.0
|
|
138
138
|
Renamed to :func:`format_multipart_header_param`. Will be
|
|
139
|
-
removed in urllib3
|
|
139
|
+
removed in urllib3 v3.0.
|
|
140
140
|
"""
|
|
141
141
|
import warnings
|
|
142
142
|
|
|
143
143
|
warnings.warn(
|
|
144
144
|
"'format_header_param' has been renamed to "
|
|
145
145
|
"'format_multipart_header_param'. The old name will be "
|
|
146
|
-
"removed in urllib3
|
|
147
|
-
|
|
146
|
+
"removed in urllib3 v3.0.",
|
|
147
|
+
FutureWarning,
|
|
148
148
|
stacklevel=2,
|
|
149
149
|
)
|
|
150
150
|
return format_multipart_header_param(name, value)
|
|
@@ -165,7 +165,7 @@ class RequestField:
|
|
|
165
165
|
|
|
166
166
|
.. versionchanged:: 2.0.0
|
|
167
167
|
The ``header_formatter`` parameter is deprecated and will
|
|
168
|
-
be removed in urllib3
|
|
168
|
+
be removed in urllib3 v3.0.
|
|
169
169
|
"""
|
|
170
170
|
|
|
171
171
|
def __init__(
|
|
@@ -188,8 +188,8 @@ class RequestField:
|
|
|
188
188
|
|
|
189
189
|
warnings.warn(
|
|
190
190
|
"The 'header_formatter' parameter is deprecated and "
|
|
191
|
-
"will be removed in urllib3
|
|
192
|
-
|
|
191
|
+
"will be removed in urllib3 v3.0.",
|
|
192
|
+
FutureWarning,
|
|
193
193
|
stacklevel=2,
|
|
194
194
|
)
|
|
195
195
|
self.header_formatter = header_formatter
|
|
@@ -328,8 +328,8 @@ class PoolManager(RequestMethods):
|
|
|
328
328
|
if "strict" in request_context:
|
|
329
329
|
warnings.warn(
|
|
330
330
|
"The 'strict' parameter is no longer needed on Python 3+. "
|
|
331
|
-
"This will raise an error in urllib3
|
|
332
|
-
|
|
331
|
+
"This will raise an error in urllib3 v3.0.",
|
|
332
|
+
FutureWarning,
|
|
333
333
|
)
|
|
334
334
|
request_context.pop("strict")
|
|
335
335
|
|
|
@@ -436,10 +436,10 @@ class PoolManager(RequestMethods):
|
|
|
436
436
|
if u.scheme is None:
|
|
437
437
|
warnings.warn(
|
|
438
438
|
"URLs without a scheme (ie 'https://') are deprecated and will raise an error "
|
|
439
|
-
"in
|
|
439
|
+
"in urllib3 v3.0. To avoid this FutureWarning ensure all URLs "
|
|
440
440
|
"start with 'https://' or 'http://'. Read more in this issue: "
|
|
441
441
|
"https://github.com/urllib3/urllib3/issues/2920",
|
|
442
|
-
category=
|
|
442
|
+
category=FutureWarning,
|
|
443
443
|
stacklevel=2,
|
|
444
444
|
)
|
|
445
445
|
|
|
@@ -544,15 +544,17 @@ class ProxyManager(PoolManager):
|
|
|
544
544
|
|
|
545
545
|
proxy = urllib3.ProxyManager("https://localhost:3128/")
|
|
546
546
|
|
|
547
|
-
resp1 = proxy.request("GET", "
|
|
548
|
-
resp2 = proxy.request("GET", "
|
|
547
|
+
resp1 = proxy.request("GET", "http://google.com/")
|
|
548
|
+
resp2 = proxy.request("GET", "http://httpbin.org/")
|
|
549
549
|
|
|
550
|
+
# One pool was shared by both plain HTTP requests.
|
|
550
551
|
print(len(proxy.pools))
|
|
551
552
|
# 1
|
|
552
553
|
|
|
553
554
|
resp3 = proxy.request("GET", "https://httpbin.org/")
|
|
554
555
|
resp4 = proxy.request("GET", "https://twitter.com/")
|
|
555
556
|
|
|
557
|
+
# A separate pool was added for each HTTPS target.
|
|
556
558
|
print(len(proxy.pools))
|
|
557
559
|
# 3
|
|
558
560
|
|
|
@@ -657,7 +657,7 @@ class BaseHTTPResponse(io.IOBase):
|
|
|
657
657
|
return b""
|
|
658
658
|
|
|
659
659
|
# Compatibility methods for `io` module
|
|
660
|
-
def readinto(self, b: bytearray) -> int:
|
|
660
|
+
def readinto(self, b: bytearray | memoryview[int]) -> int:
|
|
661
661
|
temp = self.read(len(b))
|
|
662
662
|
if len(temp) == 0:
|
|
663
663
|
return 0
|
|
@@ -749,6 +749,7 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
749
749
|
self.auto_close = auto_close
|
|
750
750
|
|
|
751
751
|
self._body = None
|
|
752
|
+
self._uncached_read_occurred = False
|
|
752
753
|
self._fp: _HttplibHTTPResponse | None = None
|
|
753
754
|
self._original_response = original_response
|
|
754
755
|
self._fp_bytes_read = 0
|
|
@@ -791,13 +792,14 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
791
792
|
Unread data in the HTTPResponse connection blocks the connection from being released back to the pool.
|
|
792
793
|
"""
|
|
793
794
|
try:
|
|
794
|
-
self.
|
|
795
|
-
# Do not spend resources decoding the content unless
|
|
796
|
-
# decoding has already been initiated.
|
|
797
|
-
decode_content=self._has_decoded_content,
|
|
798
|
-
)
|
|
795
|
+
self._raw_read()
|
|
799
796
|
except (HTTPError, OSError, BaseSSLError, HTTPException):
|
|
800
797
|
pass
|
|
798
|
+
if self._has_decoded_content:
|
|
799
|
+
# `_raw_read` skips decompression, so we should clean up the
|
|
800
|
+
# decoder to avoid keeping unnecessary data in memory.
|
|
801
|
+
self._decoded_buffer = BytesQueueBuffer()
|
|
802
|
+
self._decoder = None
|
|
801
803
|
|
|
802
804
|
@property
|
|
803
805
|
def data(self) -> bytes:
|
|
@@ -820,7 +822,7 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
820
822
|
def tell(self) -> int:
|
|
821
823
|
"""
|
|
822
824
|
Obtain the number of bytes pulled over the wire so far. May differ from
|
|
823
|
-
the amount of content returned by :meth
|
|
825
|
+
the amount of content returned by :meth:`HTTPResponse.read`
|
|
824
826
|
if bytes are encoded on the wire (e.g, compressed).
|
|
825
827
|
"""
|
|
826
828
|
return self._fp_bytes_read
|
|
@@ -902,12 +904,8 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
902
904
|
raise ReadTimeoutError(self._pool, None, "Read timed out.") from e # type: ignore[arg-type]
|
|
903
905
|
|
|
904
906
|
except BaseSSLError as e:
|
|
905
|
-
#
|
|
906
|
-
|
|
907
|
-
# SSL errors related to framing/MAC get wrapped and reraised here
|
|
908
|
-
raise SSLError(e) from e
|
|
909
|
-
|
|
910
|
-
raise ReadTimeoutError(self._pool, None, "Read timed out.") from e # type: ignore[arg-type]
|
|
907
|
+
# SSL errors related to framing/MAC get wrapped and reraised here
|
|
908
|
+
raise SSLError(e) from e
|
|
911
909
|
|
|
912
910
|
except IncompleteRead as e:
|
|
913
911
|
if (
|
|
@@ -960,11 +958,7 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
960
958
|
if `amt` or `self.length_remaining` indicate that a problem may
|
|
961
959
|
happen.
|
|
962
960
|
|
|
963
|
-
|
|
964
|
-
* CPython < 3.9.7 because of a bug
|
|
965
|
-
https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900.
|
|
966
|
-
* urllib3 injected with pyOpenSSL-backed SSL-support.
|
|
967
|
-
* CPython < 3.10 only when `amt` does not fit 32-bit int.
|
|
961
|
+
This happens to urllib3 injected with pyOpenSSL-backed SSL-support.
|
|
968
962
|
"""
|
|
969
963
|
assert self._fp
|
|
970
964
|
c_int_max = 2**31 - 1
|
|
@@ -975,7 +969,7 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
975
969
|
and self.length_remaining
|
|
976
970
|
and self.length_remaining > c_int_max
|
|
977
971
|
)
|
|
978
|
-
) and
|
|
972
|
+
) and util.IS_PYOPENSSL:
|
|
979
973
|
if read1:
|
|
980
974
|
return self._fp.read1(c_int_max)
|
|
981
975
|
buffer = io.BytesIO()
|
|
@@ -1092,7 +1086,11 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1092
1086
|
elif amt is not None:
|
|
1093
1087
|
cache_content = False
|
|
1094
1088
|
|
|
1095
|
-
if
|
|
1089
|
+
if (
|
|
1090
|
+
self._decoder
|
|
1091
|
+
and self._decoder.has_unconsumed_tail
|
|
1092
|
+
and len(self._decoded_buffer) < amt
|
|
1093
|
+
):
|
|
1096
1094
|
decoded_data = self._decode(
|
|
1097
1095
|
b"",
|
|
1098
1096
|
decode_content,
|
|
@@ -1104,6 +1102,8 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1104
1102
|
return self._decoded_buffer.get(amt)
|
|
1105
1103
|
|
|
1106
1104
|
data = self._raw_read(amt)
|
|
1105
|
+
if not cache_content:
|
|
1106
|
+
self._uncached_read_occurred = True
|
|
1107
1107
|
|
|
1108
1108
|
flush_decoder = amt is None or (amt != 0 and not data)
|
|
1109
1109
|
|
|
@@ -1116,7 +1116,13 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1116
1116
|
|
|
1117
1117
|
if amt is None:
|
|
1118
1118
|
data = self._decode(data, decode_content, flush_decoder)
|
|
1119
|
-
|
|
1119
|
+
# It's possible that there is buffered decoded data after a
|
|
1120
|
+
# partial read.
|
|
1121
|
+
if decode_content and len(self._decoded_buffer) > 0:
|
|
1122
|
+
self._decoded_buffer.put(data)
|
|
1123
|
+
data = self._decoded_buffer.get_all()
|
|
1124
|
+
|
|
1125
|
+
if cache_content and not self._uncached_read_occurred:
|
|
1120
1126
|
self._body = data
|
|
1121
1127
|
else:
|
|
1122
1128
|
# do not waste memory on buffer when not decoding
|
|
@@ -1204,6 +1210,7 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1204
1210
|
|
|
1205
1211
|
# FIXME, this method's type doesn't say returning None is possible
|
|
1206
1212
|
data = self._raw_read(amt, read1=True)
|
|
1213
|
+
self._uncached_read_occurred = True
|
|
1207
1214
|
if not decode_content or data is None:
|
|
1208
1215
|
return data
|
|
1209
1216
|
|
|
@@ -1240,6 +1247,9 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1240
1247
|
If True, will attempt to decode the body based on the
|
|
1241
1248
|
'content-encoding' header.
|
|
1242
1249
|
"""
|
|
1250
|
+
if amt == 0:
|
|
1251
|
+
return
|
|
1252
|
+
|
|
1243
1253
|
if self.chunked and self.supports_chunked_reads():
|
|
1244
1254
|
yield from self.read_chunked(amt, decode_content=decode_content)
|
|
1245
1255
|
else:
|
|
@@ -1399,7 +1409,9 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1399
1409
|
if self._fp.fp is None: # type: ignore[union-attr]
|
|
1400
1410
|
return None
|
|
1401
1411
|
|
|
1402
|
-
if amt
|
|
1412
|
+
if amt == 0:
|
|
1413
|
+
return
|
|
1414
|
+
elif amt and amt < 0:
|
|
1403
1415
|
# Negative numbers and `None` should be treated the same,
|
|
1404
1416
|
# but httplib handles only `None` correctly.
|
|
1405
1417
|
amt = None
|
|
@@ -1410,6 +1422,7 @@ class HTTPResponse(BaseHTTPResponse):
|
|
|
1410
1422
|
chunk = b""
|
|
1411
1423
|
else:
|
|
1412
1424
|
self._update_chunk_length()
|
|
1425
|
+
self._uncached_read_occurred = True
|
|
1413
1426
|
if self.chunk_left == 0:
|
|
1414
1427
|
break
|
|
1415
1428
|
chunk = self._handle_chunk(amt)
|
|
@@ -157,6 +157,14 @@ class Retry:
|
|
|
157
157
|
|
|
158
158
|
By default, backoff is disabled (factor set to 0).
|
|
159
159
|
|
|
160
|
+
:param float backoff_max:
|
|
161
|
+
The maximum backoff time (in seconds) between retry attempts.
|
|
162
|
+
This value caps the computed backoff from `backoff_factor`.
|
|
163
|
+
|
|
164
|
+
:param float backoff_jitter:
|
|
165
|
+
Random jitter amount (in seconds) added to the computed backoff.
|
|
166
|
+
Jitter is sampled uniformly from `0` to `backoff_jitter`.
|
|
167
|
+
|
|
160
168
|
:param bool raise_on_redirect: Whether, if the number of redirects is
|
|
161
169
|
exhausted, to raise a MaxRetryError, or to return a response with a
|
|
162
170
|
response code in the 3xx range.
|