You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I added some debugging print statements to visit_versionmodified() I found that the versionlabels dict is empty. 😕 I can confirm that the directive and their args are gathered correctly.
defvisit_versionmodified(self, node):
print(node['type'], node['version']) # verify directive and arg is correctprint(versionlabels) # verify that no keys named `versionadded` or `versionchanged` existtext=versionlabels[node['type']] %node['version']
iflen(node):
text+=': 'else:
text+='.'replacement=nodes.paragraph()
replacement+=nodes.Text(text)
replacement.extend(node.children)
node.parent.replace(node, replacement)
the print statements output:
versionadded 0.0.5
{}
and for the versionchanged directive:
versionchanged 0.0.5
{}
EDIT
This problem might be instigated by a Sphinx change because I found this declaration in Sphinx's __init__.py:
# Moved to sphinx.directives.other (will be overriden later)versionlabels= {} # type: Dict[str, str]
after some more digging, I found the dict with expected values in Sphinx.domain.changeset.py
versionlabels= {
'versionadded': _('New in version %s'),
'versionchanged': _('Changed in version %s'),
'deprecated': _('Deprecated since version %s'),
}
So, I assume this issue is likely affecting the deprecated directive also.
Versions
Python 3.8.2 (3.8.5 on WSL ubuntu)
rst2pdf 0.98
reportlab 3.5.59
Sphinx 3.0.3 (3.4.3 on WSL ubuntu)
this output is consistent using Windows 10 and WSL ubuntu (with version listed above)
The text was updated successfully, but these errors were encountered:
I'm trying to build docs (with rst2pdf) using sphinx, and I'm getting an error related to the
versionadded
andversionchanged
directives.Description of problem
rST code in question
Entire output
Attempted debugging
When I added some debugging print statements to
visit_versionmodified()
I found that theversionlabels
dict is empty. 😕 I can confirm that the directive and their args are gathered correctly.the print statements output:
and for the
versionchanged
directive:EDIT
This problem might be instigated by a Sphinx change because I found this declaration in Sphinx's
__init__.py
:after some more digging, I found the dict with expected values in
Sphinx.domain.changeset.py
So, I assume this issue is likely affecting the
deprecated
directive also.Versions
this output is consistent using Windows 10 and WSL ubuntu (with version listed above)
The text was updated successfully, but these errors were encountered: