[xmltodict] Update to 1.0.* (#14712)

This commit is contained in:
Semyon Moroz
2025-09-19 13:44:02 +04:00
committed by GitHub
parent 617f42394b
commit 14c08738c1
3 changed files with 57 additions and 19 deletions
+1
View File
@@ -92,6 +92,7 @@
"stubs/tqdm",
"stubs/vobject",
"stubs/workalendar",
"stubs/xmltodict",
],
"typeCheckingMode": "strict",
// TODO: Complete incomplete stubs
+1 -1
View File
@@ -1,2 +1,2 @@
version = "0.15.*"
version = "1.0.*"
upstream_repository = "https://github.com/martinblech/xmltodict"
+55 -18
View File
@@ -1,38 +1,75 @@
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
from _typeshed import Incomplete, ReadableBuffer, SupportsRead, SupportsWrite
from collections import OrderedDict
from collections.abc import Mapping
from types import GeneratorType
from typing import Any, overload
from typing import Any, Final, overload
__license__: str
__author__: Final[str]
__version__: Final[str]
__license__: Final[str]
class ParsingInterrupted(Exception): ...
def parse(
xml_input: str | ReadableBuffer | SupportsRead[bytes] | GeneratorType[ReadableBuffer, Any, Any],
encoding: str | None = ...,
encoding: str | None = None,
expat: Any = ...,
process_namespaces: bool = ...,
namespace_separator: str = ...,
disable_entities: bool = ...,
process_comments: bool = ...,
**kwargs: Any,
process_namespaces: bool = False,
namespace_separator: str = ":",
disable_entities: bool = True,
process_comments: bool = False,
*,
item_depth: int = 0,
item_callback=...,
xml_attribs: bool = True,
attr_prefix="@",
cdata_key="#text",
force_cdata: bool | Incomplete = False,
cdata_separator="",
postprocessor=None,
dict_constructor: type = ...,
strip_whitespace: bool = True,
namespaces=None,
force_list: bool | Incomplete = None,
comment_key: str = "#comment",
) -> OrderedDict[str, Any]: ...
@overload
def unparse(
input_dict: Mapping[str, Any],
output: SupportsWrite[bytes] | SupportsWrite[str],
encoding: str = ...,
full_document: bool = ...,
short_empty_elements: bool = ...,
**kwargs: Any,
encoding: str = "utf-8",
full_document: bool = True,
short_empty_elements: bool = False,
comment_key: str = "#comment",
*,
attr_prefix: str = "@",
cdata_key="#text",
depth: int = 0,
preprocessor=None,
pretty: bool = False,
newl: str = "\n",
indent: str | int = "\t",
namespace_separator: str = ":",
namespaces=None,
expand_iter=None,
) -> None: ...
@overload
def unparse(
input_dict: Mapping[str, Any],
output: None = ...,
encoding: str = ...,
full_document: bool = ...,
short_empty_elements: bool = ...,
**kwargs: Any,
output: None = None,
encoding: str = "utf-8",
full_document: bool = True,
short_empty_elements: bool = False,
comment_key: str = "#comment",
*,
attr_prefix: str = "@",
cdata_key="#text",
depth: int = 0,
preprocessor=None,
pretty: bool = False,
newl: str = "\n",
indent: str | int = "\t",
namespace_separator: str = ":",
namespaces=None,
expand_iter=None,
) -> str: ...