From 94fd9c52828b628f2417aa85ce2fe694545424a6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 3 Oct 2021 09:48:50 -0700 Subject: [PATCH] is_{Real,Complex}[Double]Field: In doctests, add deprecation warning to expected output --- src/sage/rings/complex_double.pyx | 4 ++++ src/sage/rings/complex_mpfr.pyx | 4 ++++ src/sage/rings/real_double.pyx | 4 ++++ src/sage/rings/real_mpfr.pyx | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/sage/rings/complex_double.pyx b/src/sage/rings/complex_double.pyx index 6977939b789..7a2d45d1028 100644 --- a/src/sage/rings/complex_double.pyx +++ b/src/sage/rings/complex_double.pyx @@ -123,6 +123,10 @@ def is_ComplexDoubleField(x): sage: from sage.rings.complex_double import is_ComplexDoubleField sage: is_ComplexDoubleField(CDF) + doctest:warning... + DeprecationWarning: is_ComplexDoubleField is deprecated; + use isinstance(..., sage.rings.abc.ComplexDoubleField) instead + See https://trac.sagemath.org/32610 for details. True sage: is_ComplexDoubleField(ComplexField(53)) False diff --git a/src/sage/rings/complex_mpfr.pyx b/src/sage/rings/complex_mpfr.pyx index d51bbdbc469..3021ab5d177 100644 --- a/src/sage/rings/complex_mpfr.pyx +++ b/src/sage/rings/complex_mpfr.pyx @@ -169,6 +169,10 @@ def is_ComplexField(x): sage: from sage.rings.complex_mpfr import is_ComplexField as is_CF sage: is_CF(ComplexField()) + doctest:warning... + DeprecationWarning: is_ComplexField is deprecated; + use isinstance(..., sage.rings.abc.ComplexField) instead + See https://trac.sagemath.org/32610 for details. True sage: is_CF(ComplexField(12)) True diff --git a/src/sage/rings/real_double.pyx b/src/sage/rings/real_double.pyx index bccbc382bff..d3ad8ecfb0e 100644 --- a/src/sage/rings/real_double.pyx +++ b/src/sage/rings/real_double.pyx @@ -84,6 +84,10 @@ def is_RealDoubleField(x): sage: from sage.rings.real_double import is_RealDoubleField sage: is_RealDoubleField(RDF) + doctest:warning... + DeprecationWarning: is_RealDoubleField is deprecated; + use isinstance(..., sage.rings.abc.RealDoubleField) instead + See https://trac.sagemath.org/32610 for details. True sage: is_RealDoubleField(RealField(53)) False diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx index cefe99b6c1c..bd9b7931463 100644 --- a/src/sage/rings/real_mpfr.pyx +++ b/src/sage/rings/real_mpfr.pyx @@ -5906,6 +5906,10 @@ def is_RealField(x): EXAMPLES:: sage: sage.rings.real_mpfr.is_RealField(RR) + doctest:warning... + DeprecationWarning: is_RealField is deprecated; + use isinstance(..., sage.rings.abc.RealField) instead + See https://trac.sagemath.org/32610 for details. True sage: sage.rings.real_mpfr.is_RealField(CC) False