Repository navigation
Conversation
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
Extending a headerless table with a wider row leaves its cached width unchanged. For example:
table.to_text()raisesIndexError, andtable.to_html(orientation='vertical')omits the second column. Recalculate the width when extending a headerless table so the existing filling step pads earlier rows. Tables with headers keep their current width behavior.Two regression tests cover wider rows, shorter rows, iterator inputs, empty extensions, and the text and vertical HTML output. Both fail before the fix. On Linux with CPython 3.14.2,
uv run --group dev pytest --doctest-modules boltons tests -qpasses all 674 tests and doctests.git diff --checkalso passes.The backstory
This is my first contribution to boltons. I wanted to support an open-source project with a concrete bug fix; this was found during a source review, rather than through a production incident. The useful finding here was that extending a table updates its rows but can leave the renderers using the old column count.
AI assistance
Tool: OpenAI Codex
Model: GPT-6
Original user request (relevant excerpt, translated from Russian): “You can look at projects across any tech stack. Look for vulnerabilities and bugs so we can support open source and help improve these projects.”
Codex investigated the bug, prepared the patch and regression tests, and ran the checks locally. Both new tests failed before the fix; all 674 tests passed afterward.