As bioinformatics and computational biology are developing quickly, some of previously developed Biopython modules may no longer be relevant in today’s world. To keep the code base clean, we aim to deprecate and remove such code from Biopython, while avoiding any nasty surprises for users who may be relying on older code.
We use the same process to deprecate obsolete modules, methods, functions and classes.
We keep a plain text file in the Biopython source code to record these
This is the current policy for deprecating and removing code from Biopython:
BiopythonDeprecationWarningto the code (Python’s
DeprecationWarningis silent by default):
import warnings from Bio import BiopythonDeprecationWarning warnings.warn( "Bio.SomeModule has been deprecated, and we intend to remove it" " in a future release of Biopython. Please use the SomeOtherModule" " instead, as described in the Tutorial. If you would like to" " continue using Bio.SomeModule, please contact the Biopython" " developers via the mailing list or GitHub.", BiopythonDeprecationWarning, )
from Bio import SomeModulereplace that with:
from Bio import BiopythonDeprecationWarning with warnings.catch_warnings(): warnings.simplefilter("ignore", BiopythonDeprecationWarning) from Bio import SomeModule
See here for the discussion on the mailing list: