Skip to content

Commit

Permalink
Trac #20012: Really deprecate CFF/ContinuedFractionField
Browse files Browse the repository at this point in the history
The class `ContinuedFractionField` is documented as being deprecated
(see #14567) but it doesn't actually raise any warnings when used.

URL: http://trac.sagemath.org/20012
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Vincent Delecroix
  • Loading branch information
Release Manager authored and vbraun committed Feb 18, 2016
2 parents bb9491f + 7f201e6 commit 90ac40f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sage/rings/contfrac.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@
field::
sage: a = random_matrix(CFF, 4)
doctest:...: DeprecationWarning: CFF (ContinuedFractionField) is deprecated, use QQ instead
See http://trac.sagemath.org/20012 for details.
sage: a
[ [-1; 2] [-1; 1, 94] [0; 2] [-12]]
[ [-1] [0; 2] [-1; 1, 3] [0; 1, 2]]
[ [-3; 2] [0] [0; 1, 2] [-1]]
[ [1] [-1] [0; 3] [1]]
sage: f = a.charpoly()
doctest:...: DeprecationWarning: CFF (ContinuedFractionField) is deprecated, use QQ instead
See http://trac.sagemath.org/20012 for details.
sage: f
[1]*x^4 + ([-2; 3])*x^3 + [14; 1, 1, 1, 9, 1, 8]*x^2 + ([-13; 4, 1, 2, 1, 1, 1, 1, 1, 2, 2])*x + [-6; 1, 5, 9, 1, 5]
sage: f(a)
Expand All @@ -40,6 +44,7 @@
from sage.structure.element import FieldElement

from continued_fraction import ContinuedFraction_periodic, ZZ_0
from sage.misc.superseded import deprecation

class ContinuedFractionField(UniqueRepresentation,Field):
"""
Expand Down Expand Up @@ -94,6 +99,7 @@ def __init__(self, x1, x2=None):
sage: TestSuite(CFF.an_element()).run()
"""
deprecation(20012, "CFF (ContinuedFractionField) is deprecated, use QQ instead")
ContinuedFraction_periodic.__init__(self, x1)
FieldElement.__init__(self, parent=CFF)

Expand Down

0 comments on commit 90ac40f

Please sign in to comment.