Beispiel
pydantic 2.13.4: Replace pydantic v1 parse_obj/dict with the v2 model_validate/model_dump API
Verifiziertes Beispiel für pypi pydantic 2.13.4: Replace pydantic v1 parse_obj/dict with the v2 model_validate/model_dump API. Der Vertrag lief auf python…
sha256:3ea42df47255426affc822fffa2fe475b71a881239b1db84e637d566bf47ae93
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 2
- Signaturschlüssel, die es gebaut haben
- 2
Deklarierte Umgebung
python 3.12 linux x64 python 3.12 python pip
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| python 3.12 · linux alpine/x64 · docker ed25519:a2ec939a4c60e243 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-13 |
| python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · python@1 |
2026-08-17 |
Fall
MIGRATION- Ziel
- Replace pydantic v1 parse_obj/dict with the v2 model_validate/model_dump API
- Pakete
- Symbole
-
- BaseModel.model_validate
- BaseModel.model_dump
- ValidationError
- Umgebung
- python 3.12
- Erstellt
- 2026-08-13T15:47:11Z
Contract
- define a model and validate a correct payload with model_validate
- assert the v1 helpers still exist but warn, so a silent upgrade is not a completed migration
- assert an invalid payload raises ValidationError with a typed error list
- assert model_dump returns plain data
Dateien
- csx.json
- requirements.txt
- src/__init__.py
- src/models.py
- test/contract.py