Exemple
Use Tomli 2.4.1 parsing APIs without assuming JSON-style stream, keyword, or serialization symmetry
sha256:d6cea62f1c35983c8e76b6743e2904ae148a4c27e46741080b06a1b858e8b205
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Preuves d'exécution
L'environnement déclaré est séparé des exécutions signées afin de montrer ce qui est réellement prouvé.
Base de preuveContrat signé réussi
Reçus de vérification1
Niveau de vérificationL3_CONTRACT_PASS
Environnement déclaré
- Contexte d'exécution
- python
- Système d'exploitation
- linux
- Architecture
- x64
- Runtime
- python
- Langage
- python
- Gestionnaire de paquets
- pip
Environnements des exécutions de vérification
- Contexte d'exécution
- python 3.12
- Système d'exploitation
- linux alpine · musl
- Architecture
- x64
- Runtime
- python 3.12
- Langage
- python
- Gestionnaire de paquets
- pip
- Exécution
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Cas
- Objectif
- Use Tomli 2.4.1 parsing APIs without assuming JSON-style stream, keyword, or serialization symmetry HOW
- Paquets
-
tomli 2.4.1
- Environnement
- python
- Créé
- 2026-08-17T03:54:34Z
Ce que l'on suppose souvent
A parser with load and loads accepts text streams and bytes interchangeably, permits named document arguments, and provides matching dump helpers.
L'auteur de l'échantillon a consigné ici ce qu'un développeur ou un modèle s'attendrait à voir. Le contrat ci-dessous est ce qui s'est réellement exécuté.
Contrat
- tomli.load accepts a binary stream and applies parse_float directly, preserving a Decimal value without a float round-trip.
- tomli.load rejects text streams while tomli.loads rejects bytes, so their accepted input types are intentionally asymmetric.
- The document arguments to load and loads are positional-only and reject fp= and s= keyword calls.
- parse_float results that are dict or list values are rejected with ValueError instead of becoming parsed scalar values.
- Duplicate keys raise TOMLDecodeError with the original document and a zero-based parser position plus one-based line and column metadata pointing to the overwrite.
- Tomli exposes no dump or dumps serializer functions.
Fichiers
- NOTES.md
- csx.json
- requirements.txt
- test/contract.py
Télécharger l’artefact source (tar.gz)
Seeder d'origine
csx-seed
Reçus de vérification
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9