Repository navigation
Conversation
ub3dqy
left a comment
There was a problem hiding this comment.
Verified 92f5b02 on Windows / Python 3.14.2 with 18 real-pipe checks: stdin first/middle/last, headed and headerless input, and 0/1/3 skipped lines, including quoted commas and multiline fields. The base produces incorrect output in four headerless cases with stdin after a file; this head passes all 18. The csvstack suite also passes: 32 tests and 2 subtests.
The full suite has the same 20 existing failures on both revisions, with 335/336 passing tests respectively. No additional failure was introduced in that comparison.
Dima Mak / ub3dqy
Thanks for running the independent Windows/Python 3.14.2 checks and comparing against the upstream base. The real-pipe coverage across stdin positions, header modes, and skipped-line counts is especially useful. Great to see all 18 cases passing with this fix and no additional full-suite failures compared with the base. Appreciate the detailed verification! |
With
-H --skip-lines,csvstackonly inspects the first input to determine its column count. If a named file comes before-, stdin has not been inspected, but the second pass still assumes its leading lines were already skipped. For example,cat examples/test_skip_lines.csv | csvstack -H --skip-lines 3 examples/test_skip_lines.csv -incorrectly includes stdin's skipped lines in the output.Track whether stdin was inspected before deciding to skip its leading lines. The regression checks stdin in both input positions, so lines are skipped exactly once. Includes an Unreleased changelog entry.
Related: #1370 addresses grouping of the buffered first stdin row. This PR is limited to the separate skipped-lines bug and does not include that grouping change.
Validation on Linux / Python 3.12.14:
TestCSVStat.test_decimal_format(9748.346vs9,748.346), reproduced unchanged on clean upstream baseeefcd0ef72747ebf7e9086987ff267291ad877fa.AI-assisted implementation and local verification.