diff --git a/.nengobones.yml b/.nengobones.yml index c6c275c..88a8b93 100644 --- a/.nengobones.yml +++ b/.nengobones.yml @@ -29,11 +29,9 @@ setup_py: - nengo_sphinx_theme=nengo_sphinx_theme include_package_data: True install_req: - - docutils<0.17 # can remove this if we upgrade to more recent sphinx - - sphinx>=3.1.2,<4.0 - - sphinx-notfound-page>=0.5.0 + - sphinx>=7.2.6 + - sphinx-notfound-page>=1.0.0 - backoff>=1.10.0 - - jinja2<3.1.0 # can remove this if we upgrade to sphinx>=4.0 docs_req: - jupyter - matplotlib @@ -47,8 +45,7 @@ setup_py: - "Operating System :: Microsoft :: Windows" - "Operating System :: POSIX :: Linux" - "Programming Language :: Python" - - "Programming Language :: Python :: 3.6" - - "Programming Language :: Python :: 3.7" + - "Programming Language :: Python :: 3.9" - "Topic :: Software Development" setup_cfg: diff --git a/LICENSE.rst b/LICENSE.rst index 59d1e92..5073d88 100644 --- a/LICENSE.rst +++ b/LICENSE.rst @@ -4,7 +4,7 @@ Nengo Sphinx Theme license ************************** -Copyright (c) 2019-2023 Applied Brain Research +Copyright (c) 2019-2024 Applied Brain Research **ABR License** diff --git a/docs/conf.py b/docs/conf.py index 4304e44..2534fa5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -88,7 +88,7 @@ project = "Nengo Sphinx Theme" authors = "Applied Brain Research" -copyright = "2019-2023 Applied Brain Research" +copyright = "2019-2024 Applied Brain Research" version = ".".join(nengo_sphinx_theme.__version__.split(".")[:2]) # Short X.Y version release = nengo_sphinx_theme.__version__ # Full version, with tags diff --git a/nengo_sphinx_theme/ext/autoautosummary.py b/nengo_sphinx_theme/ext/autoautosummary.py index 9bdbfc9..37ad3d6 100644 --- a/nengo_sphinx_theme/ext/autoautosummary.py +++ b/nengo_sphinx_theme/ext/autoautosummary.py @@ -11,7 +11,7 @@ from docutils.parsers.rst import directives from sphinx.ext import autodoc, autosummary from sphinx.ext.autodoc import StringList, _ -from sphinx.util.typing import stringify +from sphinx.util.typing import stringify_annotation # We import nengo_sphinx_theme here to test the issue that # `patch_autosummary_import_by_name` fixes. @@ -149,10 +149,10 @@ def patch_autosummary_import_by_name(): orig_f = autosummary.import_by_name - def import_by_name(name, prefixes): + def import_by_name(name, prefixes=(None,)): # We currently do not support prefixes, because they can cause cycles. If we # need this in the future, we can go back to filtering problematic prefixes. - prefixes = [None] + prefixes = (None,) return orig_f(name, prefixes) autosummary.import_by_name = import_by_name @@ -187,12 +187,11 @@ def add_directive_header(self, sig): class RenameClassDocumenter(RenameMixin, autodoc.ClassDocumenter): """Class autodocumenter with optional renaming.""" - def add_content(self, more_content, no_docstring=False): + def add_content(self, more_content): # This is a modified version of autodoc.ClassDocumenter.add_content # that changes the module name for aliases - no_docstring = False if self.doc_as_attr: - fullname = stringify(self.object) + fullname = stringify_annotation(self.object) modname = self.env.config["autoautosummary_change_modules"].get( fullname, ".".join(fullname.split(".")[:-1]) ) @@ -200,13 +199,8 @@ def add_content(self, more_content, no_docstring=False): more_content = StringList( [_(f"alias of :class:`{modname}.{fullname.split('.')[-1]}`")], source="" ) - no_docstring = True - # no_docstring only needs to be specified in sphinx<3.4 - # pylint: disable=bad-super-call - super(autodoc.ClassDocumenter, self).add_content( - more_content, no_docstring=no_docstring - ) + super(autodoc.ClassDocumenter, self).add_content(more_content) class RenameFunctionDocumenter(RenameMixin, autodoc.FunctionDocumenter): diff --git a/nengo_sphinx_theme/version.py b/nengo_sphinx_theme/version.py index 0036117..722c22f 100644 --- a/nengo_sphinx_theme/version.py +++ b/nengo_sphinx_theme/version.py @@ -11,7 +11,7 @@ tagged with the version. """ -version_info = (23, 11, 7) # bones: ignore +version_info = (24, 1, 15) # bones: ignore name = "nengo-sphinx-theme" dev = 0 @@ -22,4 +22,4 @@ if dev is not None: version += ".dev%d" % dev # pragma: no cover -copyright = "Copyright (c) 2019-2023 Applied Brain Research" +copyright = "Copyright (c) 2019-2024 Applied Brain Research" diff --git a/setup.py b/setup.py index 690fdc1..851d158 100755 --- a/setup.py +++ b/setup.py @@ -28,11 +28,9 @@ def read(*filenames, **kwargs): version = runpy.run_path(str(root / "nengo_sphinx_theme" / "version.py"))["version"] install_req = [ - "docutils<0.17", - "sphinx>=3.1.2,<4.0", - "sphinx-notfound-page>=0.5.0", + "sphinx>=7.2.6", + "sphinx-notfound-page>=1.0.0", "backoff>=1.10.0", - "jinja2<3.1.0", ] docs_req = [ "jupyter", @@ -77,8 +75,7 @@ def read(*filenames, **kwargs): "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.9", "Topic :: Software Development", ], )