sqlite-utils/sqlite_utils
makiaveli1 6da8638e18
Fix delimiter detection in rows_from_file() for ragged and single-column files
When a CSV or TSV file was not perfectly rectangular, `csv.Sniffer` either
raised "Could not determine delimiter" (single-column files) or returned a
nonsense delimiter such as "a" for "id,name\n1,Cleo,extra". The latter
silently turned the header into a single column called "id,n" and broke the
documented extra-field handling.

Treat an alphanumeric sniffed delimiter as a failed sniff and fall back to
whichever of comma or tab appears on the most lines, using comma when
neither appears (a single-column file). Well-formed files are unaffected.
2026-09-29 06:23:27 +01:00
..
__init__.py Support ANY column types for strict tables 2026-08-12 16:44:01 -07:00
__main__.py Support 'python -m sqlite_utils', closes #368 2022-01-08 18:33:22 -08:00
cli.py Support ANY column types for strict tables 2026-08-12 16:44:01 -07:00
create_table_parser.py Preserve composite UNIQUE constraints in transforms 2026-08-12 18:46:18 -07:00
db.py Fix for sqlite-utils 4.2 crashing bug (#843) 2026-08-13 16:52:03 -07:00
hookspecs.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
migrations.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
plugins.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
py.typed py.typed file so mypy picks up the types, closes #331 2021-11-14 15:21:04 -08:00
recipes.py Fixes for Ruff>=0.16.0 (#814) 2026-07-25 14:53:12 -07:00
utils.py Fix delimiter detection in rows_from_file() for ragged and single-column files 2026-09-29 06:23:27 +01:00