Skip to content

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

Merged
merged 6 commits into from
Apr 22, 2025

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Apr 19, 2025

Options names for use with :const:`BTPROTO_HCI`.
Availability and format of the option value depend on platform.

.. availability:: Linux and BSD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.. availability:: Linux and BSD
.. availability:: Linux, FreeBSD

Consistent with your first one, also we cannot officially guarantee *BSD support

Copy link
Member Author

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.

Comment on lines +729 to +730
on NetBSD and DragonFly BSD.
Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Copy link
Member Author

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.

Copy link
Member

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.

@serhiy-storchaka serhiy-storchaka added docs Documentation in the Doc dir stdlib Python modules in the Lib dir labels Apr 19, 2025
@github-project-automation github-project-automation bot moved this to Todo in Docs PRs Apr 19, 2025
@serhiy-storchaka
Copy link
Member Author

Thanks, @vadmium.

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +729 to +730
on NetBSD and DragonFly BSD.
Added :const:`!HCI_DATA_DIR` on FreeBSD, NetBSD and DragonFly BSD.
Copy link
Member

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.

@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) April 22, 2025 10:37
Copy link
Contributor

@StanFromIreland StanFromIreland left a 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:-)

@serhiy-storchaka serhiy-storchaka merged commit e846244 into python:main Apr 22, 2025
42 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 22, 2025
@hugovk
Copy link
Member

hugovk commented Apr 23, 2025

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 functionsocket_exec’:
./Modules/socketmodule.c:8040:22: error: ‘BT_ISO_QOSundeclared (first use in this function)
     ADD_INT_MACRO(m, BT_ISO_QOS);
                      ^~~~~~~~~~
./Modules/socketmodule.c:7704:44: note: in definition of macroADD_INT_MACROif (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 macroADD_INT_MACROif (PyModule_AddIntConstant(MOD, #INT, INT) < 0) {  \
                                            ^~~

https://buildbot.python.org/#/builders/338/builds/8577

@serhiy-storchaka Please could you check?

@vstinner
Copy link
Member

@serhiy-storchaka Please could you check?

Regression was fixed by d7be26a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir stdlib Python modules in the Lib dir
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants