-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert "Mark test_build_manpage
as XFAIL following changes in Doc…
#12734
Conversation
…utils master" This reverts commit 1ed4ca7.
I can revert part of that commit if needed (or commit a patch to Docutils to fix the underlying problem, if you have one) A |
@AA-Turner I will ping @picnixz for possibly updating the test_build_latex.py::test_one_parameter_per_line test but first I must open a separate issue because it seems there is a problem with PDF output which I discovered when applying pdflatex to the produced tex file. |
@AA-Turner There is (I believe) a pre-existing problem with |
I have fixed #12735, but the test will need update to pass on DocUtils HEAD. Here is for info the induced changes in output tex file: (green lines are with DocUtils HEAD, red ones with 0.21.2). --- /.../pytest-of-someone/pytest-68/domain-py-python_maximum_signature_line_length/_build/latex/projectnamenotset.tex 2024-08-05 17:26:31.000000000 +0200
+++ /.../pytest-of-someone/pytest-67/domain-py-python_maximum_signature_line_length/_build/latex/projectnamenotset.tex 2024-08-05 17:19:40.000000000 +0200
@@ -90,7 +90,7 @@
\pysigstartsignatures
\pysiglinewithargsret
{\sphinxbfcode{\sphinxupquote{hello}}}
-{\sphinxparam{\DUrole{n}{name}\DUrole{p}{:}\DUrole{w}{ }\DUrole{n}{str}}}
+{\sphinxparam{\DUrole{n,n}{name}\DUrole{p,p}{:}\DUrole{w,w}{ }\DUrole{n,n}{str}}}
{{ $\rightarrow$ str}}
\pysigstopsignatures
\end{fulllineitems}
@@ -102,7 +102,7 @@
\pysigstartsignatures
\pysigwithonelineperarg
{\sphinxbfcode{\sphinxupquote{foo}}}
-{\sphinxoptional{\sphinxparam{\DUrole{n}{a}}\sphinxparamcomma \sphinxoptional{\sphinxparam{\DUrole{n}{b}}\sphinxparamcomma }}\sphinxparam{\DUrole{n}{c}}\sphinxparamcomma \sphinxparam{\DUrole{n}{d}}\sphinxoptional{\sphinxparamcomma \sphinxparam{\DUrole{n}{e}}\sphinxparamcomma \sphinxparam{\DUrole{n}{f}}\sphinxparamcomma }}
+{\sphinxoptional{\sphinxparam{\DUrole{n,n}{a}}\sphinxparamcomma \sphinxoptional{\sphinxparam{\DUrole{n,n}{b}}\sphinxparamcomma }}\sphinxparam{\DUrole{n,n}{c}}\sphinxparamcomma \sphinxparam{\DUrole{n,n}{d}}\sphinxoptional{\sphinxparamcomma \sphinxparam{\DUrole{n,n}{e}}\sphinxparamcomma \sphinxparam{\DUrole{n,n}{f}}\sphinxparamcomma }}
{}
\pysigstopsignatures
\end{fulllineitems}
@@ -114,7 +114,7 @@
\pysigstartsignatures
\pysiglinewithargsretwithtypelist
{\sphinxbfcode{\sphinxupquote{generic\_arg}}}
-{\sphinxtypeparam{\DUrole{n}{T}}}
+{\sphinxtypeparam{\DUrole{n,n}{T}}}
{}
{}
\pysigstopsignatures
@@ -127,7 +127,7 @@
\pysigstartsignatures
\pysiglinewithargsretwithtypelist
{\sphinxbfcode{\sphinxupquote{generic\_foo}}}
-{\sphinxtypeparam{\DUrole{n}{T}}}
+{\sphinxtypeparam{\DUrole{n,n}{T}}}
{}
{}
\pysigstopsignatures
@@ -140,8 +140,8 @@
\pysigstartsignatures
\pysigwithonelineperargwithtypelist
{\sphinxbfcode{\sphinxupquote{generic\_bar}}}
-{\sphinxtypeparam{\DUrole{n}{T}}}
-{\sphinxparam{\DUrole{n}{x}\DUrole{p}{:}\DUrole{w}{ }\DUrole{n}{list\DUrole{p}{{[}}T\DUrole{p}{{]}}}}\sphinxparamcomma }
+{\sphinxtypeparam{\DUrole{n,n}{T}}}
+{\sphinxparam{\DUrole{n,n}{x}\DUrole{p,p}{:}\DUrole{w,w}{ }\DUrole{n,n}{list\DUrole{p,p}{{[}}T\DUrole{p,p}{{]}}}}\sphinxparamcomma }
{}
\pysigstopsignatures
\end{fulllineitems}
@@ -153,7 +153,7 @@
\pysigstartsignatures
\pysiglinewithargsretwithtypelist
{\sphinxbfcode{\sphinxupquote{generic\_ret}}}
-{\sphinxtypeparam{\DUrole{n}{R}}}
+{\sphinxtypeparam{\DUrole{n,n}{R}}}
{}
{{ $\rightarrow$ R}}
\pysigstopsignatures
@@ -165,8 +165,8 @@
\phantomsection\label{\detokenize{index:MyGenericClass}}
\pysigstartsignatures
\pysiglinewithargsretwithtypelist
-{\sphinxbfcode{\sphinxupquote{class\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{MyGenericClass}}}
-{\sphinxtypeparam{\DUrole{n}{X}}}
+{\sphinxbfcode{\sphinxupquote{class\DUrole{w,w}{ }}}\sphinxbfcode{\sphinxupquote{MyGenericClass}}}
+{\sphinxtypeparam{\DUrole{n,n}{X}}}
{}
{}
\pysigstopsignatures
@@ -178,8 +178,8 @@
\phantomsection\label{\detokenize{index:MyList}}
\pysigstartsignatures
\pysiglinewithargsretwithtypelist
-{\sphinxbfcode{\sphinxupquote{class\DUrole{w}{ }}}\sphinxbfcode{\sphinxupquote{MyList}}}
-{\sphinxtypeparam{\DUrole{n}{T}}}
+{\sphinxbfcode{\sphinxupquote{class\DUrole{w,w}{ }}}\sphinxbfcode{\sphinxupquote{MyList}}}
+{\sphinxtypeparam{\DUrole{n,n}{T}}}
{\sphinxparam{list{[}T{]}}}
{}
\pysigstopsignatures Thus, the sole changes are duplications of arg of Actually With But if they existe then the Perhaps there is also duplication in HTML output which I have not checked yet but is probable. On LaTeX side, we could consider removing entirely any But clearly the duplication is then a problem. The reST source for this is test/test_builders/text_build_latex.py::test_one_parameter_per_line, i.e. it uses .. py:function:: hello(name: str) -> str
.. py:function:: foo([a, [b, ]]c, d[, e, f])
.. py:function:: generic_arg[T]
.. py:function:: generic_foo[T]()
.. py:function:: generic_bar[T](x: list[T])
.. py:function:: generic_ret[R]() -> R
.. py:class:: MyGenericClass[X]
.. py:class:: MyList[T](list[T]) with confoverrides={'python_maximum_signature_line_length': 23} |
sphinx/sphinx/writers/latex.py Lines 2175 to 2177 in 05cc39d
It is very analogous to old-style styling via |
Pseudoxml shows the duplication of classes: <desc classes="py class" desctype="class" domain="py" no-contents-entry="0" no-index="0" no-index-entry="0" no-typesetting="0" nocontentsentry="0" noindex="0" noindexentry="0" objtype="class">
<desc_signature _toc_name="MyGenericClass" _toc_parts="MyGenericClass" class="" classes="sig sig-object py" fullname="MyGenericClass" ids="MyGenericClass" module="True">
<desc_annotation xml:space="preserve">
class
<desc_sig_space classes="w w">
<desc_name classes="sig-name descname" xml:space="preserve">
MyGenericClass
<desc_type_parameter_list multi_line_parameter_list="1" xml:space="preserve">
<desc_type_parameter xml:space="preserve">
<desc_sig_name classes="n n">
T but it is somehow resolved by HTML writer. |
@AA-Turner I have understood partly the problem. In docutils.nodes the When (for example) Naive changes to current DocUtils nodes.py to make it more like the one at 0.21.2 such as replacing the EDIT: my attempt at restoring |
cc @picnixz as author of A |
@jfbu I reverted the change in Docutils: https://sourceforge.net/p/docutils/code/9859/ Does this help things? A |
@AA-Turner Yes it does fix the problem of duplicated classes. I initially applied your patch only partially forgetting the |
…utils master"
This reverts commit 1ed4ca7.
We have currently 3 test failures on DocUtils HEAD (currently at r9852).
Two of them come from a XFAIL because DocUtils master version is currently at 0.22b.dev. The tests failed at some earlier stage of DocUtils master after their 0.21.2 but now currently they do not.
The third failure is tests/test_builders/test_build_latex.py::test_one_parameter_per_line and comes from typing annotations added at Docutils revision r9813.
I am not addressing this here, also because I found what appears to be a bug in PDF output, which is unrelated to that recent failure but displayed by the test.