data-wellformed's message for a 100000-deep JSON file depends on the Python build ("malformed JSON" vs "Expecting value")

Aperta
#290 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Start in ecosystems/data.py at _parse_json, which calls json.loads and falls back to the non-recursive check_json only on RecursionError. Reproduce with n_structure_100000_opening_arrays.json and n_structure_open_array_object.json from the JSONTestSuite corpus under two recursion limits. Done when one message is produced regardless of the limit, and the corpus expectations are updated to match.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ecosystems/data.py::_parse_json tries json.loads first and falls back to the non-recursive check_json only on RecursionError. For the JSON test-suite files n_structure_100000_opening_arrays.json and n_structure_open_array_object.json (denoland/std jsonc/testdata/JSONTestSuite/, ocaml-community/yojson test/compliance/test_cases/), json.loads raises RecursionError on one machine (→ check_json → "1:100001: malformed JSON") and JSONDecodeError("Expecting value") on another (the GitHub runner, Python 3.14.10 → "1:100001: Expecting value" / "2:1: Expecting value"), so the corpus expectations for the two projects differ between the first local recording and the first CI run (corpus PR).

Expected: one message whatever the recursion limit, e.g. always parse with check_json (or report the C decoder's position only when it agrees with the non-recursive checker). The corpus records the runner's wording for now.

Found by the regression corpus's first CI run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01ByTXNqDWdM7HzezrFtEvQt

Lingua principale
Python
Stelle
4
Fork
1
Merge medio
10h 41m
PR unite (30g)
79

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cpp-best-practices/project_validator

Tutte le issue di cpp-best-practices/project_validator

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.