Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
is_{Real,Complex}[Double]Field: In doctests, add deprecation warning …
Browse files Browse the repository at this point in the history
…to expected output
  • Loading branch information
Matthias Koeppe committed Oct 3, 2021
1 parent fa79b10 commit 94fd9c5
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sage/rings/complex_double.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/sage/rings/complex_mpfr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/sage/rings/real_double.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/sage/rings/real_mpfr.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 94fd9c5

Please sign in to comment.