]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-132099: Harmonize Bluetooth address handling (GH-132486) (GH-132497)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 14 Apr 2025 16:36:04 +0000 (19:36 +0300)
committerGitHub <noreply@github.com>
Mon, 14 Apr 2025 16:36:04 +0000 (19:36 +0300)
commitd321b6ec826b0767d15d73e6f8ebd38e3600b7f8
treea6d298f8e4fe0ebbc12b1a15b02e9fb6328c5c82
parenta50aa3325b2df379355f1bf7f01b199cc553c708
[3.13] gh-132099: Harmonize Bluetooth address handling (GH-132486) (GH-132497)

Now all protocols always accept the Bluetooth address as string and
getsockname() 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 commit 1fc1df8dcc7a853b0649bc8df37cd07cbd2b6230)
Doc/library/socket.rst
Lib/test/test_socket.py
Modules/socketmodule.c