move pyexpat.ExpatError to xml.parsers.expat.ExpatError (#11168)

This matches the name reported by the cass at runtime.

related to https://github.com/python/typeshed/issues/11141

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Stephen Morton
2024-10-01 18:45:11 -07:00
committed by GitHub
parent bdb5b52d50
commit ddb57608fd
2 changed files with 7 additions and 5 deletions

View File

@@ -3,17 +3,13 @@ from collections.abc import Callable
from pyexpat import errors as errors, model as model
from typing import Any, Final, final
from typing_extensions import TypeAlias
from xml.parsers.expat import ExpatError as ExpatError
EXPAT_VERSION: Final[str] # undocumented
version_info: tuple[int, int, int] # undocumented
native_encoding: str # undocumented
features: list[tuple[str, int]] # undocumented
class ExpatError(Exception):
code: int
lineno: int
offset: int
error = ExpatError
XML_PARAM_ENTITY_PARSING_NEVER: Final = 0
XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE: Final = 1

View File

@@ -1 +1,7 @@
from pyexpat import *
# This is actually implemented in the C module pyexpat, but considers itself to live here.
class ExpatError(Exception):
code: int
lineno: int
offset: int