Better definition for xml/sax/__init__.pyi. (#621)

Also, merge 2.7/xml/sax and 3/xml/sax into 2and3/xml/sax.
This commit is contained in:
Matthias Kramm
2016-10-19 15:30:25 -07:00
committed by Guido van Rossum
parent 8fec896898
commit 7d80824092
7 changed files with 32 additions and 20 deletions

View File

@@ -1,20 +0,0 @@
# Stubs for xml.sax (Python 2.7)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class SAXException(Exception):
def __init__(self, msg, exception=None): ...
def getMessage(self): ...
def getException(self): ...
def __getitem__(self, ix): ...
class SAXParseException(SAXException):
def __init__(self, msg, exception, locator): ...
def getColumnNumber(self): ...
def getLineNumber(self): ...
def getPublicId(self): ...
def getSystemId(self): ...
class SAXNotRecognizedException(SAXException): ...
class SAXNotSupportedException(SAXException): ...
class SAXReaderNotAvailable(SAXNotSupportedException): ...

View File

@@ -1,50 +0,0 @@
# Stubs for xml.sax.handler (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Any
version = ... # type: Any
class ErrorHandler:
def error(self, exception): ...
def fatalError(self, exception): ...
def warning(self, exception): ...
class ContentHandler:
def __init__(self) -> None: ...
def setDocumentLocator(self, locator): ...
def startDocument(self): ...
def endDocument(self): ...
def startPrefixMapping(self, prefix, uri): ...
def endPrefixMapping(self, prefix): ...
def startElement(self, name, attrs): ...
def endElement(self, name): ...
def startElementNS(self, name, qname, attrs): ...
def endElementNS(self, name, qname): ...
def characters(self, content): ...
def ignorableWhitespace(self, whitespace): ...
def processingInstruction(self, target, data): ...
def skippedEntity(self, name): ...
class DTDHandler:
def notationDecl(self, name, publicId, systemId): ...
def unparsedEntityDecl(self, name, publicId, systemId, ndata): ...
class EntityResolver:
def resolveEntity(self, publicId, systemId): ...
feature_namespaces = ... # type: Any
feature_namespace_prefixes = ... # type: Any
feature_string_interning = ... # type: Any
feature_validation = ... # type: Any
feature_external_ges = ... # type: Any
feature_external_pes = ... # type: Any
all_features = ... # type: Any
property_lexical_handler = ... # type: Any
property_declaration_handler = ... # type: Any
property_dom_node = ... # type: Any
property_xml_string = ... # type: Any
property_encoding = ... # type: Any
property_interning_dict = ... # type: Any
all_properties = ... # type: Any

View File

@@ -1,58 +0,0 @@
# Stubs for xml.sax.saxutils (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from typing import Mapping
from xml.sax import handler
from xml.sax import xmlreader
def escape(data: str, entities: Mapping[str, str] = ...) -> str: ...
def unescape(data: str, entities: Mapping[str, str] = ...) -> str: ...
def quoteattr(data: str, entities: Mapping[str, str] = ...) -> str: ...
class XMLGenerator(handler.ContentHandler):
def __init__(self, out=..., encoding=...) -> None: ...
def startDocument(self): ...
def endDocument(self): ...
def startPrefixMapping(self, prefix, uri): ...
def endPrefixMapping(self, prefix): ...
def startElement(self, name, attrs): ...
def endElement(self, name): ...
def startElementNS(self, name, qname, attrs): ...
def endElementNS(self, name, qname): ...
def characters(self, content): ...
def ignorableWhitespace(self, content): ...
def processingInstruction(self, target, data): ...
class XMLFilterBase(xmlreader.XMLReader):
def __init__(self, parent=...) -> None: ...
def error(self, exception): ...
def fatalError(self, exception): ...
def warning(self, exception): ...
def setDocumentLocator(self, locator): ...
def startDocument(self): ...
def endDocument(self): ...
def startPrefixMapping(self, prefix, uri): ...
def endPrefixMapping(self, prefix): ...
def startElement(self, name, attrs): ...
def endElement(self, name): ...
def startElementNS(self, name, qname, attrs): ...
def endElementNS(self, name, qname): ...
def characters(self, content): ...
def ignorableWhitespace(self, chars): ...
def processingInstruction(self, target, data): ...
def skippedEntity(self, name): ...
def notationDecl(self, name, publicId, systemId): ...
def unparsedEntityDecl(self, name, publicId, systemId, ndata): ...
def resolveEntity(self, publicId, systemId): ...
def parse(self, source): ...
def setLocale(self, locale): ...
def getFeature(self, name): ...
def setFeature(self, name, state): ...
def getProperty(self, name): ...
def setProperty(self, name, value): ...
def getParent(self): ...
def setParent(self, parent): ...
def prepare_input_source(source, base=...): ...

View File

@@ -1,75 +0,0 @@
# Stubs for xml.sax.xmlreader (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
class XMLReader:
def __init__(self) -> None: ...
def parse(self, source): ...
def getContentHandler(self): ...
def setContentHandler(self, handler): ...
def getDTDHandler(self): ...
def setDTDHandler(self, handler): ...
def getEntityResolver(self): ...
def setEntityResolver(self, resolver): ...
def getErrorHandler(self): ...
def setErrorHandler(self, handler): ...
def setLocale(self, locale): ...
def getFeature(self, name): ...
def setFeature(self, name, state): ...
def getProperty(self, name): ...
def setProperty(self, name, value): ...
class IncrementalParser(XMLReader):
def __init__(self, bufsize=...) -> None: ...
def parse(self, source): ...
def feed(self, data): ...
def prepareParser(self, source): ...
def close(self): ...
def reset(self): ...
class Locator:
def getColumnNumber(self): ...
def getLineNumber(self): ...
def getPublicId(self): ...
def getSystemId(self): ...
class InputSource:
def __init__(self, system_id=...) -> None: ...
def setPublicId(self, public_id): ...
def getPublicId(self): ...
def setSystemId(self, system_id): ...
def getSystemId(self): ...
def setEncoding(self, encoding): ...
def getEncoding(self): ...
def setByteStream(self, bytefile): ...
def getByteStream(self): ...
def setCharacterStream(self, charfile): ...
def getCharacterStream(self): ...
class AttributesImpl:
def __init__(self, attrs) -> None: ...
def getLength(self): ...
def getType(self, name): ...
def getValue(self, name): ...
def getValueByQName(self, name): ...
def getNameByQName(self, name): ...
def getQNameByName(self, name): ...
def getNames(self): ...
def getQNames(self): ...
def __len__(self): ...
def __getitem__(self, name): ...
def keys(self): ...
def has_key(self, name): ...
def __contains__(self, name): ...
def get(self, name, alternative=...): ...
def copy(self): ...
def items(self): ...
def values(self): ...
class AttributesNSImpl(AttributesImpl):
def __init__(self, attrs, qnames) -> None: ...
def getValueByQName(self, name): ...
def getNameByQName(self, name): ...
def getQNameByName(self, name): ...
def getQNames(self): ...
def copy(self): ...