mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Update xml for 3.14 (#14119)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from _typeshed import ReadableBuffer, StrPath, SupportsRead, _T_co
|
||||
from collections.abc import Iterable
|
||||
from typing import Protocol
|
||||
@@ -10,7 +11,7 @@ from xml.sax._exceptions import (
|
||||
SAXReaderNotAvailable as SAXReaderNotAvailable,
|
||||
)
|
||||
from xml.sax.handler import ContentHandler as ContentHandler, ErrorHandler as ErrorHandler
|
||||
from xml.sax.xmlreader import XMLReader
|
||||
from xml.sax.xmlreader import InputSource as InputSource, XMLReader
|
||||
|
||||
class _SupportsReadClose(SupportsRead[_T_co], Protocol[_T_co]):
|
||||
def close(self) -> None: ...
|
||||
@@ -23,3 +24,19 @@ def make_parser(parser_list: Iterable[str] = ()) -> XMLReader: ...
|
||||
def parse(source: _Source, handler: ContentHandler, errorHandler: ErrorHandler = ...) -> None: ...
|
||||
def parseString(string: ReadableBuffer | str, handler: ContentHandler, errorHandler: ErrorHandler | None = ...) -> None: ...
|
||||
def _create_parser(parser_name: str) -> XMLReader: ...
|
||||
|
||||
if sys.version_info >= (3, 14):
|
||||
__all__ = [
|
||||
"ContentHandler",
|
||||
"ErrorHandler",
|
||||
"InputSource",
|
||||
"SAXException",
|
||||
"SAXNotRecognizedException",
|
||||
"SAXNotSupportedException",
|
||||
"SAXParseException",
|
||||
"SAXReaderNotAvailable",
|
||||
"default_parser_list",
|
||||
"make_parser",
|
||||
"parse",
|
||||
"parseString",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user