From 3d88424c74ad3fe2603676d7762a7bf450e95006 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Fri, 26 Nov 2021 02:04:11 +0900 Subject: [PATCH 1/3] Fix #9844: autodoc: Failed to preserve defvalues for partial function --- CHANGES | 2 ++ sphinx/ext/autodoc/preserve_defaults.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6ef683b8e7a..40790e1b5fd 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,8 @@ Bugs fixed decorated by functools.lru_cache * #9879: autodoc: AttributeError is raised on building document for an object having invalid __doc__ atribute +* #9844: autodoc: Failed to process a function wrapped with functools.partial if + :confval:`autodoc_preserve_defaults` enabled * #9872: html: Class namespace collision between autodoc signatures and docutils-0.17 * #9864: mathjax: Failed to render equations via MathJax v2. The loading method diff --git a/sphinx/ext/autodoc/preserve_defaults.py b/sphinx/ext/autodoc/preserve_defaults.py index d451d0973ce..54411d2b6fb 100644 --- a/sphinx/ext/autodoc/preserve_defaults.py +++ b/sphinx/ext/autodoc/preserve_defaults.py @@ -73,7 +73,7 @@ def update_defvalue(app: Sphinx, obj: Any, bound_method: bool) -> None: lines = inspect.getsource(obj).splitlines() if lines[0].startswith((' ', r'\t')): lines.insert(0, '') # insert a dummy line to follow what get_function_def() does. - except OSError: + except (OSError, TypeError): lines = [] try: From ad3f23e256a3c203721250343b7055b830e74247 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 28 Nov 2021 01:04:37 +0900 Subject: [PATCH 2/3] Bump to 4.3.1 final --- CHANGES | 16 ++-------------- sphinx/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index 5126ffb4006..3edb3231042 100644 --- a/CHANGES +++ b/CHANGES @@ -1,14 +1,5 @@ -Release 4.3.1 (in development) -============================== - -Dependencies ------------- - -Incompatible changes --------------------- - -Deprecated ----------- +Release 4.3.1 (released Nov 28, 2021) +===================================== Features added -------------- @@ -31,9 +22,6 @@ Bugs fixed * #9864: mathjax: Failed to render equations via MathJax v2. The loading method of MathJax is back to "async" method again -Testing --------- - Release 4.3.0 (released Nov 11, 2021) ===================================== diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 62b3645e7a7..9ce3b261471 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -27,7 +27,7 @@ warnings.filterwarnings('ignore', "'U' mode is deprecated", DeprecationWarning, module='docutils.io') -__version__ = '4.3.1+' +__version__ = '4.3.1' __released__ = '4.3.1' # used when Sphinx builds its own docs #: Version info for better programmatic use. @@ -38,7 +38,7 @@ #: #: .. versionadded:: 1.2 #: Before version 1.2, check the string ``sphinx.__version__``. -version_info = (4, 3, 1, 'beta', 0) +version_info = (4, 3, 1, 'final', 0) package_dir = path.abspath(path.dirname(__file__)) From 95969a47e5b303c187cb7f2f0505d37d6d739687 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 28 Nov 2021 01:07:36 +0900 Subject: [PATCH 3/3] Bump version --- CHANGES | 21 +++++++++++++++++++++ sphinx/__init__.py | 6 +++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 3edb3231042..c00765178c6 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,24 @@ +Release 4.3.2 (in development) +============================== + +Dependencies +------------ + +Incompatible changes +-------------------- + +Deprecated +---------- + +Features added +-------------- + +Bugs fixed +---------- + +Testing +-------- + Release 4.3.1 (released Nov 28, 2021) ===================================== diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 9ce3b261471..f719d701e57 100644 --- a/sphinx/__init__.py +++ b/sphinx/__init__.py @@ -27,8 +27,8 @@ warnings.filterwarnings('ignore', "'U' mode is deprecated", DeprecationWarning, module='docutils.io') -__version__ = '4.3.1' -__released__ = '4.3.1' # used when Sphinx builds its own docs +__version__ = '4.3.2+' +__released__ = '4.3.2' # used when Sphinx builds its own docs #: Version info for better programmatic use. #: @@ -38,7 +38,7 @@ #: #: .. versionadded:: 1.2 #: Before version 1.2, check the string ``sphinx.__version__``. -version_info = (4, 3, 1, 'final', 0) +version_info = (4, 3, 2, 'beta', 0) package_dir = path.abspath(path.dirname(__file__))