Skip to content

Fix table CSV exports to ignore max_csv_mb#2660

Open
RamiNoodle733 wants to merge 2 commits intosimonw:mainfrom
RamiNoodle733:fix/issue-2444-table-export-max-csv
Open

Fix table CSV exports to ignore max_csv_mb#2660
RamiNoodle733 wants to merge 2 commits intosimonw:mainfrom
RamiNoodle733:fix/issue-2444-table-export-max-csv

Conversation

@RamiNoodle733
Copy link
Copy Markdown

@RamiNoodle733 RamiNoodle733 commented Mar 8, 2026

Fixes #2444

Summary

  • treat max_csv_mb as a limit for arbitrary SQL CSV exports, not full table exports
  • skip the CSV size limit when exporting table endpoints (/db/table.csv)
  • add a regression test proving a >1MB table CSV export succeeds even with max_csv_mb=1

Verification

  • .venv/bin/ruff check datasette/views/base.py tests/test_csv.py
  • .venv/bin/black --check datasette/views/base.py tests/test_csv.py
  • .venv/bin/python -m pytest -q tests/test_csv.py -k "table_csv_ignores_max_csv_mb"

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.

don't apply max_returned_rows to full table exports

1 participant