diff --git a/sphinx/application.py b/sphinx/application.py index 99f2b81bd8b..58e61f7ec39 100644 --- a/sphinx/application.py +++ b/sphinx/application.py @@ -1119,8 +1119,9 @@ def add_lexer(self, alias: str, lexer: type[Lexer]) -> None: .. versionadded:: 0.6 .. versionchanged:: 2.1 - Take a lexer class as an argument. An instance of lexers are - still supported until Sphinx-3.x. + Take a lexer class as an argument. + .. versionchanged:: 4.0 + Removed support for lexer instances as an argument. """ logger.debug('[app] adding lexer: %r', (alias, lexer)) lexer_classes[alias] = lexer diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 2fdd79e866e..c461cc311fd 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -1368,7 +1368,7 @@ def resolve_xref(self, env: BuildEnvironment, fromdocname: str, builder: Builder type, searchmode) if not matches and type == 'attr': - # fallback to meth (for property; Sphinx-2.4.x) + # fallback to meth (for property; Sphinx 2.4.x) # this ensures that `:attr:` role continues to refer to the old property entry # that defined by ``method`` directive in old reST files. matches = self.find_obj(env, modname, clsname, target, 'meth', searchmode) diff --git a/sphinx/ext/intersphinx.py b/sphinx/ext/intersphinx.py index c07ffc145be..2486d29d169 100644 --- a/sphinx/ext/intersphinx.py +++ b/sphinx/ext/intersphinx.py @@ -360,10 +360,10 @@ def _resolve_reference_in_domain(env: BuildEnvironment, ) -> nodes.reference | None: # we adjust the object types for backwards compatibility if domain.name == 'std' and 'cmdoption' in objtypes: - # until Sphinx-1.6, cmdoptions are stored as std:option + # cmdoptions were stored as std:option until Sphinx 1.6 objtypes.append('option') if domain.name == 'py' and 'attribute' in objtypes: - # Since Sphinx-2.1, properties are stored as py:method + # properties are stored as py:method since Sphinx 2.1 objtypes.append('method') # the inventory contains domain:type as objtype