Merge branch 'master' into refactor_config

This commit is contained in:
Takeshi KOMIYA 2018-04-29 19:00:04 +09:00 committed by GitHub
commit 4118e8b35b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 4 deletions

View File

@ -1194,8 +1194,10 @@ that use Sphinx's HTMLWriter class.
Janome binding. To use this splitter, Janome binding. To use this splitter,
`Janome <https://pypi.org/project/Janome/>`_ is required. `Janome <https://pypi.org/project/Janome/>`_ is required.
To keep compatibility, ``'mecab'``, ``'janome'`` and ``'default'`` are also .. deprecated:: 1.6
acceptable. However it will be deprecated in Sphinx-1.6. ``'mecab'``, ``'janome'`` and ``'default'`` is deprecated.
To keep compatibility, ``'mecab'``, ``'janome'`` and ``'default'`` are
also acceptable.
Other option values depend on splitter value which you choose. Other option values depend on splitter value which you choose.

View File

@ -142,6 +142,11 @@ The following is a list of deprecated interface.
- 3.0 - 3.0
- ``Config.read()`` - ``Config.read()``
* - The value of :confval:`html_search_options`
- 1.8
- 3.0
- see :confval:`html_search_options`
* - ``sphinx.versioning.prepare()`` * - ``sphinx.versioning.prepare()``
- 1.8 - 1.8
- 3.0 - 3.0

View File

@ -20,6 +20,7 @@
import os import os
import re import re
import sys import sys
import warnings
from six import iteritems, PY3 from six import iteritems, PY3
@ -35,6 +36,7 @@ try:
except ImportError: except ImportError:
janome_module = False janome_module = False
from sphinx.deprecation import RemovedInSphinx30Warning
from sphinx.errors import SphinxError, ExtensionError from sphinx.errors import SphinxError, ExtensionError
from sphinx.search import SearchLanguage from sphinx.search import SearchLanguage
from sphinx.util import import_object from sphinx.util import import_object
@ -556,9 +558,12 @@ class SearchJapanese(SearchLanguage):
def init(self, options): def init(self, options):
# type: (Dict) -> None # type: (Dict) -> None
type = options.get('type', 'default') type = options.get('type', 'sphinx.search.ja.DefaultSplitter')
if type in self.splitters: if type in self.splitters:
dotted_path = self.splitters[type] dotted_path = self.splitters[type]
warnings.warn('html_search_options["type"]: %s is deprecated. '
'Please give "%s" instead.' % (type, dotted_path),
RemovedInSphinx30Warning)
else: else:
dotted_path = type dotted_path = type
try: try:

View File

@ -74,7 +74,7 @@ language = {{ language | repr }}
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path . # This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [{{ exclude_patterns }}] exclude_patterns = [{{ exclude_patterns }}]
# The name of the Pygments (syntax highlighting) style to use. # The name of the Pygments (syntax highlighting) style to use.