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
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
because I'm calling build with --no-isolation I'm using during all processes only locally installed modules
install .whl file in </install/prefix>
run pytest with PYTHONPATH pointing to sitearch and sitelib inside </install/prefix>
Kooks like sphinx-highlights needs to be updated for latest sphinx 5.x and docutils >= 0.18.x
Here is pytest output:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-highlights-0.5.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-sphinx-highlights-0.5.1-2.fc35.x86_64/usr/lib/python3.8/site-packages+ /usr/bin/pytest -ra=========================================================================== test session starts ============================================================================platform linux -- Python 3.8.14, pytest-7.1.3, pluggy-1.0.0Test session started at 12:59:56rootdir: /home/tkloczko/rpmbuild/BUILD/sphinx-highlights-0.5.1, configfile: tox.iniplugins: anyio-3.6.1, cov-3.0.0, socket-0.5.1, tornasync-0.6.0.post2, flake8-1.1.1, datadir-1.3.1, regressions-2.4.1, timeout-2.1.0timeout: 300.0stimeout method: signaltimeout func_only: Falsecollected 4 itemstests/test_copy_assets.py . [ 25%]tests/test_output/test_output.py FEF [100%]================================================================================== ERRORS ==================================================================================______________________________________________________________ ERROR at setup of test_html_output[index.html] ______________________________________________________________app = <SphinxTestApp buildername='html'>, request = <SubRequest 'page' for <Function test_html_output[index.html]>>monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f48e3f54340> @pytest.fixture() def page(app, request, monkeypatch) -> BeautifulSoup: random.seed("5678")
> app.build(force_all=True)tests/test_output/conftest.py:113:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib/python3.8/site-packages/sphinx/application.py:344: in build self.builder.build_all()/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:266: in build_all self.build(None, summary=__('all source files'), method='all')/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:318: in build updated_docnames = set(self.read())/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:425: in read self._read_serial(docnames)/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:446: in _read_serial self.read_doc(docname)/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:502: in read_doc publisher.publish()/usr/lib/python3.8/site-packages/docutils/core.py:217: in publish self.document = self.reader.read(self.source, self.parser,/usr/lib/python3.8/site-packages/sphinx/io.py:104: in read self.parse()/usr/lib/python3.8/site-packages/docutils/readers/__init__.py:78: in parse self.parser.parse(self.input, document)/usr/lib/python3.8/site-packages/sphinx/parsers.py:78: in parse self.statemachine.run(inputlines, document, inliner=self.inliner)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:170: in run results = StateMachineWS.run(self, input_lines, input_offset,/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:3018: in text self.section(title.lstrip(), source, style, lineno + 1, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:327: in section self.new_subsection(title, lineno, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:393: in new_subsection newabsoffset = self.nested_parse(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:281: in nested_parse state_machine.run(block, input_offset, memo=self.memo,/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:196: in run results = StateMachineWS.run(self, input_lines, input_offset)/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2779: in underline self.section(title, source, style, lineno - 1, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:327: in section self.new_subsection(title, lineno, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:393: in new_subsection newabsoffset = self.nested_parse(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:281: in nested_parse state_machine.run(block, input_offset, memo=self.memo,/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:196: in run results = StateMachineWS.run(self, input_lines, input_offset)/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2352: in explicit_markup nodelist, blank_finish = self.explicit_construct(match)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2364: in explicit_construct return method(self, expmatch)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2101: in directive return self.run_directive(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2151: in run_directive result = directive_instance.run()sphinx_highlights/__init__.py:317: in run return self.run_html()sphinx_highlights/__init__.py:264: in run_html self.state.nested_parse(view, self.content_offset, body_node) # type: ignore/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:281: in nested_parse state_machine.run(block, input_offset, memo=self.memo,/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:196: in run results = StateMachineWS.run(self, input_lines, input_offset)/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2352: in explicit_markup nodelist, blank_finish = self.explicit_construct(match)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2364: in explicit_construct return method(self, expmatch)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2101: in directive return self.run_directive(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2151: in run_directive result = directive_instance.run()/usr/lib/python3.8/site-packages/sphinx_panels/panels.py:235: in run add_child_classes(header)/usr/lib/python3.8/site-packages/sphinx_panels/panels.py:142: in add_child_classes for para in node.traverse(nodes.paragraph):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <container: <paragraph...>>, condition = <class 'docutils.nodes.paragraph'>, include_self = True, descend = True, siblings = False, ascend = False def traverse(self, condition=None, include_self=True, descend=True, siblings=False, ascend=False): """Return list of nodes following `self`. For looping, Node.findall() is faster and more memory efficient. """ # traverse() may be eventually removed:
> warnings.warn('nodes.Node.traverse() is obsoleted by Node.findall().', PendingDeprecationWarning, stacklevel=2)E PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall()./usr/lib/python3.8/site-packages/docutils/nodes.py:240: PendingDeprecationWarning================================================================================= FAILURES =================================================================================____________________________________________________________________________ test_build_example ____________________________________________________________________________app = <SphinxTestApp buildername='html'> def test_build_example(app):
> app.build()tests/test_output/test_output.py:15:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _/usr/lib/python3.8/site-packages/sphinx/application.py:350: in build self.builder.build_update()/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:302: in build_update self.build(to_build,/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:318: in build updated_docnames = set(self.read())/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:425: in read self._read_serial(docnames)/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:446: in _read_serial self.read_doc(docname)/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py:502: in read_doc publisher.publish()/usr/lib/python3.8/site-packages/docutils/core.py:217: in publish self.document = self.reader.read(self.source, self.parser,/usr/lib/python3.8/site-packages/sphinx/io.py:104: in read self.parse()/usr/lib/python3.8/site-packages/docutils/readers/__init__.py:78: in parse self.parser.parse(self.input, document)/usr/lib/python3.8/site-packages/sphinx/parsers.py:78: in parse self.statemachine.run(inputlines, document, inliner=self.inliner)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:170: in run results = StateMachineWS.run(self, input_lines, input_offset,/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:3018: in text self.section(title.lstrip(), source, style, lineno + 1, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:327: in section self.new_subsection(title, lineno, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:393: in new_subsection newabsoffset = self.nested_parse(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:281: in nested_parse state_machine.run(block, input_offset, memo=self.memo,/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:196: in run results = StateMachineWS.run(self, input_lines, input_offset)/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2779: in underline self.section(title, source, style, lineno - 1, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:327: in section self.new_subsection(title, lineno, messages)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:393: in new_subsection newabsoffset = self.nested_parse(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:281: in nested_parse state_machine.run(block, input_offset, memo=self.memo,/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:196: in run results = StateMachineWS.run(self, input_lines, input_offset)/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2352: in explicit_markup nodelist, blank_finish = self.explicit_construct(match)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2364: in explicit_construct return method(self, expmatch)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2101: in directive return self.run_directive(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2151: in run_directive result = directive_instance.run()sphinx_highlights/__init__.py:317: in run return self.run_html()sphinx_highlights/__init__.py:264: in run_html self.state.nested_parse(view, self.content_offset, body_node) # type: ignore/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:281: in nested_parse state_machine.run(block, input_offset, memo=self.memo,/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:196: in run results = StateMachineWS.run(self, input_lines, input_offset)/usr/lib/python3.8/site-packages/docutils/statemachine.py:240: in run context, next_state, result = self.check_line(/usr/lib/python3.8/site-packages/docutils/statemachine.py:452: in check_line return method(match, context, next_state)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2352: in explicit_markup nodelist, blank_finish = self.explicit_construct(match)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2364: in explicit_construct return method(self, expmatch)/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2101: in directive return self.run_directive(/usr/lib/python3.8/site-packages/docutils/parsers/rst/states.py:2151: in run_directive result = directive_instance.run()/usr/lib/python3.8/site-packages/sphinx_panels/panels.py:235: in run add_child_classes(header)/usr/lib/python3.8/site-packages/sphinx_panels/panels.py:142: in add_child_classes for para in node.traverse(nodes.paragraph):_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <container: <paragraph...>>, condition = <class 'docutils.nodes.paragraph'>, include_self = True, descend = True, siblings = False, ascend = False def traverse(self, condition=None, include_self=True, descend=True, siblings=False, ascend=False): """Return list of nodes following `self`. For looping, Node.findall() is faster and more memory efficient. """ # traverse() may be eventually removed:
> warnings.warn('nodes.Node.traverse() is obsoleted by Node.findall().', PendingDeprecationWarning, stacklevel=2)E PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall()./usr/lib/python3.8/site-packages/docutils/nodes.py:240: PendingDeprecationWarning------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: html
# srcdir: /tmp/pytest-of-tkloczko/pytest-1/root
# outdir: /tmp/pytest-of-tkloczko/pytest-1/root/_build/html
# status:Running Sphinx v5.2.3building [mo]: targets for 0 po files that are out of datebuilding [html]: targets for 1 source files that are out of dateupdating environment: [new config] 1 added, 0 changed, 0 removedreading sources... [100%] index
# warning:____________________________________________________________________________ test_latex_output _____________________________________________________________________________app = <SphinxTestApp buildername='latex'>, advanced_file_regression = <coincidence.regressions.AdvancedFileRegressionFixture object at 0x7f48e2d092b0> @pytest.mark.sphinx("latex", srcdir="test-root") def test_latex_output(app, advanced_file_regression: AdvancedFileRegressionFixture): random.seed("5678") assert app.builder.name.lower() == "latex" app.build() output_file = PathPlus(app.outdir / "sphinx-highlights-demo.tex") content = str(StringList(output_file.read_lines())).replace("\\sphinxAtStartPar\n", '')
> advanced_file_regression.check( re.sub(r"\\date{.*}", r"\\date{Mar 11, 2021}", content), extension=".tex", )E AssertionError: FILES DIFFER:E /tmp/pytest-of-tkloczko/pytest-1/test_latex_output0/test_output_/test_latex_output.texE /tmp/pytest-of-tkloczko/pytest-1/test_latex_output0/test_output_/test_latex_output.obtained.texE HTML DIFF: /tmp/pytest-of-tkloczko/pytest-1/test_latex_output0/test_output_/test_latex_output.obtained.diff.htmlE ---E +++E @@ -4,6 +4,11 @@E \ifdefined\pdfpxdimenE \let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimenE \fi \sphinxpxdimen=.75bp\relaxE +\ifdefined\pdfimageresolutionE + \pdfimageresolution= \numexpr \dimexpr1in\relax/\sphinxpxdimen\relaxE +\fiE +%% let collapsible pdf bookmarks panel have high depth per defaultE +\PassOptionsToPackage{bookmarksdepth=5}{hyperref}EE \PassOptionsToPackage{warn}{textcomp}E \usepackage[utf8]{inputenc}E @@ -28,34 +33,16 @@EEEE -\usepackage{times}E -\expandafter\ifx\csname T@LGR\endcsname\relaxE -\elseE -% LGR was declared as font encodingE - \substitutefont{LGR}{\rmdefault}{cmr}E - \substitutefont{LGR}{\sfdefault}{cmss}E - \substitutefont{LGR}{\ttdefault}{cmtt}E -\fiE -\expandafter\ifx\csname T@X2\endcsname\relaxE - \expandafter\ifx\csname T@T2A\endcsname\relaxE - \elseE - % T2A was declared as font encodingE - \substitutefont{T2A}{\rmdefault}{cmr}E - \substitutefont{T2A}{\sfdefault}{cmss}E - \substitutefont{T2A}{\ttdefault}{cmtt}E - \fiE -\elseE -% X2 was declared as font encodingE - \substitutefont{X2}{\rmdefault}{cmr}E - \substitutefont{X2}{\sfdefault}{cmss}E - \substitutefont{X2}{\ttdefault}{cmtt}E -\fiE +\usepackage{tgtermes}E +\usepackage{tgheros}E +\renewcommand{\ttdefault}{txtt}E +EEE \usepackage[Bjarne]{fncychap}E \usepackage{sphinx}EE -\fvset{fontsize=\small}E +\fvset{fontsize=auto}E \usepackage{geometry}EEE @@ -80,6 +67,11 @@E \renewcommand{\releasename}{}E \makeindexE \begin{document}E +E +\ifdefined\shorthandoffE + \ifnum\catcode`\=\string=\active\shorthandoff{=}\fiE + \ifnum\catcode`\"=\active\shorthandoff{"}\fiE +\fiEE \pagestyle{empty}E \sphinxmaketitletests/test_output/test_output.py:34: AssertionError------------------------------------------------------------------------- Captured stdout teardown -------------------------------------------------------------------------
# testroot: root
# builder: latex
# srcdir: /tmp/pytest-of-tkloczko/pytest-1/test-root
# outdir: /tmp/pytest-of-tkloczko/pytest-1/test-root/_build/latex
# status:Running Sphinx v5.2.3building [mo]: targets for 0 po files that are out of datebuilding [latex]: all documentsupdating environment: [new config] 1 added, 0 changed, 0 removedreading sources... [100%] indexlooking for now-outdated files... none foundpickling environment... donechecking consistency... doneprocessing sphinx-highlights-demo.tex... indexresolving references...donewriting... donecopying TeX support files... copying TeX support files...donebuild succeeded.The LaTeX files are in ../../../../../tmp/pytest-of-tkloczko/pytest-1/test-root/_build/latex.Run 'make' in that directory to run these through (pdf)latex(use `make latexpdf' here to do that automatically).
# warning:=========================================================================== slowest 25 durations ===========================================================================0.49s setup tests/test_output/test_output.py::test_build_example0.07s call tests/test_output/test_output.py::test_latex_output0.03s call tests/test_output/test_output.py::test_build_example0.03s setup tests/test_output/test_output.py::test_html_output[index.html]0.03s setup tests/test_output/test_output.py::test_latex_output(6 durations < 0.005s hidden. Use -vv to show these durations.)========================================================================= short test summary info ==========================================================================ERROR tests/test_output/test_output.py::test_html_output[index.html] - PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().FAILED tests/test_output/test_output.py::test_build_example - PendingDeprecationWarning: nodes.Node.traverse() is obsoleted by Node.findall().FAILED tests/test_output/test_output.py::test_latex_output - AssertionError: FILES DIFFER:=================================================================== 2 failed, 1 passed, 1 error in 2.78s ===================================================================
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesKooks like
sphinx-highlights
needs to be updated for latestsphinx
5.x anddocutils
>= 0.18.xHere is pytest output:
Here is list of installed modules in build env
The text was updated successfully, but these errors were encountered: