diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-14 02:02:29 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-12-14 02:02:29 +0900 |
commit | 2c98e909bf1a6de5f689aeca908e8ccc73f181ac (patch) | |
tree | 43752eff923aac12cd786424c1f5bb7725080143 /sphinx/setup_command.py | |
parent | 0b074c9e48dbc00137c2e94769bbe6e4685199c6 (diff) | |
parent | 5b28d77b376cad5d93942743ea1d18098b459948 (diff) | |
download | sphinx-git-2c98e909bf1a6de5f689aeca908e8ccc73f181ac.tar.gz |
Merge branch '3.x'
Diffstat (limited to 'sphinx/setup_command.py')
-rw-r--r-- | sphinx/setup_command.py | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/sphinx/setup_command.py b/sphinx/setup_command.py index 58f6c8256..9c83bbcc8 100644 --- a/sphinx/setup_command.py +++ b/sphinx/setup_command.py @@ -14,7 +14,7 @@ import os import sys from distutils.cmd import Command -from distutils.errors import DistutilsExecError, DistutilsOptionError +from distutils.errors import DistutilsExecError from io import StringIO from typing import TYPE_CHECKING @@ -121,20 +121,6 @@ class BuildDoc(Command): return root return os.curdir - # Overriding distutils' Command._ensure_stringlike which doesn't support - # unicode, causing finalize_options to fail if invoked again. Workaround - # for https://bugs.python.org/issue19570 - def _ensure_stringlike(self, option, what, default=None): - # type: (str, str, Any) -> Any - val = getattr(self, option) - if val is None: - setattr(self, option, default) - return default - elif not isinstance(val, str): - raise DistutilsOptionError("'%s' must be a %s (got `%s`)" - % (option, what, val)) - return val - def finalize_options(self): # type: () -> None self.ensure_string_list('builder') |