Skip to content

Commit 3fae981

Browse files
authored
feat: fallback to passive scanning if active cannot start (#33)
1 parent d7f1991 commit 3fae981

File tree

8 files changed

+1556
-879
lines changed

8 files changed

+1556
-879
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
fail-fast: false
3737
matrix:
3838
python-version:
39-
- "3.10"
4039
- "3.11"
4140
- "3.12"
4241
os:
@@ -66,7 +65,7 @@ jobs:
6665
run: poetry run pytest --cov-report=xml
6766
shell: bash
6867
- name: Upload coverage to Codecov
69-
uses: codecov/codecov-action@v3
68+
uses: codecov/codecov-action@v4
7069
with:
7170
token: ${{ secrets.CODECOV_TOKEN }}
7271

@@ -91,14 +90,14 @@ jobs:
9190

9291
# Do a dry run of PSR
9392
- name: Test release
94-
uses: python-semantic-release/python-semantic-release@v8.3.0
93+
uses: python-semantic-release/python-semantic-release@v9.3.0
9594
if: github.ref_name != 'main'
9695
with:
9796
root_options: --noop
9897

9998
# On main branch: actual PSR + upload to PyPI & GitHub
10099
- name: Release
101-
uses: python-semantic-release/python-semantic-release@v8.3.0
100+
uses: bluetooth-devices/python-semantic-release@311
102101
id: release
103102
if: github.ref_name == 'main'
104103
with:
@@ -136,7 +135,7 @@ jobs:
136135
- name: Set up Python
137136
uses: actions/setup-python@v4
138137
with:
139-
python-version: "3.10"
138+
python-version: "3.11"
140139

141140
- name: Install python-semantic-release
142141
run: python3 -m pip install python-semantic-release==7.34.6
@@ -153,7 +152,7 @@ jobs:
153152
fetch-depth: 0
154153

155154
- name: Install cibuildwheel
156-
run: python -m pip install cibuildwheel==2.16.2
155+
run: python -m pip install cibuildwheel==2.17.0
157156

158157
- name: Build wheels
159158
run: python -m cibuildwheel --output-dir wheelhouse

poetry.lock

Lines changed: 530 additions & 755 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ script = "build_ext.py"
2727
"Changelog" = "https://github.com/bluetooth-devices/habluetooth/blob/main/CHANGELOG.md"
2828

2929
[tool.poetry.dependencies]
30-
python = ">=3.10,<3.13"
30+
python = ">=3.11,<3.13"
3131
bleak = ">=0.21.1"
3232
bleak-retry-connector = ">=3.3.0"
3333
bluetooth-data-tools = ">=1.16.0"
@@ -37,6 +37,7 @@ bluetooth-auto-recovery = ">=1.2.3"
3737
[tool.poetry.group.dev.dependencies]
3838
pytest = "^7.0"
3939
pytest-cov = "^3.0"
40+
pytest-asyncio = "^0.23.6"
4041

4142
[tool.poetry.group.docs]
4243
optional = true
@@ -74,6 +75,8 @@ prerelease = true
7475
[tool.pytest.ini_options]
7576
addopts = "-v -Wdefault --cov=habluetooth --cov-report=term-missing:skip-covered"
7677
pythonpath = ["src"]
78+
log_cli="true"
79+
log_level="NOTSET"
7780

7881
[tool.coverage.run]
7982
branch = true

src/habluetooth/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
SOURCE_LOCAL: Final = "local"
1010

1111
START_TIMEOUT = 15
12+
STOP_TIMEOUT = 5
1213

1314
# The maximum time between advertisements for a device to be considered
1415
# stale when the advertisement tracker cannot determine the interval.

0 commit comments

Comments
 (0)