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
|
@@ -7,21 +7,29 @@ Compatibility code to be able to use `http.cookiejar.CookieJar` with requests.
|
|
|
7
7
|
requests.utils imports from here, so be careful with imports.
|
|
8
8
|
"""
|
|
9
9
|
|
|
10
|
+
from __future__ import annotations
|
|
11
|
+
|
|
10
12
|
import calendar
|
|
11
13
|
import copy
|
|
12
14
|
import time
|
|
15
|
+
from collections.abc import Iterator, MutableMapping
|
|
16
|
+
from http.cookiejar import Cookie, CookieJar, CookiePolicy
|
|
17
|
+
from typing import TYPE_CHECKING, Any, TypeVar, overload
|
|
13
18
|
|
|
14
19
|
from ._internal_utils import to_native_string
|
|
15
|
-
from .
|
|
20
|
+
from ._types import is_prepared as _is_prepared
|
|
21
|
+
from .compat import Morsel, cookielib, urlparse, urlunparse
|
|
22
|
+
|
|
23
|
+
if TYPE_CHECKING:
|
|
24
|
+
from _typeshed import SupportsKeysAndGetItem
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
import dummy_threading as threading
|
|
26
|
+
from .models import PreparedRequest
|
|
27
|
+
|
|
28
|
+
import threading
|
|
21
29
|
|
|
22
30
|
|
|
23
31
|
class MockRequest:
|
|
24
|
-
"""Wraps a `requests.
|
|
32
|
+
"""Wraps a `requests.PreparedRequest` to mimic a `urllib2.Request`.
|
|
25
33
|
|
|
26
34
|
The code in `http.cookiejar.CookieJar` expects this interface in order to correctly
|
|
27
35
|
manage cookie policies, i.e., determine whether a cookie can be set, given the
|
|
@@ -32,21 +40,24 @@ class MockRequest:
|
|
|
32
40
|
probably want `get_cookie_header`, defined below.
|
|
33
41
|
"""
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
type: str
|
|
44
|
+
|
|
45
|
+
def __init__(self, request: PreparedRequest) -> None:
|
|
46
|
+
assert _is_prepared(request)
|
|
36
47
|
self._r = request
|
|
37
|
-
self._new_headers = {}
|
|
48
|
+
self._new_headers: dict[str, str] = {}
|
|
38
49
|
self.type = urlparse(self._r.url).scheme
|
|
39
50
|
|
|
40
|
-
def get_type(self):
|
|
51
|
+
def get_type(self) -> str:
|
|
41
52
|
return self.type
|
|
42
53
|
|
|
43
|
-
def get_host(self):
|
|
54
|
+
def get_host(self) -> str:
|
|
44
55
|
return urlparse(self._r.url).netloc
|
|
45
56
|
|
|
46
|
-
def get_origin_req_host(self):
|
|
57
|
+
def get_origin_req_host(self) -> str:
|
|
47
58
|
return self.get_host()
|
|
48
59
|
|
|
49
|
-
def get_full_url(self):
|
|
60
|
+
def get_full_url(self) -> str:
|
|
50
61
|
# Only return the response's URL if the user hadn't set the Host
|
|
51
62
|
# header
|
|
52
63
|
if not self._r.headers.get("Host"):
|
|
@@ -66,37 +77,37 @@ class MockRequest:
|
|
|
66
77
|
]
|
|
67
78
|
)
|
|
68
79
|
|
|
69
|
-
def is_unverifiable(self):
|
|
80
|
+
def is_unverifiable(self) -> bool:
|
|
70
81
|
return True
|
|
71
82
|
|
|
72
|
-
def has_header(self, name):
|
|
83
|
+
def has_header(self, name: str) -> bool:
|
|
73
84
|
return name in self._r.headers or name in self._new_headers
|
|
74
85
|
|
|
75
|
-
def get_header(self, name, default=None):
|
|
76
|
-
return self._r.headers.get(name, self._new_headers.get(name, default))
|
|
86
|
+
def get_header(self, name: str, default: str | None = None) -> str | None:
|
|
87
|
+
return self._r.headers.get(name, self._new_headers.get(name, default)) # type: ignore[return-value]
|
|
77
88
|
|
|
78
|
-
def add_header(self, key, val):
|
|
89
|
+
def add_header(self, key: str, val: str) -> None:
|
|
79
90
|
"""cookiejar has no legitimate use for this method; add it back if you find one."""
|
|
80
91
|
raise NotImplementedError(
|
|
81
92
|
"Cookie headers should be added with add_unredirected_header()"
|
|
82
93
|
)
|
|
83
94
|
|
|
84
|
-
def add_unredirected_header(self, name, value):
|
|
95
|
+
def add_unredirected_header(self, name: str, value: str) -> None:
|
|
85
96
|
self._new_headers[name] = value
|
|
86
97
|
|
|
87
|
-
def get_new_headers(self):
|
|
98
|
+
def get_new_headers(self) -> dict[str, str]:
|
|
88
99
|
return self._new_headers
|
|
89
100
|
|
|
90
101
|
@property
|
|
91
|
-
def unverifiable(self):
|
|
102
|
+
def unverifiable(self) -> bool:
|
|
92
103
|
return self.is_unverifiable()
|
|
93
104
|
|
|
94
105
|
@property
|
|
95
|
-
def origin_req_host(self):
|
|
106
|
+
def origin_req_host(self) -> str:
|
|
96
107
|
return self.get_origin_req_host()
|
|
97
108
|
|
|
98
109
|
@property
|
|
99
|
-
def host(self):
|
|
110
|
+
def host(self) -> str:
|
|
100
111
|
return self.get_host()
|
|
101
112
|
|
|
102
113
|
|
|
@@ -107,21 +118,23 @@ class MockResponse:
|
|
|
107
118
|
the way `http.cookiejar` expects to see them.
|
|
108
119
|
"""
|
|
109
120
|
|
|
110
|
-
def __init__(self, headers):
|
|
121
|
+
def __init__(self, headers: Any) -> None:
|
|
111
122
|
"""Make a MockResponse for `cookiejar` to read.
|
|
112
123
|
|
|
113
124
|
:param headers: a httplib.HTTPMessage or analogous carrying the headers
|
|
114
125
|
"""
|
|
115
126
|
self._headers = headers
|
|
116
127
|
|
|
117
|
-
def info(self):
|
|
128
|
+
def info(self) -> Any:
|
|
118
129
|
return self._headers
|
|
119
130
|
|
|
120
|
-
def getheaders(self, name):
|
|
131
|
+
def getheaders(self, name: str) -> Any:
|
|
121
132
|
self._headers.getheaders(name)
|
|
122
133
|
|
|
123
134
|
|
|
124
|
-
def extract_cookies_to_jar(
|
|
135
|
+
def extract_cookies_to_jar(
|
|
136
|
+
jar: CookieJar, request: PreparedRequest, response: Any
|
|
137
|
+
) -> None:
|
|
125
138
|
"""Extract the cookies from the response into a CookieJar.
|
|
126
139
|
|
|
127
140
|
:param jar: http.cookiejar.CookieJar (not necessarily a RequestsCookieJar)
|
|
@@ -134,26 +147,28 @@ def extract_cookies_to_jar(jar, request, response):
|
|
|
134
147
|
req = MockRequest(request)
|
|
135
148
|
# pull out the HTTPMessage with the headers and put it in the mock:
|
|
136
149
|
res = MockResponse(response._original_response.msg)
|
|
137
|
-
jar.extract_cookies(res, req)
|
|
150
|
+
jar.extract_cookies(res, req) # type: ignore[arg-type]
|
|
138
151
|
|
|
139
152
|
|
|
140
|
-
def get_cookie_header(jar, request):
|
|
153
|
+
def get_cookie_header(jar: CookieJar, request: PreparedRequest) -> str | None:
|
|
141
154
|
"""
|
|
142
155
|
Produce an appropriate Cookie header string to be sent with `request`, or None.
|
|
143
156
|
|
|
144
157
|
:rtype: str
|
|
145
158
|
"""
|
|
146
159
|
r = MockRequest(request)
|
|
147
|
-
jar.add_cookie_header(r)
|
|
160
|
+
jar.add_cookie_header(r) # type: ignore[arg-type]
|
|
148
161
|
return r.get_new_headers().get("Cookie")
|
|
149
162
|
|
|
150
163
|
|
|
151
|
-
def remove_cookie_by_name(
|
|
164
|
+
def remove_cookie_by_name(
|
|
165
|
+
cookiejar: CookieJar, name: str, domain: str | None = None, path: str | None = None
|
|
166
|
+
) -> None:
|
|
152
167
|
"""Unsets a cookie by name, by default over all domains and paths.
|
|
153
168
|
|
|
154
169
|
Wraps CookieJar.clear(), is O(n).
|
|
155
170
|
"""
|
|
156
|
-
clearables = []
|
|
171
|
+
clearables: list[tuple[str, str, str]] = []
|
|
157
172
|
for cookie in cookiejar:
|
|
158
173
|
if cookie.name != name:
|
|
159
174
|
continue
|
|
@@ -173,7 +188,7 @@ class CookieConflictError(RuntimeError):
|
|
|
173
188
|
"""
|
|
174
189
|
|
|
175
190
|
|
|
176
|
-
class RequestsCookieJar(
|
|
191
|
+
class RequestsCookieJar(CookieJar, MutableMapping[str, str | None]): # type: ignore[misc]
|
|
177
192
|
"""Compatibility class; is a http.cookiejar.CookieJar, but exposes a dict
|
|
178
193
|
interface.
|
|
179
194
|
|
|
@@ -191,7 +206,15 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
191
206
|
.. warning:: dictionary operations that are normally O(1) may be O(n).
|
|
192
207
|
"""
|
|
193
208
|
|
|
194
|
-
|
|
209
|
+
_policy: CookiePolicy
|
|
210
|
+
|
|
211
|
+
def get( # type: ignore[override]
|
|
212
|
+
self,
|
|
213
|
+
name: str,
|
|
214
|
+
default: str | None = None,
|
|
215
|
+
domain: str | None = None,
|
|
216
|
+
path: str | None = None,
|
|
217
|
+
) -> str | None:
|
|
195
218
|
"""Dict-like get() that also supports optional domain and path args in
|
|
196
219
|
order to resolve naming collisions from using one cookie jar over
|
|
197
220
|
multiple domains.
|
|
@@ -203,7 +226,9 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
203
226
|
except KeyError:
|
|
204
227
|
return default
|
|
205
228
|
|
|
206
|
-
def set(
|
|
229
|
+
def set(
|
|
230
|
+
self, name: str, value: str | Morsel[dict[str, str]] | None, **kwargs: Any
|
|
231
|
+
) -> Cookie | None:
|
|
207
232
|
"""Dict-like set() that also supports optional domain and path args in
|
|
208
233
|
order to resolve naming collisions from using one cookie jar over
|
|
209
234
|
multiple domains.
|
|
@@ -222,7 +247,7 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
222
247
|
self.set_cookie(c)
|
|
223
248
|
return c
|
|
224
249
|
|
|
225
|
-
def iterkeys(self):
|
|
250
|
+
def iterkeys(self) -> Iterator[str]:
|
|
226
251
|
"""Dict-like iterkeys() that returns an iterator of names of cookies
|
|
227
252
|
from the jar.
|
|
228
253
|
|
|
@@ -231,7 +256,7 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
231
256
|
for cookie in iter(self):
|
|
232
257
|
yield cookie.name
|
|
233
258
|
|
|
234
|
-
def keys(self):
|
|
259
|
+
def keys(self) -> list[str]: # type: ignore[override]
|
|
235
260
|
"""Dict-like keys() that returns a list of names of cookies from the
|
|
236
261
|
jar.
|
|
237
262
|
|
|
@@ -239,7 +264,7 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
239
264
|
"""
|
|
240
265
|
return list(self.iterkeys())
|
|
241
266
|
|
|
242
|
-
def itervalues(self):
|
|
267
|
+
def itervalues(self) -> Iterator[str | None]:
|
|
243
268
|
"""Dict-like itervalues() that returns an iterator of values of cookies
|
|
244
269
|
from the jar.
|
|
245
270
|
|
|
@@ -248,7 +273,7 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
248
273
|
for cookie in iter(self):
|
|
249
274
|
yield cookie.value
|
|
250
275
|
|
|
251
|
-
def values(self):
|
|
276
|
+
def values(self) -> list[str | None]: # type: ignore[override]
|
|
252
277
|
"""Dict-like values() that returns a list of values of cookies from the
|
|
253
278
|
jar.
|
|
254
279
|
|
|
@@ -256,7 +281,7 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
256
281
|
"""
|
|
257
282
|
return list(self.itervalues())
|
|
258
283
|
|
|
259
|
-
def iteritems(self):
|
|
284
|
+
def iteritems(self) -> Iterator[tuple[str, str | None]]:
|
|
260
285
|
"""Dict-like iteritems() that returns an iterator of name-value tuples
|
|
261
286
|
from the jar.
|
|
262
287
|
|
|
@@ -265,7 +290,7 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
265
290
|
for cookie in iter(self):
|
|
266
291
|
yield cookie.name, cookie.value
|
|
267
292
|
|
|
268
|
-
def items(self):
|
|
293
|
+
def items(self) -> list[tuple[str, str | None]]: # type: ignore[override]
|
|
269
294
|
"""Dict-like items() that returns a list of name-value tuples from the
|
|
270
295
|
jar. Allows client-code to call ``dict(RequestsCookieJar)`` and get a
|
|
271
296
|
vanilla python dict of key value pairs.
|
|
@@ -274,43 +299,45 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
274
299
|
"""
|
|
275
300
|
return list(self.iteritems())
|
|
276
301
|
|
|
277
|
-
def list_domains(self):
|
|
302
|
+
def list_domains(self) -> list[str]:
|
|
278
303
|
"""Utility method to list all the domains in the jar."""
|
|
279
|
-
domains = []
|
|
304
|
+
domains: list[str] = []
|
|
280
305
|
for cookie in iter(self):
|
|
281
306
|
if cookie.domain not in domains:
|
|
282
307
|
domains.append(cookie.domain)
|
|
283
308
|
return domains
|
|
284
309
|
|
|
285
|
-
def list_paths(self):
|
|
310
|
+
def list_paths(self) -> list[str]:
|
|
286
311
|
"""Utility method to list all the paths in the jar."""
|
|
287
|
-
paths = []
|
|
312
|
+
paths: list[str] = []
|
|
288
313
|
for cookie in iter(self):
|
|
289
314
|
if cookie.path not in paths:
|
|
290
315
|
paths.append(cookie.path)
|
|
291
316
|
return paths
|
|
292
317
|
|
|
293
|
-
def multiple_domains(self):
|
|
318
|
+
def multiple_domains(self) -> bool:
|
|
294
319
|
"""Returns True if there are multiple domains in the jar.
|
|
295
320
|
Returns False otherwise.
|
|
296
321
|
|
|
297
322
|
:rtype: bool
|
|
298
323
|
"""
|
|
299
|
-
domains = []
|
|
324
|
+
domains: list[str] = []
|
|
300
325
|
for cookie in iter(self):
|
|
301
|
-
if cookie.domain is not None and cookie.domain in domains:
|
|
326
|
+
if cookie.domain is not None and cookie.domain in domains: # type: ignore[reportUnnecessaryComparison] # defensive check
|
|
302
327
|
return True
|
|
303
328
|
domains.append(cookie.domain)
|
|
304
329
|
return False # there is only one domain in jar
|
|
305
330
|
|
|
306
|
-
def get_dict(
|
|
331
|
+
def get_dict(
|
|
332
|
+
self, domain: str | None = None, path: str | None = None
|
|
333
|
+
) -> dict[str, str | None]:
|
|
307
334
|
"""Takes as an argument an optional domain and path and returns a plain
|
|
308
335
|
old Python dict of name-value pairs of cookies that meet the
|
|
309
336
|
requirements.
|
|
310
337
|
|
|
311
338
|
:rtype: dict
|
|
312
339
|
"""
|
|
313
|
-
dictionary = {}
|
|
340
|
+
dictionary: dict[str, str | None] = {}
|
|
314
341
|
for cookie in iter(self):
|
|
315
342
|
if (domain is None or cookie.domain == domain) and (
|
|
316
343
|
path is None or cookie.path == path
|
|
@@ -318,13 +345,17 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
318
345
|
dictionary[cookie.name] = cookie.value
|
|
319
346
|
return dictionary
|
|
320
347
|
|
|
321
|
-
def
|
|
348
|
+
def __iter__(self) -> Iterator[Cookie]: # type: ignore[override]
|
|
349
|
+
"""RequestCookieJar's __iter__ comes from CookieJar not MutableMapping."""
|
|
350
|
+
return super().__iter__()
|
|
351
|
+
|
|
352
|
+
def __contains__(self, name: object) -> bool:
|
|
322
353
|
try:
|
|
323
354
|
return super().__contains__(name)
|
|
324
355
|
except CookieConflictError:
|
|
325
356
|
return True
|
|
326
357
|
|
|
327
|
-
def __getitem__(self, name):
|
|
358
|
+
def __getitem__(self, name: str) -> str | None:
|
|
328
359
|
"""Dict-like __getitem__() for compatibility with client code. Throws
|
|
329
360
|
exception if there are more than one cookie with name. In that case,
|
|
330
361
|
use the more explicit get() method instead.
|
|
@@ -333,29 +364,33 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
333
364
|
"""
|
|
334
365
|
return self._find_no_duplicates(name)
|
|
335
366
|
|
|
336
|
-
def __setitem__(
|
|
367
|
+
def __setitem__(
|
|
368
|
+
self, name: str, value: str | Morsel[dict[str, str]] | None
|
|
369
|
+
) -> None:
|
|
337
370
|
"""Dict-like __setitem__ for compatibility with client code. Throws
|
|
338
371
|
exception if there is already a cookie of that name in the jar. In that
|
|
339
372
|
case, use the more explicit set() method instead.
|
|
340
373
|
"""
|
|
341
374
|
self.set(name, value)
|
|
342
375
|
|
|
343
|
-
def __delitem__(self, name):
|
|
376
|
+
def __delitem__(self, name: str) -> None:
|
|
344
377
|
"""Deletes a cookie given a name. Wraps ``http.cookiejar.CookieJar``'s
|
|
345
378
|
``remove_cookie_by_name()``.
|
|
346
379
|
"""
|
|
347
380
|
remove_cookie_by_name(self, name)
|
|
348
381
|
|
|
349
|
-
def set_cookie(self, cookie, *args, **kwargs):
|
|
382
|
+
def set_cookie(self, cookie: Cookie, *args: Any, **kwargs: Any) -> None:
|
|
350
383
|
if (
|
|
351
|
-
|
|
352
|
-
and
|
|
353
|
-
and
|
|
384
|
+
(value := cookie.value) is not None
|
|
385
|
+
and value.startswith('"')
|
|
386
|
+
and value.endswith('"')
|
|
354
387
|
):
|
|
355
|
-
cookie.value =
|
|
388
|
+
cookie.value = value.replace('\\"', "")
|
|
356
389
|
return super().set_cookie(cookie, *args, **kwargs)
|
|
357
390
|
|
|
358
|
-
def update(
|
|
391
|
+
def update( # type: ignore[override]
|
|
392
|
+
self, other: CookieJar | SupportsKeysAndGetItem[str, str]
|
|
393
|
+
) -> None:
|
|
359
394
|
"""Updates this jar with cookies from another CookieJar or dict-like"""
|
|
360
395
|
if isinstance(other, cookielib.CookieJar):
|
|
361
396
|
for cookie in other:
|
|
@@ -363,7 +398,9 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
363
398
|
else:
|
|
364
399
|
super().update(other)
|
|
365
400
|
|
|
366
|
-
def _find(
|
|
401
|
+
def _find(
|
|
402
|
+
self, name: str, domain: str | None = None, path: str | None = None
|
|
403
|
+
) -> str | None:
|
|
367
404
|
"""Requests uses this method internally to get cookie values.
|
|
368
405
|
|
|
369
406
|
If there are conflicting cookies, _find arbitrarily chooses one.
|
|
@@ -383,7 +420,9 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
383
420
|
|
|
384
421
|
raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")
|
|
385
422
|
|
|
386
|
-
def _find_no_duplicates(
|
|
423
|
+
def _find_no_duplicates(
|
|
424
|
+
self, name: str, domain: str | None = None, path: str | None = None
|
|
425
|
+
) -> str:
|
|
387
426
|
"""Both ``__get_item__`` and ``get`` call this function: it's never
|
|
388
427
|
used elsewhere in Requests.
|
|
389
428
|
|
|
@@ -408,42 +447,42 @@ class RequestsCookieJar(cookielib.CookieJar, MutableMapping):
|
|
|
408
447
|
# we will eventually return this as long as no cookie conflict
|
|
409
448
|
toReturn = cookie.value
|
|
410
449
|
|
|
411
|
-
if toReturn:
|
|
450
|
+
if toReturn is not None:
|
|
412
451
|
return toReturn
|
|
413
452
|
raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}")
|
|
414
453
|
|
|
415
|
-
def __getstate__(self):
|
|
454
|
+
def __getstate__(self) -> dict[str, Any]:
|
|
416
455
|
"""Unlike a normal CookieJar, this class is pickleable."""
|
|
417
456
|
state = self.__dict__.copy()
|
|
418
457
|
# remove the unpickleable RLock object
|
|
419
458
|
state.pop("_cookies_lock")
|
|
420
459
|
return state
|
|
421
460
|
|
|
422
|
-
def __setstate__(self, state):
|
|
461
|
+
def __setstate__(self, state: dict[str, Any]) -> None:
|
|
423
462
|
"""Unlike a normal CookieJar, this class is pickleable."""
|
|
424
463
|
self.__dict__.update(state)
|
|
425
464
|
if "_cookies_lock" not in self.__dict__:
|
|
426
465
|
self._cookies_lock = threading.RLock()
|
|
427
466
|
|
|
428
|
-
def copy(self):
|
|
467
|
+
def copy(self) -> RequestsCookieJar:
|
|
429
468
|
"""Return a copy of this RequestsCookieJar."""
|
|
430
469
|
new_cj = RequestsCookieJar()
|
|
431
470
|
new_cj.set_policy(self.get_policy())
|
|
432
471
|
new_cj.update(self)
|
|
433
472
|
return new_cj
|
|
434
473
|
|
|
435
|
-
def get_policy(self):
|
|
474
|
+
def get_policy(self) -> CookiePolicy:
|
|
436
475
|
"""Return the CookiePolicy instance used."""
|
|
437
476
|
return self._policy
|
|
438
477
|
|
|
439
478
|
|
|
440
|
-
def _copy_cookie_jar(jar):
|
|
479
|
+
def _copy_cookie_jar(jar: CookieJar | None) -> CookieJar | None: # type: ignore[reportUnusedFunction] # cross-module usage in models.py
|
|
441
480
|
if jar is None:
|
|
442
481
|
return None
|
|
443
482
|
|
|
444
|
-
if
|
|
483
|
+
if copy_method := getattr(jar, "copy", None):
|
|
445
484
|
# We're dealing with an instance of RequestsCookieJar
|
|
446
|
-
return
|
|
485
|
+
return copy_method()
|
|
447
486
|
# We're dealing with a generic CookieJar instance
|
|
448
487
|
new_jar = copy.copy(jar)
|
|
449
488
|
new_jar.clear()
|
|
@@ -452,13 +491,13 @@ def _copy_cookie_jar(jar):
|
|
|
452
491
|
return new_jar
|
|
453
492
|
|
|
454
493
|
|
|
455
|
-
def create_cookie(name, value, **kwargs):
|
|
494
|
+
def create_cookie(name: str, value: str, **kwargs: Any) -> Cookie:
|
|
456
495
|
"""Make a cookie from underspecified parameters.
|
|
457
496
|
|
|
458
497
|
By default, the pair of `name` and `value` will be set for the domain ''
|
|
459
498
|
and sent on every request (this is sometimes called a "supercookie").
|
|
460
499
|
"""
|
|
461
|
-
result = {
|
|
500
|
+
result: dict[str, Any] = {
|
|
462
501
|
"version": 0,
|
|
463
502
|
"name": name,
|
|
464
503
|
"value": value,
|
|
@@ -489,10 +528,10 @@ def create_cookie(name, value, **kwargs):
|
|
|
489
528
|
return cookielib.Cookie(**result)
|
|
490
529
|
|
|
491
530
|
|
|
492
|
-
def morsel_to_cookie(morsel):
|
|
531
|
+
def morsel_to_cookie(morsel: Morsel[Any]) -> Cookie:
|
|
493
532
|
"""Convert a Morsel object into a Cookie containing the one k/v pair."""
|
|
494
533
|
|
|
495
|
-
expires = None
|
|
534
|
+
expires: int | None = None
|
|
496
535
|
if morsel["max-age"]:
|
|
497
536
|
try:
|
|
498
537
|
expires = int(time.time() + int(morsel["max-age"]))
|
|
@@ -518,7 +557,30 @@ def morsel_to_cookie(morsel):
|
|
|
518
557
|
)
|
|
519
558
|
|
|
520
559
|
|
|
521
|
-
|
|
560
|
+
_CookieJarT = TypeVar("_CookieJarT", bound=CookieJar)
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
@overload
|
|
564
|
+
def cookiejar_from_dict(
|
|
565
|
+
cookie_dict: dict[str, str] | None,
|
|
566
|
+
cookiejar: None = None,
|
|
567
|
+
overwrite: bool = True,
|
|
568
|
+
) -> RequestsCookieJar: ...
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
@overload
|
|
572
|
+
def cookiejar_from_dict(
|
|
573
|
+
cookie_dict: dict[str, str] | None,
|
|
574
|
+
cookiejar: _CookieJarT,
|
|
575
|
+
overwrite: bool = True,
|
|
576
|
+
) -> _CookieJarT: ...
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
def cookiejar_from_dict(
|
|
580
|
+
cookie_dict: dict[str, str] | None,
|
|
581
|
+
cookiejar: CookieJar | None = None,
|
|
582
|
+
overwrite: bool = True,
|
|
583
|
+
) -> CookieJar:
|
|
522
584
|
"""Returns a CookieJar from a key/value dictionary.
|
|
523
585
|
|
|
524
586
|
:param cookie_dict: Dict of key/values to insert into CookieJar.
|
|
@@ -539,22 +601,24 @@ def cookiejar_from_dict(cookie_dict, cookiejar=None, overwrite=True):
|
|
|
539
601
|
return cookiejar
|
|
540
602
|
|
|
541
603
|
|
|
542
|
-
def merge_cookies(
|
|
604
|
+
def merge_cookies(
|
|
605
|
+
cookiejar: CookieJar, cookies: dict[str, str] | CookieJar | None
|
|
606
|
+
) -> CookieJar:
|
|
543
607
|
"""Add cookies to cookiejar and returns a merged CookieJar.
|
|
544
608
|
|
|
545
609
|
:param cookiejar: CookieJar object to add the cookies to.
|
|
546
610
|
:param cookies: Dictionary or CookieJar object to be added.
|
|
547
611
|
:rtype: CookieJar
|
|
548
612
|
"""
|
|
549
|
-
if not isinstance(cookiejar, cookielib.CookieJar):
|
|
613
|
+
if not isinstance(cookiejar, cookielib.CookieJar): # type: ignore[reportUnnecessaryIsInstance] # runtime guard
|
|
550
614
|
raise ValueError("You can only merge into CookieJar")
|
|
551
615
|
|
|
552
616
|
if isinstance(cookies, dict):
|
|
553
617
|
cookiejar = cookiejar_from_dict(cookies, cookiejar=cookiejar, overwrite=False)
|
|
554
618
|
elif isinstance(cookies, cookielib.CookieJar):
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
619
|
+
if update_method := getattr(cookiejar, "update", None):
|
|
620
|
+
update_method(cookies)
|
|
621
|
+
else:
|
|
558
622
|
for cookie_in_jar in cookies:
|
|
559
623
|
cookiejar.set_cookie(cookie_in_jar)
|
|
560
624
|
|
|
@@ -5,23 +5,33 @@ requests.exceptions
|
|
|
5
5
|
This module contains the set of Requests' exceptions.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import TYPE_CHECKING, Any
|
|
11
|
+
|
|
8
12
|
from pip._vendor.urllib3.exceptions import HTTPError as BaseHTTPError
|
|
9
13
|
|
|
10
14
|
from .compat import JSONDecodeError as CompatJSONDecodeError
|
|
11
15
|
|
|
16
|
+
if TYPE_CHECKING:
|
|
17
|
+
from .models import PreparedRequest, Request, Response
|
|
18
|
+
|
|
12
19
|
|
|
13
20
|
class RequestException(IOError):
|
|
14
21
|
"""There was an ambiguous exception that occurred while handling your
|
|
15
22
|
request.
|
|
16
23
|
"""
|
|
17
24
|
|
|
18
|
-
|
|
25
|
+
response: Response | None
|
|
26
|
+
request: Request | PreparedRequest | None
|
|
27
|
+
|
|
28
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
19
29
|
"""Initialize RequestException with `request` and `response` objects."""
|
|
20
|
-
response = kwargs.pop("response", None)
|
|
30
|
+
response: Response | None = kwargs.pop("response", None)
|
|
21
31
|
self.response = response
|
|
22
32
|
self.request = kwargs.pop("request", None)
|
|
23
33
|
if response is not None and not self.request and hasattr(response, "request"):
|
|
24
|
-
self.request =
|
|
34
|
+
self.request = response.request
|
|
25
35
|
super().__init__(*args, **kwargs)
|
|
26
36
|
|
|
27
37
|
|
|
@@ -32,7 +42,7 @@ class InvalidJSONError(RequestException):
|
|
|
32
42
|
class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError):
|
|
33
43
|
"""Couldn't decode the text into json"""
|
|
34
44
|
|
|
35
|
-
def __init__(self, *args, **kwargs):
|
|
45
|
+
def __init__(self, *args: Any, **kwargs: Any) -> None:
|
|
36
46
|
"""
|
|
37
47
|
Construct the JSONDecodeError instance first with all
|
|
38
48
|
args. Then use it's args to construct the IOError so that
|
|
@@ -42,7 +52,7 @@ class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError):
|
|
|
42
52
|
CompatJSONDecodeError.__init__(self, *args)
|
|
43
53
|
InvalidJSONError.__init__(self, *self.args, **kwargs)
|
|
44
54
|
|
|
45
|
-
def __reduce__(self):
|
|
55
|
+
def __reduce__(self) -> tuple[Any, ...] | str:
|
|
46
56
|
"""
|
|
47
57
|
The __reduce__ method called when pickling the object must
|
|
48
58
|
be the one from the JSONDecodeError (be it json/simplejson)
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"""Module containing bug report helper(s)."""
|
|
2
2
|
|
|
3
|
+
# pyright: reportUnknownMemberType=false
|
|
4
|
+
|
|
3
5
|
import json
|
|
4
6
|
import platform
|
|
5
7
|
import ssl
|
|
6
8
|
import sys
|
|
9
|
+
from typing import Any
|
|
7
10
|
|
|
8
11
|
from pip._vendor import idna
|
|
9
12
|
from pip._vendor import urllib3
|
|
@@ -20,8 +23,8 @@ except ImportError:
|
|
|
20
23
|
OpenSSL = None
|
|
21
24
|
cryptography = None
|
|
22
25
|
else:
|
|
23
|
-
import cryptography
|
|
24
|
-
import OpenSSL
|
|
26
|
+
import cryptography # type: ignore[import-not-found]
|
|
27
|
+
import OpenSSL # type: ignore[import-not-found]
|
|
25
28
|
|
|
26
29
|
|
|
27
30
|
def _implementation():
|
|
@@ -40,11 +43,11 @@ def _implementation():
|
|
|
40
43
|
if implementation == "CPython":
|
|
41
44
|
implementation_version = platform.python_version()
|
|
42
45
|
elif implementation == "PyPy":
|
|
43
|
-
pypy = sys.pypy_version_info
|
|
46
|
+
pypy = sys.pypy_version_info # type: ignore[attr-defined]
|
|
44
47
|
implementation_version = f"{pypy.major}.{pypy.minor}.{pypy.micro}"
|
|
45
|
-
if sys.pypy_version_info.releaselevel != "final":
|
|
48
|
+
if sys.pypy_version_info.releaselevel != "final": # type: ignore[attr-defined]
|
|
46
49
|
implementation_version = "".join(
|
|
47
|
-
[implementation_version, sys.pypy_version_info.releaselevel]
|
|
50
|
+
[implementation_version, sys.pypy_version_info.releaselevel] # type: ignore[attr-defined]
|
|
48
51
|
)
|
|
49
52
|
elif implementation == "Jython":
|
|
50
53
|
implementation_version = platform.python_version() # Complete Guess
|
|
@@ -56,7 +59,7 @@ def _implementation():
|
|
|
56
59
|
return {"name": implementation, "version": implementation_version}
|
|
57
60
|
|
|
58
61
|
|
|
59
|
-
def info():
|
|
62
|
+
def info() -> dict[str, Any]:
|
|
60
63
|
"""Generate information for a bug report."""
|
|
61
64
|
try:
|
|
62
65
|
platform_info = {
|
|
@@ -70,15 +73,15 @@ def info():
|
|
|
70
73
|
}
|
|
71
74
|
|
|
72
75
|
implementation_info = _implementation()
|
|
73
|
-
urllib3_info = {"version": urllib3.__version__}
|
|
76
|
+
urllib3_info = {"version": urllib3.__version__} # type: ignore[reportPrivateImportUsage]
|
|
74
77
|
charset_normalizer_info = {"version": None}
|
|
75
|
-
chardet_info = {"version": None}
|
|
78
|
+
chardet_info: dict[str, str | None] = {"version": None}
|
|
76
79
|
if charset_normalizer:
|
|
77
80
|
charset_normalizer_info = {"version": charset_normalizer.__version__}
|
|
78
81
|
if chardet:
|
|
79
82
|
chardet_info = {"version": chardet.__version__}
|
|
80
83
|
|
|
81
|
-
pyopenssl_info = {
|
|
84
|
+
pyopenssl_info: dict[str, str | None] = {
|
|
82
85
|
"version": None,
|
|
83
86
|
"openssl_version": "",
|
|
84
87
|
}
|
|
@@ -95,7 +98,7 @@ def info():
|
|
|
95
98
|
}
|
|
96
99
|
|
|
97
100
|
system_ssl = ssl.OPENSSL_VERSION_NUMBER
|
|
98
|
-
system_ssl_info = {"version": f"{system_ssl:x}" if system_ssl is not None else ""}
|
|
101
|
+
system_ssl_info = {"version": f"{system_ssl:x}" if system_ssl is not None else ""} # type: ignore[reportUnnecessaryComparison]
|
|
99
102
|
|
|
100
103
|
return {
|
|
101
104
|
"platform": platform_info,
|