jbms / sphinx-immaterial

Adaptation of the popular mkdocs-material material design theme to the sphinx documentation system
https://jbms.github.io/sphinx-immaterial/
Other
195 stars 31 forks source link

fix compatibility with Sphinx v7.2.0 #278

Closed 2bndy5 closed 1 year ago

2bndy5 commented 1 year ago

This fixes #277 along with other problems found with v7.2.0 changes. See https://github.com/jbms/sphinx-immaterial/issues/277#issuecomment-1683192295.

2bndy5 commented 1 year ago

Looks like Sphinx v7.2.0 dropped support for python v3.8. This complicates the CI a bit... My "all-or-nothing" trait wants to remove python v3.8 from the workflow, but I need to think on a better solution.

jbms commented 1 year ago

Looks like Sphinx v7.2.0 dropped support for python v3.8. This complicates the CI a bit... My "all-or-nothing" trait wants to remove python v3.8 from the workflow, but I need to think on a better solution.

I think it might be tricky to avoid repetition entirely but this may help: https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#excluding-matrix-configurations

2bndy5 commented 1 year ago

The exclude option should work for the unit tests, but mypy doesn't seem to understand the changes here when using python v3.8. I can type: ignore the problems until we drop 3.8 entirely ~or I can just skip pylint and mypy for python v3.8 in CI~.

2bndy5 commented 1 year ago

In updating the the unit tests, I found a warning about python.apigen:

tests/python_apigen_test.py: 91 warnings
  path\to\sphinx_immaterial\apidoc\python\apigen.py:1235: RemovedInSphinx80Warning: The tuple interface of ObjectMember is deprecated. Use (obj.__name__, obj.object) instead.
    members.sort(key=lambda entry: member_order.get(entry[0], float("inf")))
jposada202020 commented 1 year ago

Thank you @2bndy5!