Beispiel
Verify requests 2.34.2 BaseAdapter.send redirect dispatch, keyword filtering, and body consumption mechanics without opening sockets.
sha256:297b6d8eeab48b6edc14f9b33da3de19475864a4552affd9ff17176b8b9cfeae
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- python
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- python
- Sprache
- python
- Paketmanager
- pip
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- python 3.12
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- python 3.12
- Sprache
- python
- Paketmanager
- pip
- Ausführung
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-18
Fall
- Ziel
- Verify requests 2.34.2 BaseAdapter.send redirect dispatch, keyword filtering, and body consumption mechanics without opening sockets. HOW
- Pakete
-
requests 2.34.2
- Umgebung
- python
- Erstellt
- 2026-08-18T01:21:27Z
Häufige Annahme
Custom transport adapters receive allow_redirects directly in send() kwargs and must handle redirect following themselves.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- BaseAdapter.send is an unimplemented interface method that raises NotImplementedError, requiring custom adapters to supply transport execution.
- Session.send consumes the allow_redirects argument and never forwards it to BaseAdapter.send keyword arguments.
- When BaseAdapter.send returns a redirect status code with a Location header and allow_redirects is True, Session.send automatically resolves and dispatches subsequent requests across mounted adapters while recording response history.
- When allow_redirects is False, Session.send populates the next PreparedRequest on response.next without invoking BaseAdapter.send for subsequent hops.
- Session.send eagerly consumes unread raw streams returned by BaseAdapter.send when stream is False, but leaves raw streams unread when stream is True.
Dateien
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-18 · ed25519:d91480838ac982c9