timeout: Rename to unsafe_timeout.

This timeout strategy using asynchronous exceptions has a number of
safety caveats (read the docstring!!) and should only be used in very
specific circumstances.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 72018cc26b)
This commit is contained in:
Anders Kaseorg
2024-04-18 10:44:46 -07:00
committed by Alex Vandiver
parent 607defeba7
commit b4f67e85b5
5 changed files with 10 additions and 10 deletions

View File

@@ -1543,7 +1543,7 @@ Output:
markdown.__init__.do_convert.
"""
with mock.patch(
"zerver.lib.markdown.timeout", side_effect=subprocess.CalledProcessError(1, [])
"zerver.lib.markdown.unsafe_timeout", side_effect=subprocess.CalledProcessError(1, [])
), self.assertLogs(level="ERROR"): # For markdown_logger.exception
yield