You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(waterdata): never let the progress line crash or truncate a query
Code review surfaced two real defects:
- ProgressReporter rendering wrote to stderr unguarded. Because the per-page
`reporter.add_page()` call sits inside `_walk_pages`' broad `except
Exception`, a render failure — BrokenPipeError when output is piped to
`head`, or UnicodeEncodeError for the `·` separator on a non-UTF-8 stderr —
was misread as a failed request and silently truncated the result; on the
first (pre-loop) page it crashed the query outright. `_render` and `close`
now swallow stream errors and disable further rendering, so progress is
strictly best-effort.
- The "Geopandas not installed" advisory lived in the per-page
`_handle_stats_nesting`, so a multi-page stats query (now at WARNING) emitted
one warning per page. Moved it to `get_stats_data` so it fires once, matching
`_walk_pages`.
Also harden rate-limit formatting against non-decimal unicode digits
(`isascii() and isdigit()`), and add regression tests: a broken progress
stream must not truncate pagination, and the geopandas advisory fires once.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments