From a7ec37cae1f2333b682446edcb0de5c16db8a980 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Thu, 20 May 2021 21:58:59 +0900 Subject: [PATCH 01/13] Bump version --- CHANGES | 21 +++++++++++++++++++++ sphinx/__init__.py | 6 +++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index ef875beac9a..5b890fe8420 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,24 @@ +Release 4.0.3 (in development) +============================== + +Dependencies +------------ + +Incompatible changes +-------------------- + +Deprecated +---------- + +Features added +-------------- + +Bugs fixed +---------- + +Testing +-------- + Release 4.0.2 (released May 20, 2021) ===================================== diff --git a/sphinx/__init__.py b/sphinx/__init__.py index 57ad7242be4..d566b824a1d 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.0.2' -__released__ = '4.0.2' # used when Sphinx builds its own docs +__version__ = '4.0.3+' +__released__ = '4.0.3' # 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, 0, 2, 'final', 0) +version_info = (4, 0, 3, 'beta', 0) package_dir = path.abspath(path.dirname(__file__)) From 3ef5fb30a0b9fd5d3496d0eeafbed1a3935ae388 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 23 May 2021 02:21:26 +0900 Subject: [PATCH 02/13] CircleCI: Test with python 3.8 From now on, Sphinx will be tested with python3.8 and Ubuntu-20.04 in CircleCI. --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9ded24cffc2..841260c6995 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,9 +8,9 @@ jobs: working_directory: /sphinx steps: - checkout - - run: /python3.6/bin/pip install -U pip setuptools - - run: /python3.6/bin/pip install -U .[test] + - run: /python3.8/bin/pip install -U pip setuptools + - run: /python3.8/bin/pip install -U .[test] - run: mkdir -p test-reports/pytest - - run: make test PYTHON=/python3.6/bin/python TEST="--junitxml=test-reports/pytest/results.xml -vv" + - run: make test PYTHON=/python3.8/bin/python TEST="--junitxml=test-reports/pytest/results.xml -vv" - store_test_results: path: test-reports From 7cc87d84c47dcd53fcd22127975efd3355f70995 Mon Sep 17 00:00:00 2001 From: jfbu Date: Tue, 8 Jun 2021 23:14:01 +0200 Subject: [PATCH 03/13] Fix #9313 --- sphinx/writers/latex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 546db9e31be..796e0cb92fb 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -966,7 +966,7 @@ def visit_row(self, node: Element) -> None: # insert suitable strut for equalizing row heights in given multirow self.body.append(r'\sphinxtablestrut{%d}' % cell.cell_id) else: # use \multicolumn for wide multirow cell - self.body.append(r'\multicolumn{%d}{|l|}\sphinxtablestrut{%d}}' % + self.body.append(r'\multicolumn{%d}{|l|}{\sphinxtablestrut{%d}}' % (cell.width, cell.cell_id)) def depart_row(self, node: Element) -> None: From 67e48df37819e78e26aa6aefc11031948d70fbca Mon Sep 17 00:00:00 2001 From: jfbu Date: Wed, 9 Jun 2021 07:40:35 +0200 Subject: [PATCH 04/13] Update CHANGES --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 5b890fe8420..b5011d71847 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,8 @@ Features added Bugs fixed ---------- +* 9313: LaTeX: complex table with merged cells broken since 4.0 + Testing -------- From 5c98b9fa7ca52fd8e728771d36bcc49720b07a6e Mon Sep 17 00:00:00 2001 From: Junya Fukuda Date: Sun, 13 Jun 2021 15:22:32 +0900 Subject: [PATCH 05/13] Fix mypy violations (Third-party Library Stubs) (with mypy-0.900) --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b669afc00e3..817b5e87194 100644 --- a/setup.py +++ b/setup.py @@ -44,8 +44,11 @@ 'lint': [ 'flake8>=3.5.0', 'isort', - 'mypy>=0.800', + 'mypy>=0.900', 'docutils-stubs', + "types-typed-ast", + "types-pkg_resources", + "types-requests", ], 'test': [ 'pytest', From a8771f40676c1810cb56b72125d3ad95d846d784 Mon Sep 17 00:00:00 2001 From: Junya Fukuda Date: Sun, 13 Jun 2021 16:05:09 +0900 Subject: [PATCH 06/13] Fix mypy violations (delete type: ignore ) (with mypy-0.900) --- sphinx/util/logging.py | 6 +++--- sphinx/util/typing.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index 64b7d8fb436..63bc5ab6271 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -573,13 +573,13 @@ def setup(app: "Sphinx", status: IO, warning: IO) -> None: for handler in logger.handlers[:]: logger.removeHandler(handler) - info_handler = NewLineStreamHandler(SafeEncodingWriter(status)) # type: ignore + info_handler = NewLineStreamHandler(SafeEncodingWriter(status)) info_handler.addFilter(InfoFilter()) info_handler.addFilter(InfoLogRecordTranslator(app)) info_handler.setLevel(VERBOSITY_MAP[app.verbosity]) info_handler.setFormatter(ColorizeFormatter()) - warning_handler = WarningStreamHandler(SafeEncodingWriter(warning)) # type: ignore + warning_handler = WarningStreamHandler(SafeEncodingWriter(warning)) warning_handler.addFilter(WarningSuppressor(app)) warning_handler.addFilter(WarningLogRecordTranslator(app)) warning_handler.addFilter(WarningIsErrorFilter(app)) @@ -587,7 +587,7 @@ def setup(app: "Sphinx", status: IO, warning: IO) -> None: warning_handler.setLevel(logging.WARNING) warning_handler.setFormatter(ColorizeFormatter()) - messagelog_handler = logging.StreamHandler(LastMessagesWriter(app, status)) # type: ignore + messagelog_handler = logging.StreamHandler(LastMessagesWriter(app, status)) messagelog_handler.addFilter(InfoFilter()) messagelog_handler.setLevel(VERBOSITY_MAP[app.verbosity]) messagelog_handler.setFormatter(ColorizeFormatter()) diff --git a/sphinx/util/typing.py b/sphinx/util/typing.py index 957f8a33269..af2dc180b68 100644 --- a/sphinx/util/typing.py +++ b/sphinx/util/typing.py @@ -223,13 +223,13 @@ def _restify_py36(cls: Optional[Type]) -> str: else: reftext = ':class:`%s`' % qualname - if cls.__args__ is None or len(cls.__args__) <= 2: # type: ignore # NOQA - params = cls.__args__ # type: ignore - elif cls.__origin__ == Generator: # type: ignore - params = cls.__args__ # type: ignore + if cls.__args__ is None or len(cls.__args__) <= 2: + params = cls.__args__ + elif cls.__origin__ == Generator: + params = cls.__args__ else: # typing.Callable - args = ', '.join(restify(arg) for arg in cls.__args__[:-1]) # type: ignore - result = restify(cls.__args__[-1]) # type: ignore + args = ', '.join(restify(arg) for arg in cls.__args__[:-1]) + result = restify(cls.__args__[-1]) return reftext + '\\ [[%s], %s]' % (args, result) if params: From 519cc078fdedd848e798a6ee3176c59b0f7da97e Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 13 Jun 2021 15:46:22 +0900 Subject: [PATCH 07/13] Revert the removal of sphinx.util:force_decode() After the release of 4.0.0, some 3rd party extensions have became not working with the latest Sphinx because `force_decode()` function was removed. It was deprecated since Sphinx-2.0 and warned for the removal since 3.0. This reverts the removal and extends its deprecation period to 5.0.0. I hope it helps users of these extensions. --- CHANGES | 3 +++ doc/extdev/deprecated.rst | 2 +- sphinx/util/__init__.py | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 5b890fe8420..3739db03572 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,9 @@ Deprecated Features added -------------- +* Revert the removal of ``sphinx.util:force_decode()`` to become some 3rd party + extensions available again during 5.0 + Bugs fixed ---------- diff --git a/doc/extdev/deprecated.rst b/doc/extdev/deprecated.rst index 9e17b9fb4f0..e37c2b2ba4b 100644 --- a/doc/extdev/deprecated.rst +++ b/doc/extdev/deprecated.rst @@ -1015,7 +1015,7 @@ The following is a list of deprecated interfaces. * - ``sphinx.util.force_decode()`` - 2.0 - - 4.0 + - 5.0 - N/A * - ``sphinx.util.get_matching_docs()`` diff --git a/sphinx/util/__init__.py b/sphinx/util/__init__.py index 7e24909ee83..170c554d77b 100644 --- a/sphinx/util/__init__.py +++ b/sphinx/util/__init__.py @@ -337,6 +337,23 @@ def parselinenos(spec: str, total: int) -> List[int]: return items +def force_decode(string: str, encoding: str) -> str: + """Forcibly get a unicode string out of a bytestring.""" + warnings.warn('force_decode() is deprecated.', + RemovedInSphinx50Warning, stacklevel=2) + if isinstance(string, bytes): + try: + if encoding: + string = string.decode(encoding) + else: + # try decoding with utf-8, should only work for real UTF-8 + string = string.decode() + except UnicodeError: + # last resort -- can't fail + string = string.decode('latin1') + return string + + def rpartition(s: str, t: str) -> Tuple[str, str]: """Similar to str.rpartition from 2.5, but doesn't return the separator.""" warnings.warn('rpartition() is now deprecated.', RemovedInSphinx50Warning, stacklevel=2) From e7e92d31544b9e6e3b1ecf0e203b95f5a454d525 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 13 Jun 2021 17:29:52 +0900 Subject: [PATCH 08/13] Update CHANGES for PR #9313 --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b5011d71847..6710a63a5a3 100644 --- a/CHANGES +++ b/CHANGES @@ -16,7 +16,7 @@ Features added Bugs fixed ---------- -* 9313: LaTeX: complex table with merged cells broken since 4.0 +* #9313: LaTeX: complex table with merged cells broken since 4.0 Testing -------- From 2de7c35573f557798fc65c17c8830178321c0a78 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 13 Jun 2021 23:11:47 +0900 Subject: [PATCH 09/13] Fix #9322: KeyError is raised on PropagateDescDomain transform PropageteDescDomain applies the domain name from the "domain" attribute of parent node (desc node) to the desc_signature node. The structure has longly generated by ObjectDescription. But it must not be a new rule. This allows to build document that contains non standard doctree. --- CHANGES | 1 + sphinx/transforms/post_transforms/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 6710a63a5a3..73808f7c0fc 100644 --- a/CHANGES +++ b/CHANGES @@ -17,6 +17,7 @@ Bugs fixed ---------- * #9313: LaTeX: complex table with merged cells broken since 4.0 +* #9322: KeyError is raised on PropagateDescDomain transform Testing -------- diff --git a/sphinx/transforms/post_transforms/__init__.py b/sphinx/transforms/post_transforms/__init__.py index dde06fae1be..7f4b3e3a691 100644 --- a/sphinx/transforms/post_transforms/__init__.py +++ b/sphinx/transforms/post_transforms/__init__.py @@ -249,7 +249,8 @@ class PropagateDescDomain(SphinxPostTransform): def run(self, **kwargs: Any) -> None: for node in self.document.traverse(addnodes.desc_signature): - node['classes'].append(node.parent['domain']) + if node.parent.get('domain'): + node['classes'].append(node.parent['domain']) def setup(app: Sphinx) -> Dict[str, Any]: From 7b8b3de9d1c8ee042929d0b3b5d873e58ca29415 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 13 Jun 2021 22:22:15 +0900 Subject: [PATCH 10/13] Fix #9330: versionchanged causes error during pdf build The versionchanged directive breaks doctree if its contents start with non-paragraph element (ex. lists, tables, and so on). It causes build error in LaTeX. This inserts a paragraph if the first child of the contents is not a paragraph not to break doctree. --- CHANGES | 2 ++ sphinx/domains/changeset.py | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 6710a63a5a3..9d773318793 100644 --- a/CHANGES +++ b/CHANGES @@ -16,6 +16,8 @@ Features added Bugs fixed ---------- +* #9330: changeset domain: :rst:dir:`versionchanged` with contents being a list + will cause error during pdf build * #9313: LaTeX: complex table with merged cells broken since 4.0 Testing diff --git a/sphinx/domains/changeset.py b/sphinx/domains/changeset.py index 1b31e0248a2..81c81c2882c 100644 --- a/sphinx/domains/changeset.py +++ b/sphinx/domains/changeset.py @@ -74,8 +74,10 @@ def run(self) -> List[Node]: if self.content: self.state.nested_parse(self.content, self.content_offset, node) classes = ['versionmodified', versionlabel_classes[self.name]] - if len(node): - if isinstance(node[0], nodes.paragraph) and node[0].rawsource: + if len(node) > 0 and isinstance(node[0], nodes.paragraph): + # the contents start with a paragraph + if node[0].rawsource: + # make the first paragraph translatable content = nodes.inline(node[0].rawsource, translatable=True) content.source = node[0].source content.line = node[0].line @@ -84,10 +86,16 @@ def run(self) -> List[Node]: para = cast(nodes.paragraph, node[0]) para.insert(0, nodes.inline('', '%s: ' % text, classes=classes)) + elif len(node) > 0: + # the contents do not starts with a paragraph + para = nodes.paragraph('', '', + nodes.inline('', '%s: ' % text, classes=classes), + translatable=False) + node.insert(0, para) else: + # the contents are empty para = nodes.paragraph('', '', - nodes.inline('', '%s.' % text, - classes=classes), + nodes.inline('', '%s.' % text, classes=classes), translatable=False) node.append(para) From ef9b55c9616b957bda1431e331bb17a2edab36e2 Mon Sep 17 00:00:00 2001 From: jfbu Date: Sun, 13 Jun 2021 18:34:06 +0200 Subject: [PATCH 11/13] Fix #9305 LaTeX: backslash in sphinxupquote error with Japanese --- CHANGES | 2 ++ sphinx/texinputs/sphinxlatexliterals.sty | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 9d773318793..9a7f854e34a 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,8 @@ Bugs fixed * #9330: changeset domain: :rst:dir:`versionchanged` with contents being a list will cause error during pdf build * #9313: LaTeX: complex table with merged cells broken since 4.0 +* #9305: LaTeX: backslash may cause Improper discretionary list pdf build error + with Japanese engines Testing -------- diff --git a/sphinx/texinputs/sphinxlatexliterals.sty b/sphinx/texinputs/sphinxlatexliterals.sty index 4d0312fc653..d2ba89ea73f 100644 --- a/sphinx/texinputs/sphinxlatexliterals.sty +++ b/sphinx/texinputs/sphinxlatexliterals.sty @@ -765,7 +765,8 @@ % break at . , ; ? ! / \sphinxbreaksviaactive % break also at \ - \let\sphinx@textbackslash\textbackslash + \setbox8=\hbox{\textbackslash}% + \def\sphinx@textbackslash{\copy8}% \let\textbackslash\sphinxtextbackslash % by default, no continuation symbol on next line but may be added \let\sphinxafterbreak\sphinxafterbreakofinlineliteral From 50f5280603fa9c66253f13e53dd7e1b4a0263447 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Wed, 16 Jun 2021 22:08:30 +0200 Subject: [PATCH 12/13] C, keyword changes - Add new keywords from C23. - Add c_extra_keywords as confval. - Move macro names from keywords to c_extra_keywords. Fixes sphinx-doc/sphinx#9354 --- CHANGES | 6 ++++++ doc/usage/configuration.rst | 8 ++++++++ sphinx/domains/c.py | 26 ++++++++++++++++++++++---- tests/test_domain_c.py | 25 ++++++++++++++++++------- 4 files changed, 54 insertions(+), 11 deletions(-) diff --git a/CHANGES b/CHANGES index 9a7f854e34a..62e1f60ee2f 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,10 @@ Deprecated Features added -------------- +* C, add C23 keywords ``_Decimal32``, ``_Decimal64``, and ``_Decimal128``. +* #9354: C, add :confval:`c_extra_keywords` to allow user-defined keywords + during parsing. + Bugs fixed ---------- @@ -21,6 +25,8 @@ Bugs fixed * #9313: LaTeX: complex table with merged cells broken since 4.0 * #9305: LaTeX: backslash may cause Improper discretionary list pdf build error with Japanese engines +* #9354: C, remove special macro names from the keyword list. + See also :confval:`c_extra_keywords`. Testing -------- diff --git a/doc/usage/configuration.rst b/doc/usage/configuration.rst index a233e0fda9b..3c58da30878 100644 --- a/doc/usage/configuration.rst +++ b/doc/usage/configuration.rst @@ -2670,6 +2670,14 @@ Options for the C domain .. versionadded:: 3.0 +.. confval:: c_extra_keywords + + A list of identifiers to be recognized as keywords by the C parser. + It defaults to ``['alignas', 'alignof', 'bool', 'complex', 'imaginary', + 'noreturn', 'static_assert', 'thread_local']``. + + .. versionadded:: 4.0.3 + .. confval:: c_allow_pre_v3 A boolean (default ``False``) controlling whether to parse and try to diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index b0711f68e98..6ebfe04c4f0 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -54,10 +54,15 @@ 'else', 'enum', 'extern', 'float', 'for', 'goto', 'if', 'inline', 'int', 'long', 'register', 'restrict', 'return', 'short', 'signed', 'sizeof', 'static', 'struct', 'switch', 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while', - '_Alignas', 'alignas', '_Alignof', 'alignof', '_Atomic', '_Bool', 'bool', - '_Complex', 'complex', '_Generic', '_Imaginary', 'imaginary', - '_Noreturn', 'noreturn', '_Static_assert', 'static_assert', - '_Thread_local', 'thread_local', + '_Alignas', '_Alignof', '_Atomic', '_Bool', '_Complex', + '_Decimal32', '_Decimal64', '_Decimal128', + '_Generic', '_Imaginary', '_Noreturn', '_Static_assert', '_Thread_local', +] +# These are only keyword'y when the corresponding headers are included. +# They are used as default value for c_extra_keywords. +_macroKeywords = [ + 'alignas', 'alignof', 'bool', 'complex', 'imaginary', 'noreturn', 'static_assert', + 'thread_local', ] # these are ordered by preceedence @@ -2535,6 +2540,12 @@ def _parse_nested_name(self) -> ASTNestedName: if identifier in _keywords: self.fail("Expected identifier in nested name, " "got keyword: %s" % identifier) + if self.matched_text in self.config.c_extra_keywords: + msg = "Expected identifier, got user-defined keyword: %s." \ + + " Remove it from c_extra_keywords to allow it as identifier.\n" \ + + "Currently c_extra_keywords is %s." + self.fail(msg % (self.matched_text, + str(self.config.c_extra_keywords))) ident = ASTIdentifier(identifier) names.append(ident) @@ -2711,6 +2722,12 @@ def _parse_declarator_name_suffix( if self.matched_text in _keywords: self.fail("Expected identifier, " "got keyword: %s" % self.matched_text) + if self.matched_text in self.config.c_extra_keywords: + msg = "Expected identifier, got user-defined keyword: %s." \ + + " Remove it from c_extra_keywords to allow it as identifier.\n" \ + + "Currently c_extra_keywords is %s." + self.fail(msg % (self.matched_text, + str(self.config.c_extra_keywords))) identifier = ASTIdentifier(self.matched_text) declId = ASTNestedName([identifier], rooted=False) else: @@ -3877,6 +3894,7 @@ def setup(app: Sphinx) -> Dict[str, Any]: app.add_domain(CDomain) app.add_config_value("c_id_attributes", [], 'env') app.add_config_value("c_paren_attributes", [], 'env') + app.add_config_value("c_extra_keywords", _macroKeywords, 'env') app.add_post_transform(AliasTransform) app.add_config_value("c_allow_pre_v3", False, 'env') diff --git a/tests/test_domain_c.py b/tests/test_domain_c.py index ef4858786de..a891e18e29e 100644 --- a/tests/test_domain_c.py +++ b/tests/test_domain_c.py @@ -15,16 +15,20 @@ from sphinx import addnodes from sphinx.addnodes import desc -from sphinx.domains.c import DefinitionError, DefinitionParser, Symbol, _id_prefix, _max_id +from sphinx.domains.c import (DefinitionError, DefinitionParser, Symbol, _id_prefix, + _macroKeywords, _max_id) from sphinx.ext.intersphinx import load_mappings, normalize_intersphinx_mapping from sphinx.testing import restructuredtext from sphinx.testing.util import assert_node +class Config: + c_id_attributes = ["id_attr", 'LIGHTGBM_C_EXPORT'] + c_paren_attributes = ["paren_attr"] + c_extra_keywords = _macroKeywords + + def parse(name, string): - class Config: - c_id_attributes = ["id_attr", 'LIGHTGBM_C_EXPORT'] - c_paren_attributes = ["paren_attr"] parser = DefinitionParser(string, location=None, config=Config()) parser.allowFallbackExpressionParsing = False ast = parser.parse_declaration(name, name) @@ -114,9 +118,6 @@ def check(name, input, idDict, output=None, key=None, asTextOutput=None): def test_expressions(): def exprCheck(expr, output=None): - class Config: - c_id_attributes = ["id_attr"] - c_paren_attributes = ["paren_attr"] parser = DefinitionParser(expr, location=None, config=Config()) parser.allowFallbackExpressionParsing = False ast = parser.parse_expression() @@ -522,6 +523,16 @@ def test_attributes(): check('function', 'LIGHTGBM_C_EXPORT int LGBM_BoosterFree(int handle)', {1: 'LGBM_BoosterFree'}) + +def test_extra_keywords(): + with pytest.raises(DefinitionError, + match='Expected identifier, got user-defined keyword: complex.'): + parse('function', 'void f(int complex)') + with pytest.raises(DefinitionError, + match='Expected identifier, got user-defined keyword: complex.'): + parse('function', 'void complex(void)') + + # def test_print(): # # used for getting all the ids out for checking # for a in ids: From 007795da0171f4d77df97027401a5e285111fad0 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Tue, 6 Jul 2021 00:40:29 +0900 Subject: [PATCH 13/13] Bump to 4.0.3 final --- CHANGES | 16 ++-------------- sphinx/__init__.py | 4 ++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/CHANGES b/CHANGES index c9c3538b3d3..a0b01936449 100644 --- a/CHANGES +++ b/CHANGES @@ -1,14 +1,5 @@ -Release 4.0.3 (in development) -============================== - -Dependencies ------------- - -Incompatible changes --------------------- - -Deprecated ----------- +Release 4.0.3 (released Jul 05, 2021) +===================================== Features added -------------- @@ -31,9 +22,6 @@ Bugs fixed See also :confval:`c_extra_keywords`. * #9322: KeyError is raised on PropagateDescDomain transform -Testing --------- - Release 4.0.2 (released May 20, 2021) ===================================== diff --git a/sphinx/__init__.py b/sphinx/__init__.py index d566b824a1d..c4e4134ed01 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.0.3+' +__version__ = '4.0.3' __released__ = '4.0.3' # 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, 0, 3, 'beta', 0) +version_info = (4, 0, 3, 'final', 0) package_dir = path.abspath(path.dirname(__file__))