FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Python 3.15 socket SSL and platform updates by JelleZijlstra · Pull Request #15734 · python/typeshed · GitHub

Repository navigation

7 changes: 0 additions & 7 deletions stdlib/@tests/stubtest_allowlists/darwin-py315.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ _pyrepl.unix_eventqueue
ctypes.c_double_complex._type_
ctypes.c_float_complex._type_
ctypes.c_longdouble_complex._type_
mmap.MS_ASYNC
mmap.MS_INVALIDATE
mmap.MS_SYNC
mmap.mmap.madvise
mmap.mmap.resize
os.NODEV
os.__all__
posix.NODEV
Expand All @@ -23,5 +18,3 @@ profiling.sampling.live_collector.display
profiling.sampling.live_collector.trend_tracker
profiling.sampling.live_collector.widgets
readline.get_pre_input_hook
resource.RLIM_SAVED_CUR
resource.RLIM_SAVED_MAX
65 changes: 0 additions & 65 deletions stdlib/@tests/stubtest_allowlists/linux-py315.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,9 @@ _decimal
_pyrepl.fancy_termios
_pyrepl.unix_console
_pyrepl.unix_eventqueue
_socket.CAN_ISOTP_CHK_PAD_DATA
_socket.CAN_ISOTP_CHK_PAD_LEN
_socket.CAN_ISOTP_DEFAULT_EXT_ADDRESS
_socket.CAN_ISOTP_DEFAULT_FLAGS
_socket.CAN_ISOTP_DEFAULT_FRAME_TXTIME
_socket.CAN_ISOTP_DEFAULT_LL_MTU
_socket.CAN_ISOTP_DEFAULT_LL_TX_DL
_socket.CAN_ISOTP_DEFAULT_LL_TX_FLAGS
_socket.CAN_ISOTP_DEFAULT_PAD_CONTENT
_socket.CAN_ISOTP_DEFAULT_RECV_BS
_socket.CAN_ISOTP_DEFAULT_RECV_STMIN
_socket.CAN_ISOTP_DEFAULT_RECV_WFTMAX
_socket.CAN_ISOTP_EXTEND_ADDR
_socket.CAN_ISOTP_FORCE_RXSTMIN
_socket.CAN_ISOTP_FORCE_TXSTMIN
_socket.CAN_ISOTP_HALF_DUPLEX
_socket.CAN_ISOTP_LISTEN_MODE
_socket.CAN_ISOTP_LL_OPTS
_socket.CAN_ISOTP_OPTS
_socket.CAN_ISOTP_RECV_FC
_socket.CAN_ISOTP_RX_EXT_ADDR
_socket.CAN_ISOTP_RX_PADDING
_socket.CAN_ISOTP_RX_STMIN
_socket.CAN_ISOTP_SF_BROADCAST
_socket.CAN_ISOTP_TX_PADDING
_socket.CAN_ISOTP_TX_STMIN
_socket.CAN_ISOTP_WAIT_TX_DONE
_socket.IPV6_HDRINCL
_socket.SOL_CAN_ISOTP
ctypes.c_double_complex._type_
ctypes.c_float_complex._type_
ctypes.c_longdouble_complex._type_
mmap.MS_ASYNC
mmap.MS_INVALIDATE
mmap.MS_SYNC
mmap.mmap.madvise
os.AT_NO_AUTOMOUNT
os.AT_STATX_DONT_SYNC
os.AT_STATX_FORCE_SYNC
Expand Down Expand Up @@ -99,35 +66,3 @@ profiling.sampling.live_collector.display
profiling.sampling.live_collector.trend_tracker
profiling.sampling.live_collector.widgets
readline.get_pre_input_hook
resource.RLIM_SAVED_CUR
resource.RLIM_SAVED_MAX
socket.CAN_ISOTP_CHK_PAD_DATA
socket.CAN_ISOTP_CHK_PAD_LEN
socket.CAN_ISOTP_DEFAULT_EXT_ADDRESS
socket.CAN_ISOTP_DEFAULT_FLAGS
socket.CAN_ISOTP_DEFAULT_FRAME_TXTIME
socket.CAN_ISOTP_DEFAULT_LL_MTU
socket.CAN_ISOTP_DEFAULT_LL_TX_DL
socket.CAN_ISOTP_DEFAULT_LL_TX_FLAGS
socket.CAN_ISOTP_DEFAULT_PAD_CONTENT
socket.CAN_ISOTP_DEFAULT_RECV_BS
socket.CAN_ISOTP_DEFAULT_RECV_STMIN
socket.CAN_ISOTP_DEFAULT_RECV_WFTMAX
socket.CAN_ISOTP_EXTEND_ADDR
socket.CAN_ISOTP_FORCE_RXSTMIN
socket.CAN_ISOTP_FORCE_TXSTMIN
socket.CAN_ISOTP_HALF_DUPLEX
socket.CAN_ISOTP_LISTEN_MODE
socket.CAN_ISOTP_LL_OPTS
socket.CAN_ISOTP_OPTS
socket.CAN_ISOTP_RECV_FC
socket.CAN_ISOTP_RX_EXT_ADDR
socket.CAN_ISOTP_RX_PADDING
socket.CAN_ISOTP_RX_STMIN
socket.CAN_ISOTP_SF_BROADCAST
socket.CAN_ISOTP_TX_PADDING
socket.CAN_ISOTP_TX_STMIN
socket.CAN_ISOTP_WAIT_TX_DONE
socket.IPV6_HDRINCL
socket.SOL_CAN_ISOTP
socket.__all__
19 changes: 0 additions & 19 deletions stdlib/@tests/stubtest_allowlists/py315.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ _pyrepl.types
_pyrepl.utils
_pyrepl.windows_console
_pyrepl.windows_eventqueue
_ssl.HAS_PSK_TLS13
_ssl._SSLContext.get_groups
_ssl._SSLContext.set_ciphersuites
_ssl._SSLContext.set_client_sigalgs
_ssl._SSLContext.set_groups
_ssl._SSLContext.set_server_sigalgs
_ssl.get_sigalgs
_struct.Struct.pack_into
_struct.pack
_struct.pack_into
Expand Down Expand Up @@ -150,7 +143,6 @@ genericpath.samestat
glob.glob0
glob.glob1
gzip.compress
hashlib.__all__
http.HTTPMethod.description
http.client.HTTPConnection.__init__
http.client.HTTPSConnection.__init__
Expand Down Expand Up @@ -189,10 +181,6 @@ math.fmin
math.isnormal
math.issubnormal
math.signbit
mmap.mmap.find
mmap.mmap.flush
mmap.mmap.rfind
mmap.mmap.set_name
multiprocessing.context.BaseContext.set_forkserver_preload
multiprocessing.forkserver.ForkServer.set_forkserver_preload
multiprocessing.forkserver.main
Expand Down Expand Up @@ -222,7 +210,6 @@ pathlib.PurePath.__vfspath__
pathlib.PurePath.is_reserved
pdb.Pdb.print_stack_entry
pkgutil.resolve_name
platform.java_ver
posixpath.ALL_BUT_LAST
posixpath.__all__
posixpath.basename
Expand Down Expand Up @@ -275,12 +262,6 @@ site.process_startup_files
sre_compile
sre_constants
sre_parse
ssl.SSLObject.client_sigalg
ssl.SSLObject.group
ssl.SSLObject.server_sigalg
ssl.SSLSocket.client_sigalg
ssl.SSLSocket.group
ssl.SSLSocket.server_sigalg
symtable.symtable
sys.__jit
sys._monitoring
Expand Down
3 changes: 0 additions & 3 deletions stdlib/@tests/stubtest_allowlists/win32-py315.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# TODO: Allowlist entries that should be fixed
# ============================================

_socket.IPV6_HDRINCL
_winapi.DeregisterEventSource
_winapi.EVENTLOG_AUDIT_FAILURE
_winapi.EVENTLOG_AUDIT_SUCCESS
Expand All @@ -14,6 +13,4 @@ _winapi.GetOEMCP
_winapi.RegisterEventSource
_winapi.ReportEvent
asyncio.windows_events.IocpProactor.finish_socket_func
socket.IPV6_HDRINCL
socket.__all__
winreg.DeleteTree
32 changes: 32 additions & 0 deletions stdlib/_socket.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ if sys.platform != "win32":
IP_RETOPTS: Final[int]
if sys.version_info >= (3, 13) and sys.platform == "linux":
CAN_RAW_ERR_FILTER: Final[int]
if sys.version_info >= (3, 15):
if sys.platform == "win32" or sys.platform == "linux":
IPV6_HDRINCL: Final[int]
if sys.version_info >= (3, 14):
IP_RECVTTL: Final[int]

Expand Down Expand Up @@ -437,6 +440,35 @@ if sys.platform == "linux":
CAN_RAW_JOIN_FILTERS: Final[int]
# Availability: Linux >= 2.6.25
CAN_ISOTP: Final[int]
if sys.version_info >= (3, 15):
CAN_ISOTP_CHK_PAD_DATA: Final[int]
CAN_ISOTP_CHK_PAD_LEN: Final[int]
CAN_ISOTP_DEFAULT_EXT_ADDRESS: Final[int]
CAN_ISOTP_DEFAULT_FLAGS: Final[int]
CAN_ISOTP_DEFAULT_FRAME_TXTIME: Final[int]
CAN_ISOTP_DEFAULT_LL_MTU: Final[int]
CAN_ISOTP_DEFAULT_LL_TX_DL: Final[int]
CAN_ISOTP_DEFAULT_LL_TX_FLAGS: Final[int]
CAN_ISOTP_DEFAULT_PAD_CONTENT: Final[int]
CAN_ISOTP_DEFAULT_RECV_BS: Final[int]
CAN_ISOTP_DEFAULT_RECV_STMIN: Final[int]
CAN_ISOTP_DEFAULT_RECV_WFTMAX: Final[int]
CAN_ISOTP_EXTEND_ADDR: Final[int]
CAN_ISOTP_FORCE_RXSTMIN: Final[int]
CAN_ISOTP_FORCE_TXSTMIN: Final[int]
CAN_ISOTP_HALF_DUPLEX: Final[int]
CAN_ISOTP_LL_OPTS: Final[int]
CAN_ISOTP_LISTEN_MODE: Final[int]
CAN_ISOTP_OPTS: Final[int]
CAN_ISOTP_RECV_FC: Final[int]
CAN_ISOTP_RX_EXT_ADDR: Final[int]
CAN_ISOTP_RX_PADDING: Final[int]
CAN_ISOTP_RX_STMIN: Final[int]
CAN_ISOTP_SF_BROADCAST: Final[int]
CAN_ISOTP_TX_PADDING: Final[int]
CAN_ISOTP_TX_STMIN: Final[int]
CAN_ISOTP_WAIT_TX_DONE: Final[int]
SOL_CAN_ISOTP: Final[int]
# Availability: Linux >= 5.4
CAN_J1939: Final[int]

Expand Down
11 changes: 11 additions & 0 deletions stdlib/_ssl.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ if sys.version_info < (3, 12):
def RAND_status() -> bool: ...
def get_default_verify_paths() -> tuple[str, str, str, str]: ...

if sys.version_info >= (3, 15):
def get_sigalgs() -> list[str]: ...

if sys.platform == "win32":
_EnumRetType: TypeAlias = list[tuple[bytes, str, set[str] | bool]]
def enum_certificates(store_name: str) -> _EnumRetType: ...
Expand Down Expand Up @@ -101,6 +104,12 @@ class _SSLContext:
def set_ciphers(self, cipherlist: str, /) -> None: ...
def set_default_verify_paths(self) -> None: ...
def set_ecdh_curve(self, name: str, /) -> None: ...
if sys.version_info >= (3, 15):
def get_groups(self, *, include_aliases: bool = False) -> list[str]: ...
def set_ciphersuites(self, ciphersuites: str, /) -> None: ...
def set_client_sigalgs(self, sigalgslist: str, /) -> None: ...
def set_groups(self, grouplist: str, /) -> None: ...
def set_server_sigalgs(self, sigalgslist: str, /) -> None: ...
if sys.version_info >= (3, 13):
def set_psk_client_callback(self, callback: Callable[[str | None], tuple[str | None, bytes]] | None) -> None: ...
def set_psk_server_callback(
Expand Down Expand Up @@ -271,6 +280,8 @@ HAS_ECDH: Final[bool]
HAS_NPN: Final[bool]
if sys.version_info >= (3, 13):
HAS_PSK: Final[bool]
if sys.version_info >= (3, 15):
HAS_PSK_TLS13: Final[bool]
HAS_ALPN: Final[bool]
HAS_SSLv2: Final[bool]
HAS_SSLv3: Final[bool]
Expand Down
25 changes: 24 additions & 1 deletion stdlib/hashlib.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ from _typeshed import ReadableBuffer
from collections.abc import Callable, Set as AbstractSet
from typing import Protocol, type_check_only

if sys.version_info >= (3, 11):
if sys.version_info >= (3, 15):
__all__ = (
"md5",
"sha1",
Expand All @@ -41,8 +41,31 @@ if sys.version_info >= (3, 11):
"new",
"algorithms_guaranteed",
"algorithms_available",
"file_digest",
"pbkdf2_hmac",
"scrypt",
)
elif sys.version_info >= (3, 11):
__all__ = (
"md5",
"sha1",
"sha224",
"sha256",
"sha384",
"sha512",
"blake2b",
"blake2s",
"sha3_224",
"sha3_256",
"sha3_384",
"sha3_512",
"shake_128",
"shake_256",
"new",
"algorithms_guaranteed",
"algorithms_available",
"file_digest",
"pbkdf2_hmac",
)
else:
__all__ = (
Expand Down
45 changes: 39 additions & 6 deletions stdlib/mmap.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,29 @@ if sys.platform != "win32":
PROT_EXEC: Final[int]
PROT_READ: Final[int]
PROT_WRITE: Final[int]
if sys.version_info >= (3, 15):
MS_ASYNC: Final[int]
MS_INVALIDATE: Final[int]
MS_SYNC: Final[int]

PAGESIZE: Final[int]

@disjoint_base
class mmap:
if sys.platform == "win32":
def __new__(cls, fileno: int, length: int, tagname: str | None = None, access: int = 0, offset: int = 0) -> Self: ...
if sys.version_info >= (3, 15):
def __new__(
cls,
fileno: int,
length: int,
tagname: str | None = None,
access: int = 0,
offset: int = 0,
*,
trackfd: bool = True,
) -> Self: ...
else:
def __new__(cls, fileno: int, length: int, tagname: str | None = None, access: int = 0, offset: int = 0) -> Self: ...
else:
if sys.version_info >= (3, 13):
def __new__(
Expand All @@ -53,11 +69,16 @@ class mmap:
) -> Self: ...

def close(self) -> None: ...
def flush(self, offset: int = 0, size: int = ..., /) -> None: ...
if sys.version_info >= (3, 15):
def flush(self, offset: int = 0, size: int = ..., /, *, flags: int = 0) -> None: ...
else:
def flush(self, offset: int = 0, size: int = ..., /) -> None: ...

def move(self, dest: int, src: int, count: int, /) -> None: ...
def read_byte(self) -> int: ...
def readline(self) -> bytes: ...
def resize(self, newsize: int, /) -> None: ...
if sys.version_info < (3, 15) or sys.platform != "darwin":

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

weird

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Apparently this is correct: python/cpython#138276. It used to be available on all platforms (but it would fail on platforms without MREMAP), now it only exists if it works.

def resize(self, newsize: int, /) -> None: ...
if sys.platform != "win32":
def seek(self, pos: int, whence: Literal[0, 1, 2, 3, 4] = os.SEEK_SET, /) -> None: ...
else:
Expand All @@ -69,12 +90,24 @@ class mmap:
def __len__(self) -> int: ...
closed: bool
if sys.platform != "win32":
def madvise(self, option: int, start: int = 0, length: int = ..., /) -> None: ...
if sys.version_info >= (3, 15):
def madvise(self, option: int, start: int = 0, length: int | None = None, /) -> None: ...
else:
def madvise(self, option: int, start: int = 0, length: int = ..., /) -> None: ...

if sys.version_info >= (3, 15):
def find(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ...
def rfind(self, view: ReadableBuffer, start: int | None = None, end: int | None = None, /) -> int: ...

else:
def find(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ...
def rfind(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ...

def find(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ...
def rfind(self, view: ReadableBuffer, start: int = ..., end: int = ..., /) -> int: ...
def read(self, n: int | None = None, /) -> bytes: ...
def write(self, bytes: ReadableBuffer, /) -> int: ...
if sys.version_info >= (3, 15):
def set_name(self, name: str, /) -> None: ...

@overload
def __getitem__(self, key: SupportsIndex, /) -> int: ...
@overload
Expand Down
10 changes: 1 addition & 9 deletions stdlib/platform.pyi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def mac_ver(
release: str = "", versioninfo: tuple[str, str, str] = ("", "", ""), machine: str = ""
) -> tuple[str, tuple[str, str, str], str]: ...

if sys.version_info >= (3, 13):
if sys.version_info < (3, 15):
@deprecated("Deprecated since Python 3.13; will be removed in Python 3.15.")
def java_ver(
release: str = "",
Expand All @@ -19,14 +19,6 @@ if sys.version_info >= (3, 13):
osinfo: tuple[str, str, str] = ("", "", ""),
) -> tuple[str, str, tuple[str, str, str], tuple[str, str, str]]: ...

else:
def java_ver(
release: str = "",
vendor: str = "",
vminfo: tuple[str, str, str] = ("", "", ""),
osinfo: tuple[str, str, str] = ("", "", ""),
) -> tuple[str, str, tuple[str, str, str], tuple[str, str, str]]: ...

def system_alias(system: str, release: str, version: str) -> tuple[str, str, str]: ...
def architecture(executable: str = sys.executable, bits: str = "", linkage: str = "") -> tuple[str, str]: ...

Expand Down
Loading
Loading

Back | FazBrowse Home | New Git URL