Skip to content

Commit 0cf7a53

Browse files
authored
Switch to using close_stale_connections_by_address (#224)
1 parent 415cb4d commit 0cf7a53

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010

1111
strategy:
1212
matrix:
13-
python-version: [3.9, "3.10", "3.11"]
13+
python-version: ["3.10", "3.11", "3.12"]
1414

1515
steps:
1616
- uses: actions/checkout@v3

requirements_dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pytest-asyncio
22
pytest-cov
33
async_timeout>=4.0.1
44
bleak>=0.17.0
5-
bleak-retry-connector>=2.9.0
5+
bleak-retry-connector>=3.4.0
66
cryptography>=38.0.3
77
boto3>=1.20.24
88
requests>=2.28.1

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
install_requires=[
77
"async_timeout>=4.0.1",
88
"bleak>=0.19.0",
9-
"bleak-retry-connector>=2.9.0",
9+
"bleak-retry-connector>=3.4.0",
1010
"cryptography>=39.0.0",
1111
"pyOpenSSL>=23.0.0",
1212
"boto3>=1.20.24",

switchbot/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
"""Library to handle connection with Switchbot."""
22
from __future__ import annotations
33

4-
from bleak_retry_connector import close_stale_connections, get_device
4+
from bleak_retry_connector import (
5+
close_stale_connections,
6+
close_stale_connections_by_address,
7+
get_device,
8+
)
59

610
from .adv_parser import SwitchbotSupportedType, parse_advertisement_data
711
from .const import (
@@ -27,6 +31,7 @@
2731
__all__ = [
2832
"get_device",
2933
"close_stale_connections",
34+
"close_stale_connections_by_address",
3035
"parse_advertisement_data",
3136
"GetSwitchbotDevices",
3237
"SwitchBotAdvertisement",

0 commit comments

Comments
 (0)