Merge branch '3.3.x' into 3.x

This commit is contained in:
Takeshi KOMIYA
2020-11-12 23:40:41 +09:00
4 changed files with 24 additions and 7 deletions

16
CHANGES
View File

@@ -41,7 +41,7 @@ Bugs fixed
Testing
--------
Release 3.3.1 (in development)
Release 3.3.2 (in development)
==============================
Dependencies
@@ -59,13 +59,21 @@ Features added
Bugs fixed
----------
Testing
--------
Release 3.3.1 (released Nov 12, 2020)
=====================================
Bugs fixed
----------
* #8372: autodoc: autoclass directive became slower than Sphinx-3.2
* #7727: autosummary: raise PycodeError when documenting python package
without __init__.py
* #8350: autosummary: autosummary_mock_imports causes slow down builds
* #8364: C, properly initialize attributes in empty symbols.
Testing
--------
* #8399: i18n: Put system locale path after the paths specified by configuration
Release 3.3.0 (released Nov 02, 2020)
=====================================

View File

@@ -32,8 +32,13 @@ if 'PYTHONWARNINGS' not in os.environ:
warnings.filterwarnings('ignore', "'U' mode is deprecated",
DeprecationWarning, module='docutils.io')
<<<<<<< HEAD
__version__ = '3.4.0+'
__released__ = '3.4.0' # used when Sphinx builds its own docs
=======
__version__ = '3.3.2+'
__released__ = '3.3.2' # used when Sphinx builds its own docs
>>>>>>> 3.3.x
#: Version info for better programmatic use.
#:

View File

@@ -294,8 +294,8 @@ class Sphinx:
if catalog.domain == 'sphinx' and catalog.is_outdated():
catalog.write_mo(self.config.language)
locale_dirs = [None] # type: List[Optional[str]]
locale_dirs += list(repo.locale_dirs)
locale_dirs = list(repo.locale_dirs) # type: List[Optional[str]]
locale_dirs += [None]
locale_dirs += [path.join(package_dir, 'locale')]
self.translator, has_translation = locale.init(locale_dirs, self.config.language)

View File

@@ -107,7 +107,11 @@ def getargspec(func: Callable) -> Any:
def unwrap(obj: Any) -> Any:
"""Get an original object from wrapped object (wrapped functions)."""
try:
return inspect.unwrap(obj)
if hasattr(obj, '__sphinx_mock__'):
# Skip unwrapping mock object to avoid RecursionError
return obj
else:
return inspect.unwrap(obj)
except ValueError:
# might be a mock object
return obj