diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-03-29 17:52:32 +0300 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-03-30 08:50:37 +0300 |
commit | 61098a0ae2e696a804459d36bd74ca57db76eda5 (patch) | |
tree | 2d71c39d199fec7366a013e0b48c1b2fb4bc83ee /sphinx/config.py | |
parent | c1a254f2491436ac304f1f169aa488438abe4193 (diff) |
Drop features and APIs deprecated in 1.8
Diffstat (limited to 'sphinx/config.py')
-rw-r--r-- | sphinx/config.py | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/sphinx/config.py b/sphinx/config.py index 5ba2c2a3d..06718eb2b 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -16,7 +16,7 @@ from collections import OrderedDict from os import path, getenv from typing import Any, NamedTuple, Union -from sphinx.deprecation import RemovedInSphinx30Warning, RemovedInSphinx40Warning +from sphinx.deprecation import RemovedInSphinx40Warning from sphinx.errors import ConfigError, ExtensionError from sphinx.locale import _, __ from sphinx.util import logging @@ -155,27 +155,8 @@ class Config: 'env', []), } # type: Dict[str, Tuple] - def __init__(self, *args): - # type: (Any) -> None - if len(args) == 4: - # old style arguments: (dirname, filename, overrides, tags) - warnings.warn('The argument of Config() class has been changed. ' - 'Use Config.read() to read configuration from conf.py.', - RemovedInSphinx30Warning, stacklevel=2) - dirname, filename, overrides, tags = args - if dirname is None: - config = {} # type: Dict[str, Any] - else: - config = eval_config_file(path.join(dirname, filename), tags) - else: - # new style arguments: (config={}, overrides={}) - if len(args) == 0: - config, overrides = {}, {} - elif len(args) == 1: - config, overrides = args[0], {} - else: - config, overrides = args[:2] - + def __init__(self, config={}, overrides={}): + # type: (Dict[str, Any], Dict[str, Any]) -> None self.overrides = overrides self.values = Config.config_values.copy() self._raw_config = config @@ -196,18 +177,6 @@ class Config: namespace = eval_config_file(filename, tags) return cls(namespace, overrides or {}) - def check_types(self): - # type: () -> None - warnings.warn('Config.check_types() is deprecated. Use check_confval_types() instead.', - RemovedInSphinx30Warning, stacklevel=2) - check_confval_types(None, self) - - def check_unicode(self): - # type: () -> None - warnings.warn('Config.check_unicode() is deprecated. Use check_unicode() instead.', - RemovedInSphinx30Warning, stacklevel=2) - check_unicode(self) - def convert_overrides(self, name, value): # type: (str, Any) -> Any if not isinstance(value, str): |