diff --git a/docs/conf.py b/docs/conf.py index 41d8cf706..7a5bf60c6 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,11 @@ from functools import lru_cache, partial from typing import Any, Callable, Dict, Iterable, Iterator, List, Tuple from docutils import nodes -from docutils.parsers.rst.roles import normalize_options + +try: + from docutils.parsers.rst.roles import normalize_options +except ImportError: + from docutils.parsers.rst.roles import set_classes as normalize_options # type: ignore from pygments.lexer import RegexLexer from pygments.lexer import bygroups as untyped_bygroups from pygments.token import Comment, Error, Keyword, Literal, Name, Number, String, Whitespace diff --git a/kitty_tests/ssh.py b/kitty_tests/ssh.py index 48a336641..9e126fe29 100644 --- a/kitty_tests/ssh.py +++ b/kitty_tests/ssh.py @@ -230,7 +230,7 @@ shell_name=$(command basename "$login_shell") } cp = subprocess.run( ['sh', '-c', script], env=env, stdin=subprocess.DEVNULL, - stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) + capture_output=True, text=True) self.assertEqual(cp.returncode, 0, cp.stderr + cp.stdout) @retry_on_failure()