From 18efb69e53590586b22dd0f63559845d4676feeb Mon Sep 17 00:00:00 2001 From: Chenxin Zhong Date: Thu, 6 Nov 2025 21:56:57 +0800 Subject: [PATCH] Removed the unicode_to_str conversion from the SagePrettyPrinter initialization. Removed the unicode_to_str conversion from the SagePrettyPrinter initialization. --- src/sage/repl/display/formatter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/repl/display/formatter.py b/src/sage/repl/display/formatter.py index 3b73674dd48..ceea50f36eb 100644 --- a/src/sage/repl/display/formatter.py +++ b/src/sage/repl/display/formatter.py @@ -62,7 +62,6 @@ from io import StringIO from IPython.core.formatters import DisplayFormatter, PlainTextFormatter -from IPython.utils.py3compat import unicode_to_str from IPython.core.display import DisplayObject from ipywidgets import Widget @@ -311,7 +310,7 @@ def __call__(self, obj): print('---- calling ipython formatter ----') stream = StringIO() printer = SagePrettyPrinter( - stream, self.max_width, unicode_to_str(self.newline)) + stream, self.max_width, self.newline) printer.pretty(obj) printer.flush() return stream.getvalue()