Skip to content

Commit 7c6a91c

Browse files
committed
fix allowlist and keep an __all__ that matches github runners
1 parent 4b682d4 commit 7c6a91c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

stdlib/@tests/stubtest_allowlists/linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ select.poll # Actually a function; we have a class so it can be used as a type
3030
# Bluetooth constants which aren't on the GitHub Actions runners, see #15207
3131
_?socket.AF_BLUETOOTH
3232
_?socket.BDADDR_ANY
33+
_?socket.BDADDR_LOCAL
3334
_?socket.BTPROTO_HCI
3435
_?socket.BTPROTO_L2CAP
3536
_?socket.BTPROTO_RFCOMM

stdlib/socket.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ if sys.platform != "win32":
522522
if sys.platform != "darwin":
523523
from _socket import BDADDR_ANY as BDADDR_ANY, BDADDR_LOCAL as BDADDR_LOCAL, BTPROTO_RFCOMM as BTPROTO_RFCOMM
524524

525+
if sys.platform != "darwin" and sys.platform != "linux":
525526
__all__ += ["BDADDR_ANY", "BDADDR_LOCAL", "BTPROTO_RFCOMM"]
526527

527528
if sys.platform == "darwin" and sys.version_info >= (3, 10):
@@ -966,12 +967,13 @@ if sys.platform != "win32":
966967

967968
if sys.platform != "linux":
968969
__all__ += ["AF_LINK"]
969-
if sys.platform != "darwin":
970+
if sys.platform != "darwin" and sys.platform != "linux":
970971
__all__ += ["AF_BLUETOOTH"]
971972

972973
if sys.platform != "win32" and sys.platform != "darwin":
973974
from _socket import BTPROTO_HCI as BTPROTO_HCI, BTPROTO_L2CAP as BTPROTO_L2CAP, BTPROTO_SCO as BTPROTO_SCO
974975

976+
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":
975977
__all__ += ["BTPROTO_HCI", "BTPROTO_L2CAP", "BTPROTO_SCO"]
976978

977979
if sys.platform != "win32" and sys.platform != "darwin" and sys.platform != "linux":

0 commit comments

Comments
 (0)