Skip to content

Commit

Permalink
Deprecating Bio.EZRetrieve, Bio.NetCatch, Bio.File.SGMLHandle and Bio…
Browse files Browse the repository at this point in the history
….FilteredReader (declared obsolete in 1.50)
  • Loading branch information
peterc committed Sep 10, 2009
1 parent 2b32b93 commit bc953fa
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 17 deletions.
15 changes: 11 additions & 4 deletions Bio/EZRetrieve.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""This module contains code to access EZRetrieve (OBSOLETE).
"""This module contains code to access EZRetrieve (DEPRECATED).
This module is now deprecated, and will be removed in a future release of
Biopython.
This is a very simple interface to the EZRetrieve website described in:
Expand All @@ -11,11 +14,15 @@
Functions:
retrieve_single Retrieve a single sequence from EZRetrieve.
parse_single Parse the results from EZRetrieve into FASTA format.
This module is now considered to be obsolete, and is likely to be deprecated
in a future release of Biopython, and later removed.
"""

import warnings
warnings.warn("Bio.EZRetrieve is 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 retrieve_single(id, from_, to, retrieve_by=None, organism=None,
parse_results=1):
import urllib
Expand Down
16 changes: 12 additions & 4 deletions Bio/File.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
Classes:
UndoHandle File object decorator with support for undo-like operations.
StringHandle Wraps a file object around a string.
SGMLHandle File object that automatically strips SGML tags from data.
SGMLHandle File object that automatically strips SGML tags from data
(DEPRECATED).
SGMLStripper Object that strips SGML. This is now considered OBSOLETE, and
is likely to be deprecated in a future release of Biopython,
Expand Down Expand Up @@ -107,10 +111,8 @@ def __exit__(self, type, value, traceback):
# readlines method.
StringHandle = StringIO.StringIO



class SGMLHandle:
"""A Python handle that automatically strips SGML tags from data (OBSOLETE).
"""A Python handle that automatically strips SGML tags from data (DEPRECATED).
This module is now considered to be obsolete, and is likely to be
deprecated in a future release of Biopython, and later removed.
Expand All @@ -121,6 +123,12 @@ def __init__(self, handle):
handle is a file handle to SGML-formatted data.
"""
import warnings
warnings.warn("Bio.File.SGMLHandle is deprecated, and will be removed"\
" in a future release of Biopython. If you want to"\
" continue to use this code, please get in contact via"\
" the mailing lists to avoid its permanent removal from"\
" Biopython.", DeprecationWarning)
self._handle = handle
self._stripper = SGMLStripper()

Expand Down
14 changes: 10 additions & 4 deletions Bio/FilteredReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.

"""Code for more fancy file handles (OBSOLETE).
"""Code for more fancy file handles (DEPRECATED).
This module is now deprecated, and will be removed in a future release of
Biopython.
Classes:
Filtered is a decorator for File that allows the user to filter the output
Expand All @@ -20,11 +23,14 @@
All filters in the chain must provide the same interface with a line of text as the single
input parameter and altered text as the return value.
This module is now considered to be obsolete, and is likely to be deprecated
in a future release of Biopython, and later removed.
"""

import warnings
warnings.warn("Bio.FilteredReader is 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 developers"\
" via the mailing lists to avoid its permanent removal from"\
" Biopython.", DeprecationWarning)

def dump_saved( name, text, j ):
"""Used for debugging."""
Expand Down
15 changes: 11 additions & 4 deletions Bio/NetCatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
# license. Please see the LICENSE file that should have been included
# as part of this package.

"""Code for dealing with lists of URLs (OBSOLETE).
"""Code for dealing with lists of URLs (DEPRECATED).
This module is now deprecated, and will be removed in a future release of
Biopython.
NetCatch enables the user to scan a list of labelled urls and select
a subset to read into a file.
Expand All @@ -13,10 +16,14 @@
get_urls_by_index
get_urls_by_range
select_output_file
This module is now considered to be obsolete, and is likely to be deprecated
in a future release of Biopython, and later removed.
"""

import warnings
warnings.warn("Bio.NetCatch is 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 os
import urllib
import sgmllib
Expand Down
2 changes: 1 addition & 1 deletion DEPRECATED
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Bio.ExPASy.Enzyme, respectively.

Bio.EZRetrieve, Bio.NetCatch, Bio.File.SGMLHandle, Bio.FilteredReader
=====================================================================
Declared obsolete in Release 1.50, will be deprecated in a subsequent release.
Declared obsolete in Release 1.50, deprecated in Release 1.52.

Bio.Graphics.GenomeDiagram and colour/color, centre/center
==========================================================
Expand Down

0 comments on commit bc953fa

Please sign in to comment.