From 82d5497555870c6ad924cdfd3f6deee82ecae4fe Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:05:12 +0000 Subject: [PATCH 1/2] Resolve a warning in the tests --- sphinx/ext/napoleon/docstring.py | 2 +- tests/test_ext_autodoc/test_ext_autodoc.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sphinx/ext/napoleon/docstring.py b/sphinx/ext/napoleon/docstring.py index 6c866f3db42..3c33eca92b2 100644 --- a/sphinx/ext/napoleon/docstring.py +++ b/sphinx/ext/napoleon/docstring.py @@ -358,7 +358,7 @@ def __init__( self._what: _AutodocObjType | Literal['object'] = what self._name = name self._obj = obj - if options: + if options is not None: try: self._no_index = options.no_index or options.noindex except (AttributeError, TypeError): diff --git a/tests/test_ext_autodoc/test_ext_autodoc.py b/tests/test_ext_autodoc/test_ext_autodoc.py index 0d2c29d13fb..ddf8ad407a4 100644 --- a/tests/test_ext_autodoc/test_ext_autodoc.py +++ b/tests/test_ext_autodoc/test_ext_autodoc.py @@ -2639,11 +2639,11 @@ def test_singledispatchmethod_classmethod_automethod() -> None: ] -@pytest.mark.skipif( - sys.version_info[:2] >= (3, 13), - reason='Cython does not support Python 3.13 yet.', +@pytest.mark.xfail( + sys.version_info[:2] >= (3, 15), + reason='Cython does not support Python 3.15 yet.', ) -@pytest.mark.skipif(pyximport is None, reason='cython is not installed') +@pytest.mark.skipif(pyximport is None, reason='Cython is not installed') def test_cython() -> None: options = { 'members': None, From f8cc9f97db3a7cddc19f1d08e845c1a35900f75e Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Mon, 15 Dec 2025 20:43:42 +0000 Subject: [PATCH 2/2] fixup! Resolve a warning in the tests --- tests/test_ext_autodoc/test_ext_autodoc.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/test_ext_autodoc/test_ext_autodoc.py b/tests/test_ext_autodoc/test_ext_autodoc.py index ddf8ad407a4..8f526e051cf 100644 --- a/tests/test_ext_autodoc/test_ext_autodoc.py +++ b/tests/test_ext_autodoc/test_ext_autodoc.py @@ -2639,10 +2639,6 @@ def test_singledispatchmethod_classmethod_automethod() -> None: ] -@pytest.mark.xfail( - sys.version_info[:2] >= (3, 15), - reason='Cython does not support Python 3.15 yet.', -) @pytest.mark.skipif(pyximport is None, reason='Cython is not installed') def test_cython() -> None: options = {