Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-132099: Harmonize Bluetooth address handling#132486
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-132099: Harmonize Bluetooth address handling#132486
Uh oh!
There was an error while loading.Please reload this page.
Conversation
serhiy-storchaka commentedApr 13, 2025
Since BTPROTO_HCI support on FreeBSD and all protocols on other BSD did not work just days ago, it is safe to do changes which otherwise could be considered breaking (changing the type of accepting or returning address). BTPROTO_SCO was the only protocol that worked (only on Linux) with bytes addresses in older versions. Now it accepts both str and bytes. |
Now all protocols always accept the Bluetooth address as string andgetsockname() always returns the Bluetooth address as string.* BTPROTO_SCO now accepts not only bytes, but str.* BTPROTO_SCO now checks address for embedded null.* On *BSD, BTPROTO_HCI now accepts str instead of bytes.* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.* On NetBSD and DragonFly BDS, BTPROTO_HCI now checks address for embedded null.
6379c0e to5552a33Comparebedevere-bot commentedApr 13, 2025
🤖 New build scheduled with the buildbot fleet by@gpshead for commit5552a33 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F132486%2Fmerge If you want to schedule another build, you need to add the🔨 test-with-buildbots label again. |
serhiy-storchaka commentedApr 13, 2025
I tested on NetBSD and FreeBSD. Unfortunately, on FreeBSD all tests are skipped, so we can only hope that the code is correct. |
1fc1df8 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry,@serhiy-storchaka, I could not cleanly backport this to |
…H-132486)Now all protocols always accept the Bluetooth address as string andgetsockname() always returns the Bluetooth address as string.* BTPROTO_SCO now accepts not only bytes, but str.* BTPROTO_SCO now checks address for embedded null.* On *BSD, BTPROTO_HCI now accepts str instead of bytes.* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.* On NetBSD and DragonFly BDS, BTPROTO_HCI now checks address for embedded null.(cherry picked from commit1fc1df8)Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
GH-132497 is a backport of this pull request to the3.13 branch. |
…H-132497)Now all protocols always accept the Bluetooth address as string andgetsockname() always returns the Bluetooth address as string.* BTPROTO_SCO now accepts not only bytes, but str.* BTPROTO_SCO now checks address for embedded null.* On *BSD, BTPROTO_HCI now accepts str instead of bytes.* On FreeBSD, getsockname() for BTPROTO_HCI now returns str instead of bytes.* On NetBSD and DragonFly BSD, BTPROTO_HCI now checks address for embedded null.(cherry picked from commit1fc1df8)
Uh oh!
There was an error while loading.Please reload this page.
Now all protocols always accept the Bluetooth address as string and getsockname() always returns the Bluetooth address as string.
📚 Documentation preview 📚:https://cpython-previews--132486.org.readthedocs.build/