summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES3
-rw-r--r--sphinx/builders/__init__.py3
-rw-r--r--tests/test_application.py4
3 files changed, 6 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 28e99a44d..6a4aa6eeb 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@ Dependencies
Incompatible changes
--------------------
+* Ignore filenames without file extension given to ``Builder.build_specific()``
+ API directly
+
Deprecated
----------
diff --git a/sphinx/builders/__init__.py b/sphinx/builders/__init__.py
index 335880ef0..5cd5312fa 100644
--- a/sphinx/builders/__init__.py
+++ b/sphinx/builders/__init__.py
@@ -298,8 +298,7 @@ class Builder:
logger.warning(__('file %r given on command line is not under the '
'source directory, ignoring'), filename)
continue
- if not (path.isfile(filename) or
- any(path.isfile(filename + suffix) for suffix in suffixes)):
+ if not path.isfile(filename):
logger.warning(__('file %r given on command line does not exist, '
'ignoring'), filename)
continue
diff --git a/tests/test_application.py b/tests/test_application.py
index 1a4d41289..08c13c5cf 100644
--- a/tests/test_application.py
+++ b/tests/test_application.py
@@ -131,7 +131,7 @@ def test_build_specific(app):
app.srcdir / 'subdir/../subdir/excluded.txt'] # not normalized
app.build(False, filenames)
- expected = ['index', 'images', 'img.png', 'subdir/includes', 'subdir/excluded']
+ expected = ['index', 'img.png', 'subdir/includes', 'subdir/excluded']
app.builder.build.assert_called_with(expected,
method='specific',
- summary='5 source files given on command line')
+ summary='4 source files given on command line')