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
With Sphinx 4.3, usage of pyqtSignal will fail with the following error:
File ".../lib/python3.8/site-packages/sphinx/util/docstrings.py", line 75, in prepare_docstring
lines = s.expandtabs(tabsize).splitlines()
AttributeError: 'getset_descriptor' object has no attribute 'expandtabs'
Using exact same codebase, Sphinx 4.2 doesn't have such issue.
Investigating why, I stumbled upon the following:
> .../lib/python3.8/site-packages/sphinx/util/docstrings.py(75)prepare_docstring()
-> lines = s.expandtabs(tabsize).splitlines()
(Pdb) l
70 ignore = 1
71 else:
72 warnings.warn("The 'ignore' argument to prepare_docstring() is deprecated.",
73 RemovedInSphinx50Warning, stacklevel=2)
74
75 -> lines = s.expandtabs(tabsize).splitlines()
76 # Find minimum indentation of any non-blank lines after ignored lines.
77 margin = sys.maxsize
78 for line in lines[ignore:]:
79 content = len(line.lstrip())
80 if content:
(Pdb) interact
*interactive*
>>> s
<attribute '__doc__' of 'PyQt5.QtCore.pyqtSignal' objects>
>>> dir(s)
['__class__', '__delattr__', '__delete__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__get__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__name__', '__ne__', '__new__', '__objclass__', '__qualname__', '__reduce__', '__reduce_ex__', '__repr__', '__set__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__']
>>>
now exiting InteractiveConsole...
(Pdb)
make: *** [Makefile:19: html] Error 2
Removing references to pyqtSignal allows sphinx to successfully compile the documentation.
How to Reproduce
Assuming you can quickstart the sphinxdocs folder yourself, insert the following snippet into a file and run sphinx against it.
Describe the bug
With Sphinx 4.3, usage of pyqtSignal will fail with the following error:
Using exact same codebase, Sphinx 4.2 doesn't have such issue.
Investigating why, I stumbled upon the following:
Removing references to
pyqtSignal
allows sphinx to successfully compile the documentation.How to Reproduce
Assuming you can quickstart the sphinxdocs folder yourself, insert the following snippet into a file and run sphinx against it.
Don't forget to install PyQt5:
Expected behavior
No response
Your project
Please follow reproduction steps.
Screenshots
No response
OS
Linux
Python version
3.8
Sphinx version
4.3.0
Sphinx extensions
No response
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: