Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1698477
Summary: | python-sphinxcontrib-bibtex-0.4.2-2.fc31 FTBFS with Sphinx 2 and Python 3.8 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Miro Hrončok <mhroncok> | ||||
Component: | python-sphinxcontrib-bibtex | Assignee: | Jerry James <loganjerry> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | loganjerry | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2019-07-09 14:55:48 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1685211, 1686977 | ||||||
Attachments: |
|
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?
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 |
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.