Skip to content
Merged
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
[stdlib][socket] import constants from the _socket module
  • Loading branch information
guoci authored Dec 11, 2025
commit 5f92f7b98aa94f8847370f20633d169e52252aa5
27 changes: 27 additions & 0 deletions stdlib/socket.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -969,6 +969,33 @@ if sys.platform != "linux":
if sys.platform != "darwin" and sys.platform != "linux":
__all__ += ["AF_BLUETOOTH"]

if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
from _socket import (
BTPROTO_HCI as BTPROTO_HCI,
BTPROTO_L2CAP as BTPROTO_L2CAP,
BTPROTO_SCO as BTPROTO_SCO,
)

__all__ += ["BTPROTO_HCI", "BTPROTO_L2CAP", "BTPROTO_SCO"]

if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
from _socket import (
HCI_FILTER as HCI_FILTER,
HCI_TIME_STAMP as HCI_TIME_STAMP,
HCI_DATA_DIR as HCI_DATA_DIR,
)

__all__ += ["HCI_FILTER", "HCI_TIME_STAMP", "HCI_DATA_DIR"]

if sys.version_info >= (3, 11) and sys.platform != "linux" and sys.platform != "win32" and sys.platform != "darwin":
from _socket import (
SCM_CREDS2 as SCM_CREDS2,
LOCAL_CREDS as LOCAL_CREDS,
LOCAL_CREDS_PERSISTENT as LOCAL_CREDS_PERSISTENT,
)

__all__ += ["SCM_CREDS2", "LOCAL_CREDS", "LOCAL_CREDS_PERSISTENT"]

if sys.platform == "win32" and sys.version_info >= (3, 12):
__all__ += ["AF_HYPERV"]

Expand Down
Loading