Created attachment 1554221 [details] Full log from Copr ====================================================================== ERROR: test_bibfile_out_of_date.test_bibfile_out_of_date ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/lib/python3.8/site-packages/sphinx_testing/util.py", line 166, in decorator return func(*(args + (app, status, warning)), **kwargs) File "/builddir/build/BUILD/sphinxcontrib-bibtex-0.4.2/test/test_bibfile_out_of_date.py", line 27, in test_bibfile_out_of_date app.builder.build_all() File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 284, in build_all self.build(None, summary=__('all source files'), method='all') File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 339, in build updated_docnames = set(self.read()) File "/usr/lib64/python3.8/contextlib.py", line 120, in __exit__ next(self.gen) File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 230, in pending_warnings memhandler.flushTo(logger) File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 193, in flushTo logger.handle(record) File "/usr/lib64/python3.8/logging/__init__.py", line 1598, in handle self.callHandlers(record) File "/usr/lib64/python3.8/logging/__init__.py", line 1660, in callHandlers hdlr.handle(record) File "/usr/lib64/python3.8/logging/__init__.py", line 959, in handle rv = self.filter(record) File "/usr/lib64/python3.8/logging/__init__.py", line 820, in filter result = f.filter(record) File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 428, in filter raise SphinxWarning(message) sphinx.errors.SphinxWarning: Since v2.0, Sphinx uses "index" as master_doc by default. Please add "master_doc = 'contents'" to your conf.py. ====================================================================== FAIL: test_issue14.test_duplicate_label ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/lib/python3.8/site-packages/sphinx_testing/util.py", line 166, in decorator return func(*(args + (app, status, warning)), **kwargs) File "/builddir/build/BUILD/sphinxcontrib-bibtex-0.4.2/test/test_issue14.py", line 23, in test_duplicate_label assert re.search( AssertionError Complete results: FAILED (errors=19, failures=1) Log attached. This blocks the bootstrap toward python-notebook.
https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/163
This is not only reproducible with python 3.8 but also with older Pythons. However it blocks the bootstrap of Python 3.8.
Right, it appears to be an issue with Sphinx 2, not with python 3.8. The advice to change the master_doc setting to 'contents' is wrong; there is no file named doc/contents.rst. The warning comes from this code in sphinx's config.py, lines 510 to 522: def check_master_doc(app, env, added, changed, removed): # type: (Sphinx, BuildEnvironment, Set[str], Set[str], Set[str]) -> Set[str] """Adjust master_doc to 'contents' to support an old project which does not have no master_doc setting. """ if (app.config.master_doc == 'index' and 'index' not in app.project.docnames and 'contents' in app.project.docnames): logger.warning(__('Since v2.0, Sphinx uses "index" as master_doc by default. ' 'Please add "master_doc = \'contents\'" to your conf.py.')) app.config.master_doc = "contents" # type: ignore return changed "Does not have no"? Double negatives are so hard to understand. Do they mean "does not have any"? But that's wrong. The project does have a master_doc setting. Furthermore, there *is* a file named doc/index.rst, and there *is not* a file named doc/contents.rst, so how did we end up with 'index' not in app.project.docnames, and with 'contents' in app.project.docnames? That suggests that app.project.docnames got set by traversing the test directory, which is where the files named contents.rst are, but we're working with doc/conf.py in the code where the warning is thrown. Are we sure this isn't a sphinx 2 bug? It sure looks like one.
> Are we sure this isn't a sphinx 2 bug? We are totally not sure. Thanks for looking into it.
> The project does have a master_doc setting. Note that those are test failures, not doc build failures. Does your investigation apply to the tests?
https://src.fedoraproject.org/rpms/python-sphinxcontrib-bibtex/pull-request/2
Note that that fixes the immediate problem, but there are indeed Python 3.8 incompatibilities: ERROR: test_issue62.test_local_bibliographies ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/nose/case.py", line 197, in runTest self.test(*self.arg) File "/usr/lib/python3.8/site-packages/sphinx_testing/util.py", line 171, in decorator return func(*(args + (app, status, warning)), **kwargs) File "/builddir/build/BUILD/sphinxcontrib-bibtex-e8fb75a5491c1e560fea1f18d58041ea177103c0/test/test_issue62.py", line 75, in test_local_bibliographies app.builder.build_all() File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 284, in build_all self.build(None, summary=__('all source files'), method='all') File "/usr/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 339, in build updated_docnames = set(self.read()) File "/usr/lib64/python3.8/contextlib.py", line 120, in __exit__ next(self.gen) File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 230, in pending_warnings memhandler.flushTo(logger) File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 193, in flushTo logger.handle(record) File "/usr/lib64/python3.8/logging/__init__.py", line 1598, in handle self.callHandlers(record) File "/usr/lib64/python3.8/logging/__init__.py", line 1660, in callHandlers hdlr.handle(record) File "/usr/lib64/python3.8/logging/__init__.py", line 959, in handle rv = self.filter(record) File "/usr/lib64/python3.8/logging/__init__.py", line 820, in filter result = f.filter(record) File "/usr/lib/python3.8/site-packages/sphinx/util/logging.py", line 428, in filter raise SphinxWarning(message) sphinx.errors.SphinxWarning: syntax error in :filter: expression; invalid node <_ast.Constant object at 0x7f30d74c32e0> in filter expression
Fix at https://github.com/mcmtroffaes/sphinxcontrib-bibtex/pull/168