-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Add Bluetooth constants for python 3.14 #15330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
61b540f
f460d10
541eb42
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -11,7 +11,7 @@ _CMSGArg: TypeAlias = tuple[int, int, ReadableBuffer] | |||
| # Addresses can be either tuples of varying lengths (AF_INET, AF_INET6, | ||||
| # AF_NETLINK, AF_TIPC) or strings/buffers (AF_UNIX). | ||||
| # See getsockaddrarg() in socketmodule.c. | ||||
| _Address: TypeAlias = tuple[Any, ...] | str | ReadableBuffer | ||||
| _Address: TypeAlias = tuple[Any, ...] | str | ReadableBuffer | int | ||||
| _RetAddress: TypeAlias = Any | ||||
|
|
||||
| # ===== Constants ===== | ||||
|
|
@@ -34,8 +34,76 @@ SOCK_SEQPACKET: Final[int] | |||
|
|
||||
| if sys.platform == "linux": | ||||
| # Availability: Linux >= 2.6.27 | ||||
| SOCK_CLOEXEC: Final[int] | ||||
| SOCK_NONBLOCK: Final[int] | ||||
| if sys.version_info >= (3, 14): | ||||
| SOCK_CLOEXEC: Final[int] | ||||
| SOCK_NONBLOCK: Final[int] | ||||
|
Comment on lines
+38
to
+39
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These two should not be changed to have a condition on the Python version. |
||||
| BDADDR_BREDR: Final[int] | ||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would expect all of the Bluetooth stuff to be grouped together with the existing "semi-documented constants" below line 635. Line 635 in 7f3ec00
Same comment applies to the Windows-only constants. |
||||
| BDADDR_LE_PUBLIC: Final[int] | ||||
| BDADDR_LE_RANDOM: Final[int] | ||||
| BT_CHANNEL_POLICY: Final[int] | ||||
| BT_CHANNEL_POLICY_BREDR_ONLY: Final[int] | ||||
| BT_CHANNEL_POLICY_BREDR_PREFERRED: Final[int] | ||||
| BT_CODEC: Final[int] | ||||
| BT_DEFER_SETUP: Final[int] | ||||
| BT_FLUSHABLE: Final[int] | ||||
| BT_FLUSHABLE_OFF: Final[int] | ||||
| BT_FLUSHABLE_ON: Final[int] | ||||
| BT_ISO_QOS: Final[int] | ||||
| BT_MODE: Final[int] | ||||
| BT_MODE_BASIC: Final[int] | ||||
| BT_MODE_ERTM: Final[int] | ||||
| BT_MODE_EXT_FLOWCTL: Final[int] | ||||
| BT_MODE_LE_FLOWCTL: Final[int] | ||||
| BT_MODE_STREAMING: Final[int] | ||||
| BT_PHY: Final[int] | ||||
| BT_PHY_BR_1M_1SLOT: Final[int] | ||||
| BT_PHY_BR_1M_3SLOT: Final[int] | ||||
| BT_PHY_BR_1M_5SLOT: Final[int] | ||||
| BT_PHY_EDR_2M_1SLOT: Final[int] | ||||
| BT_PHY_EDR_2M_3SLOT: Final[int] | ||||
| BT_PHY_EDR_2M_5SLOT: Final[int] | ||||
| BT_PHY_EDR_3M_1SLOT: Final[int] | ||||
| BT_PHY_EDR_3M_3SLOT: Final[int] | ||||
| BT_PHY_EDR_3M_5SLOT: Final[int] | ||||
| BT_PHY_LE_1M_RX: Final[int] | ||||
| BT_PHY_LE_1M_TX: Final[int] | ||||
| BT_PHY_LE_2M_RX: Final[int] | ||||
| BT_PHY_LE_2M_TX: Final[int] | ||||
| BT_PHY_LE_CODED_RX: Final[int] | ||||
| BT_PHY_LE_CODED_TX: Final[int] | ||||
| BT_PKT_STATUS: Final[int] | ||||
| BT_POWER: Final[int] | ||||
| BT_POWER_FORCE_ACTIVE_OFF: Final[int] | ||||
| BT_POWER_FORCE_ACTIVE_ON: Final[int] | ||||
| BT_RCVMTU: Final[int] | ||||
| BT_SECURITY: Final[int] | ||||
| BT_SECURITY_FIPS: Final[int] | ||||
| BT_SECURITY_HIGH: Final[int] | ||||
| BT_SECURITY_LOW: Final[int] | ||||
| BT_SECURITY_MEDIUM: Final[int] | ||||
| BT_SECURITY_SDP: Final[int] | ||||
| BT_SNDMTU: Final[int] | ||||
| BT_VOICE: Final[int] | ||||
| BT_VOICE_CVSD_16BIT: Final[int] | ||||
| BT_VOICE_TRANSPARENT: Final[int] | ||||
| BT_VOICE_TRANSPARENT_16BIT: Final[int] | ||||
| HCI_CHANNEL_CONTROL: Final[int] | ||||
| HCI_CHANNEL_LOGGING: Final[int] | ||||
| HCI_CHANNEL_MONITOR: Final[int] | ||||
| HCI_CHANNEL_RAW: Final[int] | ||||
| HCI_CHANNEL_USER: Final[int] | ||||
| HCI_DEV_NONE: Final[int] | ||||
| L2CAP_LM: Final[int] | ||||
| L2CAP_LM_AUTH: Final[int] | ||||
| L2CAP_LM_ENCRYPT: Final[int] | ||||
| L2CAP_LM_MASTER: Final[int] | ||||
| L2CAP_LM_RELIABLE: Final[int] | ||||
| L2CAP_LM_SECURE: Final[int] | ||||
| L2CAP_LM_TRUSTED: Final[int] | ||||
| SOL_BLUETOOTH: Final[int] | ||||
| SOL_L2CAP: Final[int] | ||||
| SOL_RFCOMM: Final[int] | ||||
| SOL_SCO: Final[int] | ||||
|
|
||||
| # -------------------- | ||||
| # Many constants of these forms, documented in the Unix documentation on | ||||
|
|
@@ -76,6 +144,11 @@ if sys.platform != "linux": | |||
| SO_USELOOPBACK: Final[int] | ||||
| if sys.platform == "win32": | ||||
| SO_EXCLUSIVEADDRUSE: Final[int] | ||||
| SO_BTH_ENCRYPT: Final[int] | ||||
| SO_BTH_MTU: Final[int] | ||||
| SO_BTH_MTU_MAX: Final[int] | ||||
| SO_BTH_MTU_MIN: Final[int] | ||||
| SOL_RFCOMM: Final[int] | ||||
| if sys.platform != "win32": | ||||
| SO_REUSEPORT: Final[int] | ||||
| if sys.platform != "darwin" or sys.version_info >= (3, 13): | ||||
|
|
||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment above should be modified to explain why
intis included.