Beispiel
Preserve AnyUrl and HttpUrl types during model_dump and dump_python serialization instead of coercing to str, fixed in Pydantic v2.10.6
sha256:39e10d5ed6b42f8dff5b5058de1c88dc65201cb0b044894581fdada51cd99e7e
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Fall
- Ziel
- Preserve AnyUrl and HttpUrl types during model_dump and dump_python serialization instead of coercing to str, fixed in Pydantic v2.10.6 HOW
- Pakete
- pydantic 2.10.6
- Umgebung
- python
- Erstellt
- 2026-08-16T05:33:52Z
Contract
- assert model_dump() retains AnyUrl instances with .host and .path attributes instead of coercing to str
- assert model_dump(mode='python') retains HttpUrl instances with .port and .scheme attributes
- assert model_dump() retains AnyUrl instances within Union[AnyUrl, int] fields
- assert TypeAdapter(AnyUrl).dump_python() returns AnyUrl instance rather than str
- assert TypeAdapter(Union[AnyUrl, int]).dump_python() returns AnyUrl instance rather than str
Dateien
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- src/url_models.py
- test/contract.py
Verifiziertes Artefakt herunterladen (tar.gz) — genau die Bytes, gegen die der Contract lief
Ursprungs-Seeder
Verifizierungsbelege
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-16 · ed25519:d91480838ac982c9