Bump tomllib.TOMLDecodeError to 3.14 (#14019)

This commit is contained in:
Semyon Moroz
2025-05-12 09:31:37 +00:00
committed by GitHub
parent 06f3fc9fd7
commit b8f754f538
2 changed files with 18 additions and 3 deletions
@@ -160,7 +160,6 @@ tarfile.TarFile.zstopen
threading.Thread.__init__
threading._RLock.locked
tkinter.Event.__class_getitem__
tomllib.TOMLDecodeError.__init__
turtle.__all__
turtle.RawTurtle.fill
turtle.RawTurtle.poly
+18 -2
View File
@@ -1,10 +1,26 @@
import sys
from _typeshed import SupportsRead
from collections.abc import Callable
from typing import Any
from typing import Any, overload
from typing_extensions import deprecated
__all__ = ("loads", "load", "TOMLDecodeError")
class TOMLDecodeError(ValueError): ...
if sys.version_info >= (3, 14):
class TOMLDecodeError(ValueError):
msg: str
doc: str
pos: int
lineno: int
colno: int
@overload
def __init__(self, msg: str, doc: str, pos: int) -> None: ...
@overload
@deprecated("Deprecated in Python 3.14; Please set 'msg', 'doc' and 'pos' arguments only.")
def __init__(self, msg: str | type = ..., doc: str | type = ..., pos: int | type = ..., *args: Any) -> None: ...
else:
class TOMLDecodeError(ValueError): ...
def load(fp: SupportsRead[bytes], /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...
def loads(s: str, /, *, parse_float: Callable[[str], Any] = ...) -> dict[str, Any]: ...