8000 move pyexpat.ExpatError to xml.parsers.expat.ExpatError by tungol · Pull Request #11168 · python/typeshed · GitHub
[go: up one dir, main page]

Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
move pyexpat.ExpatError to xml.parsers.expat.ExpatError
This matches the name reported by the cass at runtime.

related to #11141
  • Loading branch information
tungol committed Dec 15, 2023
commit 344673f4872ae613288e18c3188cfd9a76f20882
6 changes: 1 addition & 5 deletions stdlib/pyexpat/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ from collections.abc import Callable
from pyexpat import errors as errors, model as model
from typing import Any
from typing_extensions import TypeAlias, final
from xml.parsers.expat import ExpatError as ExpatError

EXPAT_VERSION: 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: int
Expand Down
6 changes: 6 additions & 0 deletions stdlib/xml/parsers/expat/__init__.pyi
Original file line number Diff line number Diff line change
@@ -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
0