diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-02 13:50:20 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-09-03 00:31:33 +0900 |
commit | a7cab001d9ccb1d93b28f8dc03271f2b28586830 (patch) | |
tree | b4875b979fb49ede7f82a6bdcb020f47528addce /sphinx/theming.py | |
parent | bc02abcb77143d12c08265c4c10ba9c6cd003832 (diff) | |
download | sphinx-git-a7cab001d9ccb1d93b28f8dc03271f2b28586830.tar.gz |
Drop APIs deprecated in 2.0
Diffstat (limited to 'sphinx/theming.py')
-rw-r--r-- | sphinx/theming.py | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/sphinx/theming.py b/sphinx/theming.py index 944c446c3..938f2ede2 100644 --- a/sphinx/theming.py +++ b/sphinx/theming.py @@ -12,16 +12,14 @@ import os import shutil import tempfile -import warnings from os import path from zipfile import ZipFile import pkg_resources -from six import string_types, iteritems +from six import iteritems from six.moves import configparser from sphinx import package_dir -from sphinx.deprecation import RemovedInSphinx20Warning from sphinx.errors import ThemeError from sphinx.locale import __ from sphinx.util import logging @@ -229,25 +227,6 @@ class HTMLThemeFactory(object): except StopIteration: pass - # look up for old styled entry_points - for entry_point in pkg_resources.iter_entry_points('sphinx_themes'): - target = entry_point.load() - if callable(target): - themedir = target() - if not isinstance(themedir, string_types): - logger.warning(__('Theme extension %r does not respond correctly.') % - entry_point.module_name) - else: - themedir = target - - themes = self.find_themes(themedir) - for entry, theme in iteritems(themes): - if name == entry: - warnings.warn('``sphinx_themes`` entry point is now deprecated. ' - 'Please use ``sphinx.html_themes`` instead.', - RemovedInSphinx20Warning) - self.themes[name] = theme - def find_themes(self, theme_path): # type: (unicode) -> Dict[unicode, unicode] """Search themes from specified directory.""" |