Skip to content

Fix _shape=arrays and _shape=arrayfirst for rows containing infinity - #2986

Closed
simonw wants to merge 5 commits into
mainfrom
row-json-shape-2612
Closed

simonw wants to merge 5 commits into
mainfrom
row-json-shape-2612

Conversation

@simonw

@simonw simonw commented Oct 5, 2026

Copy link
Copy Markdown
Owner

remove_infinites() returns a plain list for sqlite3.Row rows that contain
infinity, which caused a 500 error with these two shapes.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01GaqG8H8ajwxizKXdbGrtve

claude added 3 commits October 5, 2026 21:44
remove_infinites() returns a plain list for sqlite3.Row rows that contain
infinity, which caused a 500 error with these two shapes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GaqG8H8ajwxizKXdbGrtve
/db/table/pk.json returns the row as an object in a "row" key instead of
a single-item "rows" list. Passing any ?_shape= returns the same shapes as
table JSON, so ?_shape=objects gets the previous "rows" list back.

This happens in the JSON renderer, so other output renderers still get the
"rows" list for row pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GaqG8H8ajwxizKXdbGrtve
The default row shape no longer includes "truncated", since a single row
lookup cannot be truncated, and ?_extra=render_cell returns one object to
match "row". With a ?_shape= both behave as they do for tables.

Refs #2612

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GaqG8H8ajwxizKXdbGrtve
@codecov

codecov Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (8381d87) to head (5c64a2b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
datasette/renderer.py 0.00% 12 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2986   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         79      79           
  Lines      13929   13930    +1     
=====================================
- Misses     13929   13930    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

simonw and others added 2 commits November 14, 2026 14:25
# Conflicts:
#	datasette/renderer.py
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@simonw

simonw commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

@simonw simonw closed this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants