Skip to content

gh-132099: Accept an integer as the address for BTPROTO_HCI on Linux#132525

Merged
serhiy-storchaka merged 2 commits intopython:mainfrom
serhiy-storchaka:bluetooth-hci-accept-integer
Apr 16, 2025
Merged

gh-132099: Accept an integer as the address for BTPROTO_HCI on Linux#132525
serhiy-storchaka merged 2 commits intopython:mainfrom
serhiy-storchaka:bluetooth-hci-accept-integer

Conversation

@serhiy-storchaka
Copy link
Member

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

Previously only an integer packed in a tuple was accepted, while getsockname() could return a raw integer.
Now the result of getsockname() is always acceptable as an address.


📚 Documentation preview 📚: https://cpython-previews--132525.org.readthedocs.build/

…Linux

Previously only an integer packed in a tuple was accepted, while
getsockname() could return a raw integer.
Now the result of getsockname() is always acceptable as an address.
- On Linux it accepts an integer ``device_id`` or a tuple
``(device_id, [channel])`` where ``device_id``
is specifies the number of the Bluetooth device,
and ``channel`` is an optional integer specifying the HCI channel
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
and ``channel`` is an optional integer specifying the HCI channel
and ``channel`` is an optional integer specifying the HCI channel.
Copy link
Member Author

Choose a reason for hiding this comment

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

No, it is not the end of the sentence.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
@serhiy-storchaka serhiy-storchaka merged commit 8cb177d into python:main Apr 16, 2025
42 checks passed
@serhiy-storchaka serhiy-storchaka deleted the bluetooth-hci-accept-integer branch April 16, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants