🔧 Deprecate the never-functional needtable style_col option - #1779
Merged
Conversation
Declared in option_spec, collected, and stored on the node — but process_needtables never reads it back, there is no CSS or JS for it, and it is absent from the needtable documentation. It has never had any effect. A document that sets it must delete the line.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1779 +/- ##
==========================================
+ Coverage 86.87% 90.56% +3.68%
==========================================
Files 56 76 +20
Lines 6532 11336 +4804
==========================================
+ Hits 5675 10267 +4592
- Misses 857 1069 +212
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Maintainer ruling: keep the option accepted so existing documents build unchanged, and emit a 'deprecated' warning naming the truth — it has never had any effect. The dead plumbing (TypedDict field, node attribute, collection) stays removed; a test pins the warning firing once.
The example needtable filters on :tags: test_table, but none of the three needs its dropdown defines carried that tag, so the rendered table was empty. Tagging them restores the intended output: each need's row with table_001's three part rows directly beneath it, part links resolved. Verified with a scratch build (3 need rows + 3 need_part rows).
ubmarco
approved these changes
Aug 19, 2026
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 option has never done anything
git grep -n style_colacross the whole tree returns exactly five hits, every one a declaration or a dump of one:sphinx_needs/directives/needtable.py— theoption_specentry, theself.options.get, and the node-attribute assignmentsphinx_needs/data.py— theNeedsTableTypeTypedDict fieldstyle_col=""in a doctree snapshotprocess_needtablesnever readscurrent_needtable["style_col"]back. There is no CSS and no JS keyed on it, and it is absent fromdocs/directives/needtable.rst, which documents every other option (including its functional sibling:style_row:). A build that sets it renders exactly as one that does not.Shape: deprecate-and-warn, not remove (maintainer ruling)
The option stays in
option_specso existing documents keep building unchanged, and setting it now emits adeprecatedwarning stating the truth:This is the
export_idpattern — an easy deprecation pathway instead of an unknown-option error. The dead plumbing is still removed (the TypedDict field, the node attribute, the collection), so nothing stores or transports the value anymore.A test pins the warning firing exactly once (
tests/doc_test/doc_needtable/test_styles.rstgained a table carrying the option), and the doctree snapshot loses its inertstyle_col=""attribute.Also folded in: the
show_partsdocs example was rendering an empty tableThe example needtable in
docs/directives/needtable.rst'sshow_partssection filters on:tags: test_table— but none of the three needs its dropdown defines (table_001..table_003) carried that tag, so the rendered table selected nothing. The three needs are now tagged, and a scratch build confirms the intended output: each need's row, withtable_001's three part rows directly beneath it and the part links resolved. (This example doubles as the manual cross-check for ubCode's:show_parts:implementation in useblocks/ubcode#2990.)Found while implementing the needtable options in ubCode (useblocks/ubcode#2983 / useblocks/ubcode#2990): ubCode used to warn that
:style_col:was "not yet applied", which wrongly implied a Sphinx-Needs build applies it — its warning now states the option has no effect in either tool.