Skip to content

Commit

Permalink
Deprecating Bio.mathfns and Bio.stringfns
Browse files Browse the repository at this point in the history
  • Loading branch information
peterc committed Nov 22, 2008
1 parent 110056a commit 8b4babf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 9 deletions.
17 changes: 13 additions & 4 deletions Bio/mathfns.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# license. Please see the LICENSE file that should have been included # license. Please see the LICENSE file that should have been included
# as part of this package. # 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 This module and its C code equivalent are considered to be deprecated, and
are likely to be deprecated in a future release of Biopython, before being are likely to be removed in a future release of Biopython. Please get in
removed. Please get in touch via the mailing list if this will affect you. touch via the mailing list if this will affect you.
Functions: Functions:
fcmp Compare two floating point numbers, up to a specified precision. fcmp Compare two floating point numbers, up to a specified precision.
Expand All @@ -16,6 +16,15 @@
safe_exp exp, but returns a large or small number instead of overflows. 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 import math


def fcmp(x, y, precision): def fcmp(x, y, precision):
Expand Down
17 changes: 13 additions & 4 deletions Bio/stringfns.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# license. Please see the LICENSE file that should have been included # license. Please see the LICENSE file that should have been included
# as part of this package. # 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 This module and its C code equivalent are considered to be deprecated, and
are likely to be deprecated in a future release of Biopython, before being are likely to be removed in a future release of Biopython. Please get in
removed. Please get in touch via the mailing list if this will affect you. touch via the mailing list if this will affect you.
Functions: Functions:
splitany Split a string using many delimiters. splitany Split a string using many delimiters.
Expand All @@ -16,6 +16,15 @@
starts_with Check whether a string starts with another string [DEPRECATED]. 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): def splitany(s, sep=" \011\012\013\014\015", maxsplit=None, negate=0):
"""splitany(s [,sep [,maxsplit [,negate]]]) -> list of strings """splitany(s [,sep [,maxsplit [,negate]]]) -> list of strings
Expand Down
4 changes: 3 additions & 1 deletion DEPRECATED
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ to find documentation about how to update your code to work again.
Numeric support Numeric support
=============== ===============
Following the release of 1.48, Numeric support in Biopython is discontinued. 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 Bio.Seq
======= =======
Expand All @@ -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) Bio.mathfns, Bio.stringfns and Bio.listfns (and their C code variants)
========================================== ==========================================
Declared obsolete in Release 1.49. 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 Bio.Ndb
======= =======
Expand Down

0 comments on commit 8b4babf

Please sign in to comment.