Permalink
Browse files

Deprecating Bio.mathfns and Bio.stringfns

  • Loading branch information...
1 parent 110056a commit 8b4babf0c38ccdc68fca5f46d7757a59d261b24f @peterjc peterjc committed Nov 22, 2008
Showing with 29 additions and 9 deletions.
  1. +13 −4 Bio/mathfns.py
  2. +13 −4 Bio/stringfns.py
  3. +3 −1 DEPRECATED
View
@@ -3,11 +3,11 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.
-"""This provides useful general math tools (OBSOLETE).
+"""This provides useful general math tools (DEPRECATED).
-This module and its C code equivalent are considered to be obsolete, and
-are likely to be deprecated in a future release of Biopython, before being
-removed. Please get in touch via the mailing list if this will affect you.
+This module and its C code equivalent are considered to be deprecated, and
+are likely to be removed in a future release of Biopython. Please get in
+touch via the mailing list if this will affect you.
Functions:
fcmp Compare two floating point numbers, up to a specified precision.
@@ -16,6 +16,15 @@
safe_exp exp, but returns a large or small number instead of overflows.
"""
+import warnings
+warnings.warn("Bio.mathfns and its C code equivalent Bio.cmathfns are" \
+ +" deprecated, and will be removed in a future release of"\
+ +" Biopython. If you want to continue to use this code,"\
+ +" please get in contact with the Biopython developers via"\
+ +" the mailing lists to avoid its permanent removal from"\
+ +" Biopython.", \
+ DeprecationWarning)
+
import math
def fcmp(x, y, precision):
View
@@ -3,11 +3,11 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.
-"""This provides useful general functions for working with strings (OBSOLETE).
+"""This provides useful general functions for working with strings (DEPRECATED).
-This module and its C code equivalent are considered to be obsolete, and
-are likely to be deprecated in a future release of Biopython, before being
-removed. Please get in touch via the mailing list if this will affect you.
+This module and its C code equivalent are considered to be deprecated, and
+are likely to be removed in a future release of Biopython. Please get in
+touch via the mailing list if this will affect you.
Functions:
splitany Split a string using many delimiters.
@@ -16,6 +16,15 @@
starts_with Check whether a string starts with another string [DEPRECATED].
"""
+import warnings
+warnings.warn("Bio.stringfns and its C code equivalent Bio.cstringfns are" \
+ +" deprecated, and will be removed in a future release of"\
+ +" Biopython. If you want to continue to use this code,"\
+ +" please get in contact with the Biopython developers via"\
+ +" the mailing lists to avoid its permanent removal from"\
+ +" Biopython.", \
+ DeprecationWarning)
+
def splitany(s, sep=" \011\012\013\014\015", maxsplit=None, negate=0):
"""splitany(s [,sep [,maxsplit [,negate]]]) -> list of strings
View
@@ -5,7 +5,7 @@ to find documentation about how to update your code to work again.
Numeric support
===============
Following the release of 1.48, Numeric support in Biopython is discontinued.
-Please move to NumPy.
+Please move to NumPy for Biopython 1.49 or later.
Bio.Seq
=======
@@ -21,6 +21,8 @@ Please use the methods or functions in Bio.Seq instead.
Bio.mathfns, Bio.stringfns and Bio.listfns (and their C code variants)
==========================================
Declared obsolete in Release 1.49.
+Bio.mathfns and Bio.stringfns were deprecated in Release 1.50
+(the deprecation of Bio.listfns is still pending)
Bio.Ndb
=======

0 comments on commit 8b4babf

Please sign in to comment.