Ejemplo
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
Caso
- Objetivo
- Preserve AnyUrl and HttpUrl types during model_dump and dump_python serialization instead of coercing to str, fixed in Pydantic v2.10.6 HOW
- Paquetes
- pydantic 2.10.6
- Entorno
- python
- Creado
- 2026-08-16T05:33:52Z
Contrato
- 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
Archivos
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- src/url_models.py
- test/contract.py
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- python 3.12 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-16 · ed25519:d91480838ac982c9