requirements-no-separate-sphinx-pin (TN003)#
Group |
Default severity |
|---|---|
Structural |
Warning |
A technote’s requirements.txt should not pin Sphinx as a separate requirement.
documenteer[technote] already constrains Sphinx to the versions its configuration supports, and a separate pin drifts: as Documenteer moves forward, the stale pin either conflicts with Documenteer’s constraint (the install fails) or holds the technote on an old Sphinx that Documenteer no longer tests against.
This rule is skipped for non-Sphinx technotes.
Example of a failing technote#
requirements.txt#
documenteer[technote]>=2.0,<3.0
sphinx==7.2.6
[TN003] requirements.txt pins 'sphinx' separately. Remove it and rely on the Sphinx version constrained by 'documenteer[technote]' to avoid version drift.
How to fix it#
Delete the sphinx line and let documenteer[technote] resolve the Sphinx version:
requirements.txt#
documenteer[technote]>=2.0,<3.0
See also#
TN002 —
requirements.txtmust declaredocumenteer[technote].