-
-
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?
Add Bluetooth constants for python 3.14 #15330
Conversation
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
|
This is missing changes similar to: typeshed/stdlib/@tests/stubtest_allowlists/linux.txt Lines 30 to 37 in 7f3ec00
|
|
This is also missing modifications to |
|
It would also be helpful if you could try running a BSD in a virtual machine and check out the constants added there. |
| # 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 |
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 int is included.
| SOCK_CLOEXEC: Final[int] | ||
| SOCK_NONBLOCK: Final[int] |
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.
These two should not be changed to have a condition on the Python version.
| if sys.version_info >= (3, 14): | ||
| SOCK_CLOEXEC: Final[int] | ||
| SOCK_NONBLOCK: Final[int] | ||
| BDADDR_BREDR: Final[int] |
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.
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
| # Semi-documented constants |
Same comment applies to the Windows-only constants.
Added new Bluetooth constants for Python 3.14 as requested by @dlech.
Updated _Address type alias.
Added Linux and Windows constants.
Followed the ordering from PR #15209 as suggested.