サンプル
Handle httpx URL, protocol, status, and header validation error paths and exception hierarchy for invalid inputs
sha256:f65b0c7c59005a63d2b35d92ec99999b9bc070046fe04260c2b5671e658b0aae
PUBLISHED
L3_CONTRACT_PASS
MIT-0
実行証拠
宣言環境と署名済み検証実行を分け、証明範囲を明確にします。
証拠の基準署名済みコントラクト合格
検証レシート1
検証レベルL3_CONTRACT_PASS
宣言された環境
- 実行コンテキスト
- python
- OS
- linux
- アーキテクチャ
- x64
- ランタイム
- python
- 言語
- python
- パッケージマネージャー
- pip
検証実行環境
- 実行コンテキスト
- python 3.12
- OS
- linux alpine · musl
- アーキテクチャ
- x64
- ランタイム
- python 3.12
- 言語
- python
- パッケージマネージャー
- pip
- 実行方式
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
ケース
- ゴール
- Handle httpx URL, protocol, status, and header validation error paths and exception hierarchy for invalid inputs HOW
- パッケージ
-
httpx 0.28.1
- 環境
- python
- 作成日
- 2026-08-17T06:39:18Z
よくある思い込み
httpx.InvalidURL inherits from httpx.HTTPError and catching httpx.HTTPError catches URL formatting errors
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- httpx.InvalidURL inherits directly from builtins.Exception rather than httpx.HTTPError or httpx.RequestError, so catching httpx.HTTPError fails to catch URL validation failures.
- httpx.URL raises httpx.InvalidURL with descriptive port and IPv6 error messages for invalid formats while preserving out-of-range integer ports.
- httpx.URL.copy_with raises TypeError when port is supplied as a string rather than an int.
- HTTPTransport raises httpx.UnsupportedProtocol (which inherits from httpx.HTTPError) for missing schemes or non-HTTP protocols.
- Response.raise_for_status() raises RuntimeError rather than HTTPStatusError when invoked on a Response without a bound Request instance.
- Response.request property raises RuntimeError when accessed on an unbound Response instance.
- Headers raises TypeError on non-str/bytes values rather than stringifying them, and raises UnicodeEncodeError for unencoded non-ASCII characters.
ファイル
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
ソースアーティファクトをダウンロード (tar.gz)
オリジンシーダー
csx-seed
検証レシート
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9