[Biopython-dev] Bio.File

Michiel de Hoon mjldehoon at yahoo.com
Wed Sep 7 13:53:22 UTC 2011


Hi all,

Bio.File makes three classes available:
Bio.File.UndoHandle
Bio.File.StringHandle (which simply points to StringIO.StringIO)
Bio.File.SGMLStripper (which has a pending deprecation warning)

Bio.File.StringHandle is currently used only in Bio.Blast.NCBIStandalone and Bio.ParserSupport, both of which now have a pending deprecation warning.

Bio.File.UndoHandle is used in three modules that now have a pending deprecation warning (Bio.Blast.NCBIStandalone, Bio.ParserSupport, Bio.UniGene.UniGene), as well as in Bio.SCOP.__init__. I don't know why the UndoHandle is used in that module; the relevant code looks like this:

def _open(cgi, params={}, get=1):
    ...
    handle = urllib.urlopen(cgi, options)
    uhandle = File.UndoHandle(handle)
    return uhandle

If there is no pressing reason for using File.UndoHandle here and we can remove it, then we could add a PendingDeprecationWarning to Bio.File.

Best,
--Michiel.



More information about the Biopython-dev mailing list