-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-132734: Add new constants for Bluetooth sockets #132735
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
gh-132734: Add new constants for Bluetooth sockets #132735
Conversation
Doc/library/socket.rst
Outdated
Options names for use with :const:`BTPROTO_HCI`. | ||
Availability and format of the option value depend on platform. | ||
|
||
.. availability:: Linux and BSD |
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.
.. availability:: Linux and BSD | |
.. availability:: Linux, FreeBSD |
Consistent with your first one, also we cannot officially guarantee *BSD support
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.
It is not only FreeBSD. In several places I use BSD as a shortcut for FreeBSD, NetBSD and DragonFly BSD.
Note that different constants are available on different platforms.
on NetBSD and DragonFly BSD. | ||
Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD. |
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.
on NetBSD and DragonFly BSD. | |
Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD. | |
for NetBSD and DragonFly BSD. | |
Added :const:`!HCI_DATA_DIR` for FreeBSD, NetBSD and DragonFly BSD. |
I think for is more fitting here
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.
Is it so? I thought that it is more common to write "on platform" than "for platform". There are many examples of the former, and not many of the latter.
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 also prefer "on NetBSD" here.
Co-authored-by: Martin Panter <[email protected]>
Thanks, @vadmium. |
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.
LGTM
on NetBSD and DragonFly BSD. | ||
Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD. |
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 also prefer "on NetBSD" here.
Co-authored-by: Victor Stinner <[email protected]>
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.
Looks good to me:-)
Looks like this has caused a number of buildbot failures: https://buildbot.python.org/#/release_status For example, aarch64 RHEL8 LTO 3.x: gcc -pthread -fno-strict-overflow -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -flto -fuse-linker-plugin -ffat-lto-objects -g -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include -fPIC -c ./Modules/_ctypes/callproc.c -o Modules/_ctypes/callproc.o
./Modules/socketmodule.c: In function ‘socket_exec’:
./Modules/socketmodule.c:8040:22: error: ‘BT_ISO_QOS’ undeclared (first use in this function)
ADD_INT_MACRO(m, BT_ISO_QOS);
^~~~~~~~~~
./Modules/socketmodule.c:7704:44: note: in definition of macro ‘ADD_INT_MACRO’
if (PyModule_AddIntConstant(MOD, #INT, INT) < 0) { \
^~~
./Modules/socketmodule.c:8040:22: note: each undeclared identifier is reported only once for each function it appears in
ADD_INT_MACRO(m, BT_ISO_QOS);
^~~~~~~~~~
./Modules/socketmodule.c:7704:44: note: in definition of macro ‘ADD_INT_MACRO’
if (PyModule_AddIntConstant(MOD, #INT, INT) < 0) { \
^~~ https://buildbot.python.org/#/builders/338/builds/8577 @serhiy-storchaka Please could you check? |
Regression was fixed by d7be26a. |
📚 Documentation preview 📚: https://cpython-previews--132735.org.readthedocs.build/