sqlite-utils/sqlite_utils
Claude eaf39c4929
Fix progress bar stalling at ~50% for multi-byte encodings like utf-16-le
UpdateWrapper.__iter__ was using len(line) (character count) to track
progress, but the progress bar is initialised with os.path.getsize()
(byte count).  For utf-16-le each character is 2 bytes, so the bar
only ever reached ~50% before the insert completed.

Use TextIOWrapper.buffer.tell() when available to report the true
number of bytes consumed, falling back to len(line) for non-TextIOWrapper
objects.

Fixes #439
2026-07-24 14:29:42 +00:00
..
__init__.py New migrations system, ported from sqlite-migrate (#754) 2026-06-21 09:40:21 -07:00
__main__.py Support 'python -m sqlite_utils', closes #368 2022-01-08 18:33:22 -08:00
cli.py .transform(strict=) and sqlite-utils transform --strict/--no-strict (#788) 2026-07-11 16:43:37 -07:00
db.py Transform now refuses to run inside a transaction if destructive foreign keys exist (#795) 2026-07-12 08:43:51 -07:00
hookspecs.py More type annotations (#697) 2025-12-16 22:11:47 -08:00
migrations.py migrate --stop-before an already-applied migration is now an error 2026-07-06 21:50:05 -07:00
plugins.py fix: Plugins are still loaded when running tests (#719) 2026-06-21 16:14:45 -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 More type annotations (#697) 2025-12-16 22:11:47 -08:00
utils.py Fix progress bar stalling at ~50% for multi-byte encodings like utf-16-le 2026-07-24 14:29:42 +00:00