8000 move pyexpat.ExpatError to xml.parsers.expat.ExpatError (#11168) · python/typeshed@ddb5760 · GitHub
[go: up one dir, main page]

Skip to content

Commit ddb5760

Browse files
move pyexpat.ExpatError to xml.parsers.expat.ExpatError (#11168)
This matches the name reported by the cass at runtime. related to #11141 Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent bdb5b52 commit ddb5760

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

stdlib/pyexpat/__init__.pyi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@ from collections.abc import Callable
33
from pyexpat import errors as errors, model as model
44
from typing import Any, Final, final
55
from typing_extensions import TypeAlias
6+
from xml.parsers.expat import ExpatError as ExpatError
67

78
EXPAT_VERSION: Final[str] # undocumented
89
version_info: tuple[int, int, int] # undocumented
910
native_encoding: str # undocumented
1011
features: list[tuple[str, int]] # undocumented
1112

12-
class ExpatError(Exception):
13-
code: int
14-
lineno: int
15-
offset: int
16-
1713
error = ExpatError
1814
XML_PARAM_ENTITY_PARSING_NEVER: Final = 0
1915
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: Final = 1

stdlib/xml/parsers/expat/__init__.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
from pyexpat import *
2+
3+
# This is actually implemented in the C module pyexpat, but considers itself to live here.
4+
class ExpatError(Exception):
5+
code: int
6+
lineno: int
7+
offset: int

0 commit comments

Comments
 (0)
0