Repository: breathe-doc/breathe (language: python)

Issue:
handle Sphinx 6.x
- Sphinx stable is now at version 6.1.3
- however other packages that rely on Sphinx and breathe, throw an error with Sphinx 6.x 
```
breathe 4.34.0 requires Sphinx!=5.0.0,<6,>=4.0, but you have sphinx 6.1.3 which is incompatible.
```


Discussion / hints:
Thanks for flagging this. I can see that it is an important this to resolve. I'm not in touch with the Sphinx development but we can update CI and see how it goes.
@michaeljones great, thanks
Just tested build with sphinx 6.1.3 and I see some pytest warnings
```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-breathe-4.34.0-4.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-breathe-4.34.0-4.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.8.16, pytest-7.2.1, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/breathe-4.34.0
collected 21 items

tests/test_renderer.py ..................                                                                                                                                             [ 85%]
tests/test_utils.py ...                                                                                                                                                               [100%]

===================================================================================== warnings summary ======================================================================================
tests/test_renderer.py::test_render_func
tests/test_renderer.py::test_render_func
  /usr/lib64/python3.8/importlib/__init__.py:127: RemovedInSphinx80Warning: The alias 'sphinx.util.SkipProgressMessage' is deprecated, use 'sphinx.util.display.SkipProgressMessage' instead. Check CHANGES for Sphinx API modifications.
    return _bootstrap._gcd_import(name[level:], package, level)

tests/test_renderer.py::test_render_func
tests/test_renderer.py::test_render_func
tests/test_renderer.py::test_render_func
tests/test_renderer.py::test_render_func
  /usr/lib64/python3.8/importlib/__init__.py:127: RemovedInSphinx80Warning: The alias 'sphinx.util.progress_message' is deprecated, use 'sphinx.util.display.progress_message' instead. Check CHANGES for Sphinx API modifications.
    return _bootstrap._gcd_import(name[level:], package, level)

tests/test_renderer.py: 18 warnings
  /home/tkloczko/rpmbuild/BUILD/breathe-4.34.0/tests/test_renderer.py:128: DeprecationWarning: The frontend.OptionParser class will be replaced by a subclass of argparse.ArgumentParser in Docutils 0.21 or later.
    settings = frontend.OptionParser(components=(parsers.rst.Parser,)).get_default_values()

tests/test_renderer.py: 1224 warnings
  /usr/lib64/python3.8/optparse.py:1000: DeprecationWarning: The frontend.Option class will be removed in Docutils 0.21 or later.
    option = self.option_class(*args, **kwargs)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================================= 21 passed, 1248 warnings in 1.13s =============================================================================
```

Thanks for raising it. I've looked around a little and the Sphinx warnings are about things which will be removed in Sphinx 8 which is not pressingly soon and similarly the docutils warnings are for 0.21 which looking at the release cadence will not be soon.

That isn't a reason to not adjust for them but the sphinx ones seem to be coming from the applehelp sphinx extension so I'm not sure we can control that and I'm not sure of the general approach for managing them otherwise. I guess if-statements around imports? I'd be happy to receive a PR for it but I'm not sufficiently up to date on my Python knowledge to know the best way to handle this.

Fix patch:
diff --git a/README.rst b/README.rst
index ac701eb5..cbf01022 100644
--- a/README.rst
+++ b/README.rst
@@ -98,7 +98,7 @@ branch.
 Requirements
 ------------
 
-Breathe requires Python 3.7+, Sphinx 4.0+ and Doxygen 1.8+.
+Breathe requires Python 3.8+, Sphinx 5.0+ and Doxygen 1.8+.
 
 Mailing List Archives
 ---------------------
diff --git a/pyproject.toml b/pyproject.toml
index 7dff1d86..1f21f7a5 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,7 +14,7 @@ urls.Documentation = "https://breathe.readthedocs.io/"
 urls.Homepage = "https://www.breathe-doc.org/"
 urls."Issue tracker" = "https://github.com/breathe-doc/breathe/issues"
 license.text = "BSD-3-Clause"
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 
 # Classifiers list: https://pypi.org/classifiers/
 classifiers = [
@@ -30,7 +30,6 @@ classifiers = [
     "Programming Language :: Python",
     "Programming Language :: Python :: 3",
     "Programming Language :: Python :: 3 :: Only",
-    "Programming Language :: Python :: 3.7",
     "Programming Language :: Python :: 3.8",
     "Programming Language :: Python :: 3.9",
     "Programming Language :: Python :: 3.10",
@@ -45,7 +44,7 @@ classifiers = [
     "Topic :: Utilities",
 ]
 dependencies = [
-    "Sphinx>=4.0,!=5.0.0",
+    "Sphinx>=5.0.2",
     "docutils>=0.12",
     "Jinja2>=2.7.3",
     "MarkupSafe>=0.23",


Test patch:
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
index 5a55f9df..0c95b400 100644
--- a/.github/workflows/unit_tests.yml
+++ b/.github/workflows/unit_tests.yml
@@ -7,33 +7,19 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: ['3.7', '3.8', '3.9', '3.10']
+        python-version:
+          - '3.8'
+          - '3.9'
+          - '3.10'
+          - '3.11'
+          - '3.12'
         sphinx-version:
-          - '4.0.3'
-          - '4.1.2'
-          - '4.2.0'
-          - '4.3.2'
-          - '4.5.0'
           - '5.0.2'
           - '5.1.1'
+          - '5.2.3'
           - '5.3.0'
           - '6.1.3'
           - git+https://github.com/sphinx-doc/sphinx.git@master
-        exclude:
-          # avoid bug in following configurations
-          # sphinx/util/typing.py:37: in <module>
-          #     from types import Union as types_Union
-          # ImportError: cannot import name 'Union' from 'types'
-          - python-version: '3.10'
-            sphinx-version: '4.0.3'
-          - python-version: '3.10'
-            sphinx-version: '4.1.2'
-
-          # Sphinx has removed support for Python 3.7, Breathe will follow.
-          - python-version: '3.7'
-            sphinx-version: git+https://github.com/sphinx-doc/sphinx.git@master
-          - python-version: '3.7'
-            sphinx-version: '6.1.3'
 
     steps:
       - uses: actions/checkout@v4