From c30b65bf1ae9229bd8c3b09ddf61f70ae7483154 Mon Sep 17 00:00:00 2001 From: mmatera Date: Sun, 17 Nov 2024 12:19:12 -0300 Subject: [PATCH] accepting the s attribute, but with a warning. --- sympy/printing/pretty/stringpict.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/sympy/printing/pretty/stringpict.py b/sympy/printing/pretty/stringpict.py index b817376a7c66..4c09f70bab11 100644 --- a/sympy/printing/pretty/stringpict.py +++ b/sympy/printing/pretty/stringpict.py @@ -504,6 +504,26 @@ def root(self, index=None): return result.left(root_sign, align="b") + @property + def s(self): + sympy_deprecation_warning( + ("The attribute `s` of `StringPict` is deprecated since Sympy=1.14." + "Use `text` instead."), + deprecated_since_version="1.14", + active_deprecations_target="deprecated-pretty-printing-functions", + ) + return self.text + + @s.setter + def s(self, value): + sympy_deprecation_warning( + ("The attribute `s` of `StringPict` is deprecated since Sympy=1.14." + "Use `text` instead."), + active_deprecations_target="deprecated-pretty-printing-functions", + ) + self.text = value + return self.text + def subindex(self, sub_index): """Add a `subindex`.