Skip to content

Commit

Permalink
Revert "Fix detection for out of date files (sphinx-doc#9360)"
Browse files Browse the repository at this point in the history
This reverts commit b1390c4.

The change is reverted because some Builders don't have
a more fine-grained support for outdated docs:
sphinx-doc#10903 (comment)
  • Loading branch information
marxin committed Oct 10, 2022
1 parent c51a88d commit b48fca0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions CHANGES
Expand Up @@ -17,8 +17,6 @@ Features added
``:option:`--module[=foobar]``` or ``:option:`--module foobar```.
Patch by Martin Liska.
* #10881: autosectionlabel: Record the generated section label to the debug log.
* #9360: Fix caching for now-outdated files for some builders (e.g. manpage)
when there is no change in source files. Patch by Martin Liska.

Bugs fixed
----------
Expand Down
2 changes: 1 addition & 1 deletion sphinx/builders/__init__.py
Expand Up @@ -347,7 +347,7 @@ def build(
with progress_message(__('checking consistency')):
self.env.check_consistency()
else:
if method == 'update' and (not docnames or docnames == ['__all__']):
if method == 'update' and not docnames:
logger.info(bold(__('no targets are out of date.')))
return

Expand Down
2 changes: 2 additions & 0 deletions tests/test_build_html.py
Expand Up @@ -633,6 +633,7 @@ def test_tocdepth(app, cached_etree_parse, fname, expect):
],
}))
@pytest.mark.sphinx('singlehtml', testroot='tocdepth')
@pytest.mark.test_params(shared_result='test_build_html_tocdepth')
def test_tocdepth_singlehtml(app, cached_etree_parse, fname, expect):
app.build()
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
Expand Down Expand Up @@ -1137,6 +1138,7 @@ def test_numfig_with_secnum_depth(app, cached_etree_parse, fname, expect):
],
}))
@pytest.mark.sphinx('singlehtml', testroot='numfig', confoverrides={'numfig': True})
@pytest.mark.test_params(shared_result='test_build_html_numfig_on')
def test_numfig_with_singlehtml(app, cached_etree_parse, fname, expect):
app.build()
check_xpath(cached_etree_parse(app.outdir / fname), fname, *expect)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build_latex.py
Expand Up @@ -1604,7 +1604,7 @@ def test_latex_container(app, status, warning):

@pytest.mark.sphinx('latex', testroot='reST-code-role')
def test_latex_code_role(app):
app.build(force_all=True)
app.build()
content = (app.outdir / 'python.tex').read_text()

common_content = (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_build_manpage.py
Expand Up @@ -42,7 +42,7 @@ def test_man_pages_empty_description(app, status, warning):
@pytest.mark.sphinx('man', testroot='basic',
confoverrides={'man_make_section_directory': True})
def test_man_make_section_directory(app, status, warning):
app.build(force_all=True)
app.build()
assert (app.outdir / 'man1' / 'python.1').exists()


Expand Down
2 changes: 1 addition & 1 deletion tests/test_build_texinfo.py
Expand Up @@ -60,7 +60,7 @@ def test_texinfo(app, status, warning):

@pytest.mark.sphinx('texinfo', testroot='markup-rubric')
def test_texinfo_rubric(app, status, warning):
app.build(force_all=True)
app.build()

output = (app.outdir / 'python.texi').read_text(encoding='utf8')
assert '@heading This is a rubric' in output
Expand Down

0 comments on commit b48fca0

Please sign in to comment.