mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-07 05:54:02 +08:00
Update marshal.dump(s) for 3.14 (#14059)
This commit is contained in:
@@ -74,8 +74,6 @@ importlib.machinery.AppleFrameworkLoader
|
||||
importlib.util.__all__
|
||||
importlib.util.Loader
|
||||
logging.handlers.SysLogHandler.__init__
|
||||
marshal.dump
|
||||
marshal.dumps
|
||||
multiprocessing.forkserver.main
|
||||
multiprocessing.managers.BaseListProxy.clear
|
||||
multiprocessing.managers.BaseListProxy.copy
|
||||
|
||||
+14
-6
@@ -2,10 +2,10 @@ import builtins
|
||||
import sys
|
||||
import types
|
||||
from _typeshed import ReadableBuffer, SupportsRead, SupportsWrite
|
||||
from typing import Any
|
||||
from typing import Any, Final
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
version: int
|
||||
version: Final[int]
|
||||
|
||||
_Marshallable: TypeAlias = (
|
||||
# handled in w_object() in marshal.c
|
||||
@@ -28,14 +28,22 @@ _Marshallable: TypeAlias = (
|
||||
| ReadableBuffer
|
||||
)
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
if sys.version_info >= (3, 14):
|
||||
def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 5, /, *, allow_code: bool = True) -> None: ...
|
||||
def dumps(value: _Marshallable, version: int = 5, /, *, allow_code: bool = True) -> bytes: ...
|
||||
|
||||
elif sys.version_info >= (3, 13):
|
||||
def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 4, /, *, allow_code: bool = True) -> None: ...
|
||||
def load(file: SupportsRead[bytes], /, *, allow_code: bool = True) -> Any: ...
|
||||
def dumps(value: _Marshallable, version: int = 4, /, *, allow_code: bool = True) -> bytes: ...
|
||||
def loads(bytes: ReadableBuffer, /, *, allow_code: bool = True) -> Any: ...
|
||||
|
||||
else:
|
||||
def dump(value: _Marshallable, file: SupportsWrite[bytes], version: int = 4, /) -> None: ...
|
||||
def load(file: SupportsRead[bytes], /) -> Any: ...
|
||||
def dumps(value: _Marshallable, version: int = 4, /) -> bytes: ...
|
||||
|
||||
if sys.version_info >= (3, 13):
|
||||
def load(file: SupportsRead[bytes], /, *, allow_code: bool = True) -> Any: ...
|
||||
def loads(bytes: ReadableBuffer, /, *, allow_code: bool = True) -> Any: ...
|
||||
|
||||
else:
|
||||
def load(file: SupportsRead[bytes], /) -> Any: ...
|
||||
def loads(bytes: ReadableBuffer, /) -> Any: ...
|
||||
|
||||
Reference in New Issue
Block a user