def lineage(resource):
    """
    Return all the parents of *resource*.

    Deprecated, do not use.

    .. deprecated:: 1.0
       This doesn't use the :class:`zope.location.interfaces.ILocationInfo`
       interface, and hence doesn't let the *resource* have customizations
       and ignores problems in the resource tree.
    """
    while resource is not None:
        yield resource
        try:
            resource = resource.__parent__
        except AttributeError:
            resource = None
