Skip to content

Commit

Permalink
Deprecate Bio.utils, Bio.PropertyManager and Bio.Encodings (see maili…
Browse files Browse the repository at this point in the history
…ng list)
  • Loading branch information
peterjc committed Sep 9, 2010
1 parent d6caa36 commit 28a7dae
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 19 deletions.
4 changes: 4 additions & 0 deletions Bio/Alphabet/IUPAC.py
Expand Up @@ -97,6 +97,10 @@ class IUPACUnambiguousRNA(IUPACAmbiguousRNA):
# # W == wyosine


# ====================================================================
# TODO - Remove all the following code using now deprecated modules
# Bio.PropertyManager, Bio.Encoding (all used by Bio.utils)
#
# We need to load the property resolution information, but we need to
# wait until after the systems have been loaded. (There's a nasty loop
# where, eg, translation objects need an alphabet, which need to be
Expand Down
8 changes: 8 additions & 0 deletions Bio/Encodings/IUPACEncoding.py
@@ -1,3 +1,11 @@
"""Properties once used for transcription and translation (DEPRECATED).
This module is deprecated, and is expected to be removed in the next release.
If you use this module, please contact the Biopython developers via the
mailing lists.
"""
#NOTE - Adding a deprecation warning would affect Bio.Alphabet.IUPAC

# Set up the IUPAC alphabet properties


Expand Down
10 changes: 6 additions & 4 deletions Bio/Encodings/__init__.py
@@ -1,7 +1,9 @@
# This is a Python module.
"""Properties for functionality such as transcription and translation (OBSOLETE).
"""Properties once used for transcription and translation (DEPRECATED).
This module is obsolete, and is likely to be deprecated in a future version
of Biopython, and to be removed after that. If you use this module, please
contact the Biopython developers at biopython-dev@biopython.org.
This module is deprecated, and is expected to be removed in the next release.
If you use this module, please contact the Biopython developers via the
mailing lists.
"""

#NOTE - Adding a deprecation warning would affect Bio.Alphabet.IUPAC
9 changes: 5 additions & 4 deletions Bio/PropertyManager.py
@@ -1,9 +1,10 @@
"""Stores properties associated with the class of an object (OBSOLETE).
"""Stores properties associated with the class of an object (DEPRECATED).
This module is obsolete, and is likely to be deprecated in a future version
of Biopython, and to be removed after that. If you use this module, please
contact the Biopython developers at biopython-dev@biopython.org.
This module is deprecated, and is expected to be removed in the next release.
If you use this module, please contact the Biopython developers via the
mailing lists.
"""
#NOTE - Adding a deprecation warning would affect Bio.Alphabet.IUPAC


# Would it be nice to have support for more than one resolver per
Expand Down
19 changes: 11 additions & 8 deletions Bio/utils.py
Expand Up @@ -4,13 +4,16 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.

"""Miscellaneous functions for dealing with sequences (OBSOLETE).
"""Miscellaneous functions for dealing with sequences (DEPRECATED).
This module is obsolete, and is likely to be deprecated in a future version
of Biopython, and to be removed after that. If you use this module, please
contact the Biopython developers at biopython-dev@biopython.org.
This module is deprecated, and is expected to be removed in the next release.
If you use this module, please contact the Biopython developers via the
mailing lists.
"""

import warnings
warnings.warn("Bio.utils has been deprecated, and we intend to remove it in "
"the next release of Biopython.", DeprecationWarning)


import Seq
Expand All @@ -23,10 +26,10 @@ def ungap(seq):
#TODO - Fix this? It currently assumes the outmost AlphabetEncoder
#is for the gap. Consider HasStopCodon(Gapped(Protein())) as a test case.
import warnings
warnings.warn("Bio.utils.ungap() has been deprecated, and we"
" intend to remove it in a future release of Biopython."
" Instead, please use the ungap method of the Seq object "
" (added in Biopython 1.53).",
warnings.warn("Bio.utils has been deprecated, and we intend to remove it "
"in the next release of Biopython. Instead of function "
"Bio.utils.ungap please use the ungap method of the Seq "
"object (added in Biopython 1.53).",
DeprecationWarning)
gap = seq.gap_char
letters = []
Expand Down
7 changes: 4 additions & 3 deletions DEPRECATED
Expand Up @@ -18,11 +18,11 @@ An explicit warning was added to setup.py for Biopython 1.55.

Bio.Encodings
=============
Declared obsolete in Release 1.55.
Explicitly declared obsolete in Release 1.55, and deprecated in Release 1.56.

Bio.PropertyManager
===================
Declared obsolete in Biopython 1.55.
Explicitly declared obsolete in Release 1.55, and deprecated in Release 1.56.

Bio.InterPro
============
Expand Down Expand Up @@ -423,7 +423,8 @@ Bio.utils
Functions 'translate', 'translate_to_stop', 'back_translate', 'transcribe',
and 'back_transcribe' were deprecated in Release 1.49, and removed in Release
1.53. Function 'ungap' was deprecated in Release 1.53. Use Bio.Seq instead.
The whole of Bio.utils was declared obsolete in Release 1.55.
The whole of Bio.utils was declared obsolete in Release 1.55, and deprecated
in Biopython 1.56.

Bio.Motif
=========
Expand Down

0 comments on commit 28a7dae

Please sign in to comment.