def __init__(self, path):
        """
        Run the parser on a file.

        @param path: The file from which to load the XML.
        @type path: L{FilePath}
        """
        if not isinstance(path, FilePath):
            warnings.warn(
                "Passing filenames or file objects to XMLFile is deprecated "
                "since Twisted 12.1.  Pass a FilePath instead.",
                category=DeprecationWarning, stacklevel=2)
        self._loadedTemplate = None
        self._path = path

        Run the parser on a file.

        @param path: The file from which to load the XML.
        @type path: L{FilePath}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/template.py