mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-07-11 19:00:52 +08:00
[socket/_socket] Restore bluetooth socket constants on Linux (#15209)
This commit is contained in:
+6
-4
@@ -519,9 +519,10 @@ if sys.platform != "win32":
|
||||
|
||||
__all__ += ["SO_BINDTODEVICE"]
|
||||
|
||||
if sys.platform != "darwin" and sys.platform != "linux":
|
||||
if sys.platform != "darwin":
|
||||
from _socket import BDADDR_ANY as BDADDR_ANY, BDADDR_LOCAL as BDADDR_LOCAL, BTPROTO_RFCOMM as BTPROTO_RFCOMM
|
||||
|
||||
if sys.platform != "darwin" and sys.platform != "linux":
|
||||
__all__ += ["BDADDR_ANY", "BDADDR_LOCAL", "BTPROTO_RFCOMM"]
|
||||
|
||||
if sys.platform == "darwin" and sys.version_info >= (3, 10):
|
||||
@@ -969,9 +970,10 @@ 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":
|
||||
if sys.platform != "win32" and sys.platform != "darwin":
|
||||
from _socket import BTPROTO_HCI as BTPROTO_HCI, BTPROTO_L2CAP as BTPROTO_L2CAP, BTPROTO_SCO as BTPROTO_SCO
|
||||
|
||||
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
|
||||
__all__ += ["BTPROTO_HCI", "BTPROTO_L2CAP", "BTPROTO_SCO"]
|
||||
|
||||
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
|
||||
@@ -1131,7 +1133,7 @@ class AddressFamily(IntEnum):
|
||||
AF_QIPCRTR = 42
|
||||
if sys.platform != "linux":
|
||||
AF_LINK = 33
|
||||
if sys.platform != "darwin" and sys.platform != "linux":
|
||||
if sys.platform != "darwin":
|
||||
AF_BLUETOOTH = 32
|
||||
if sys.platform == "win32" and sys.version_info >= (3, 12):
|
||||
AF_HYPERV = 34
|
||||
@@ -1186,7 +1188,7 @@ if sys.platform == "linux":
|
||||
|
||||
if sys.platform != "linux":
|
||||
AF_LINK: Final = AddressFamily.AF_LINK
|
||||
if sys.platform != "darwin" and sys.platform != "linux":
|
||||
if sys.platform != "darwin":
|
||||
AF_BLUETOOTH: Final = AddressFamily.AF_BLUETOOTH
|
||||
if sys.platform == "win32" and sys.version_info >= (3, 12):
|
||||
AF_HYPERV: Final = AddressFamily.AF_HYPERV
|
||||
|
||||
Reference in New Issue
Block a user