Repository navigation
Conversation
Saadia751
reviewed
Oct 14, 2026
Saadia751
left a comment
There was a problem hiding this comment.
I tried one-shot header generators with three namedtuple rows and three dictionary rows, requesting a subset in a different order. Every row uses the same column selection, and the text header agrees. Mutating the original header list after construction also leaves the table's materialized headers intact.
Checked c39d347747a0 with standalone Python 3.12.14 checks (7 passing assertions). I haven't run the full upstream suite.
Owner
|
Folded into #609 (see the PR description for credit). Thanks for the report and the repro. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change
Table.from_datadocumentsheadersas an iterable, but a header iterator is consumed by the first row and later raisesTypeErrorwhen determining the table width. Materialize headers before extracting rows and normalize headers in the direct constructor as well. Requested column order is retained for every row.Validation: 2 new regressions fail on master and pass with the fix; full suite passes with 680 tests and 12 subtests.
The backstory
Earlier contribution from this account: #555. Found by passing an iterator for the documented iterable headers argument to a two-row table. No separate issue was filed.
AI assistance