Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
e01e264
github: drop -dev from Python 3.13
dlech Nov 3, 2024
a8996c5
Log to stderr instead of stdout by default
frereit Jan 14, 2025
31a1e9b
Update poetry to v2
cdce8p Feb 4, 2025
1f08aff
Update black formatting
cdce8p Feb 4, 2025
028fe71
Update flake8 to 7.1.1 to fix false-positives
cdce8p Feb 4, 2025
afe58f1
setup.cfg: ignore Flake E231
dlech Mar 30, 2025
b268261
bleak: deprecate omitting write_gatt_char() response arg
patman15 Apr 5, 2025
2b7bfb7
Merge branch 'develop' into update-poetry
dlech Apr 5, 2025
39dd21e
CHANGELOG.rst: fix formatting
dlech Apr 5, 2025
90e3e5c
Merge pull request #1718 from cdce8p/update-poetry
dlech Apr 5, 2025
83d58bf
Merge branch 'develop' into patch-1
dlech Apr 5, 2025
c61d352
Merge pull request #1709 from frereit/patch-1
dlech Apr 5, 2025
ff044d1
pyproject: drop support for Python 3.8
dlech Apr 6, 2025
0f913d0
CHANGELOG: fix typo
dlech Apr 19, 2025
7feb2fb
pyproject: remove upper bound on most dependency versions
dlech Apr 19, 2025
808cdf3
winrt: Update to v3.1
dlech Apr 19, 2025
89eae47
bleak: restore description of response=None
dlech Apr 19, 2025
c4b6905
bluez: fix service interface leak
dlech Apr 19, 2025
a1ce05e
bluez: Fix DBus connection leak by utilizing AsyncExitStack
koenvsteenb Dec 16, 2024
534b58a
docs: ignore .venv dircectory
dlech Apr 20, 2025
2b718a5
winrt: improve type hints for adv data args
dlech Apr 20, 2025
d4995d2
winrt: fix another winrt v3 api change
dlech Apr 20, 2025
309f200
winrt: improve logging in pair method
dlech Apr 20, 2025
fc8fa2a
winrt: move event wait inside timeout
dlech Apr 20, 2025
0c5b1e5
make extraction of device path from characteristic path more robust
mmatthebi May 5, 2025
52a53fe
Corebluetooth: add notification descriminator (#1742)
alanfischer May 10, 2025
00937c4
bleak: add pair param to BleakClient()
dlech Apr 20, 2025
8dea852
bluez/characteristic: remove unused _GattCharacteristicsFlagsEnum
dlech May 10, 2025
8c5ad92
docs: remove requirements.txt
dlech May 10, 2025
25f7279
pyproject: update docs dependencies
dlech May 10, 2025
32f6651
corebluetooth: add type hints for new notification discriminator
dlech May 10, 2025
3980bb5
docs/macos: elaborate on pairing
dlech May 10, 2025
4b926d8
Att error 15 name fix (#1746)
Niflheim-uk May 16, 2025
8031c37
CHANGELOG: remove duplicate heading
dlech May 16, 2025
1f058d0
pyproject update jinja2
dlech May 16, 2025
6db7b6b
bleak: undeprecate response=None arg to BleakClient.write_gatt_char()
dlech May 16, 2025
7e960d8
remove deprecated parameters
dlech May 16, 2025
57bb701
bleak: remove deprecated methods
dlech May 16, 2025
734d589
don't allow calling is_connected as a method
dlech May 16, 2025
9af83f7
Remove deprecated properties from BLEDevice.
dlech May 16, 2025
28e4f53
change connect/disconnect/pair/unpair method returns to None
dlech May 16, 2025
b2ddaa1
Drop support for macOS < 10.13
dlech May 16, 2025
6dc66ce
Drop support for BlueZ < 5.55
dlech May 16, 2025
d932d47
github: add bot to close stale issues
dlech May 16, 2025
b988c1a
github: only build and test if code changes
dlech May 16, 2025
050acfc
docs: update RPi troubleshooting section
dlech May 16, 2025
a50c986
Update macos.rst
alanfischer May 16, 2025
745e014
typing: use Python 3.9 list[T] instead of List[T]
dlech May 17, 2025
eefd0fb
typing: use python 3.9 tuple[...] instead of typing.Tuple[...]
dlech May 17, 2025
2ab0508
typing: use python 3.9 dict[K, V] instead of typing.Dict
dlech May 17, 2025
3e5a596
typing: use python 3.9 set[T] instead of typing.Set
dlech May 17, 2025
b8ed92c
typing: use python 3.9 type[T] instead of typing.Type[T]
dlech May 17, 2025
bfa00e0
typing: use collections.abc instead of deprecated typing aliases
dlech May 17, 2025
8be4540
CHANGELOG: add link to fixed issue
dlech May 17, 2025
b982065
typing: fix missing generic type arguments
dlech May 17, 2025
7da9c0e
typing: add explicit type for kwargs
dlech May 17, 2025
6f042b1
typing: fix unreachable
dlech May 17, 2025
578421e
backends: bluez: fix wrong import module
dlech May 17, 2025
3321c30
backends: add hack to ignore different platforms from type checkers
dlech May 17, 2025
003d2db
examples: fix wrong kwarg name
dlech May 18, 2025
72b6b22
general type hint improvements
dlech May 18, 2025
7147f6c
backends: bluez: type hint improvements
dlech May 18, 2025
e52929d
backends: winrt: more typing improvements
dlech May 18, 2025
f518dea
typings: fix wrong file extension
dlech May 18, 2025
fa03c5c
use absolute import instead of relative
dlech May 18, 2025
ee9cc6b
examples: strongly typed args namespace
dlech May 18, 2025
3c777c2
bleak.args: add new sub-package for backend-specific args
dlech May 18, 2025
ba0df67
examples: use {} instead of dict() for backend args
dlech May 18, 2025
5ac4c83
examples: more typing fixes
dlech May 18, 2025
38924d7
fix Self imports
dlech May 18, 2025
6130c80
backends: winrt: rename RawAdvData
dlech May 18, 2025
a887f12
typing: ignore PlatformBleakScanner constructor complaints
dlech May 18, 2025
6ed559c
typings/Foundation: add NSBundle
dlech May 18, 2025
5af0c7a
backends: get_services is no longer a required method
dlech May 18, 2025
b7d963b
backends: client: use @override decorator
dlech May 18, 2025
d46a888
backends: scanner: remove set_scanning_filter() method
dlech May 18, 2025
cb1cd8f
backends: scanner: use override decorator
dlech May 18, 2025
d98b924
backends: android: drop __del__ methods
dlech May 18, 2025
8fc5eb9
examples: include device name in info
dlech May 18, 2025
127bd4f
backends: scanner: fix type of device name
dlech May 18, 2025
cd9862c
backends: bluez: use None for name instead of address
dlech May 18, 2025
9c11c6e
CHANGELOG: clean up a bit
dlech May 18, 2025
579a8a6
backends: bluezdbus: fix regression in connect() method
dlech May 18, 2025
2fc8636
backends: corebluetooth: improve typings
dlech May 18, 2025
dcaca25
backends: descriptor: remove subclassess
dlech May 18, 2025
a99afb6
backends: characteristic: remove subclasses
dlech May 19, 2025
3894161
backends: service: remove BleakGATTService subclasses
dlech May 19, 2025
15945c8
backends: refactor common characteristics lookup code
dlech May 19, 2025
8d832d3
backends: refactor resolving descriptors
dlech May 19, 2025
977f339
backends: service: fix a type error with cast
dlech May 19, 2025
689f21e
backends: winrt: don't wait for disconnect
dlech May 23, 2025
70eb53a
move "Created on" out of doc comments
dlech May 23, 2025
a52dcca
AUTHORS: acknowledge contributors who did not add their name to this …
dlech May 23, 2025
7b4e7bc
typings: fix a couple mypy complaints
dlech May 23, 2025
a778e1a
backends/characteristic: fix type hint
dlech May 23, 2025
6e78cca
backends: winrt: move protection_level out of parameters
dlech May 24, 2025
90f1890
backends: winrt: swap order of is_paired and can_pair check
dlech May 24, 2025
f1f855d
backends: winrt: improve pairing error message
dlech May 24, 2025
97d5cac
backends: winrt: fix pair debug message with wrong value
dlech May 24, 2025
d674a0c
backends: winrt: try highest pairing level first
dlech May 24, 2025
60f483f
backends: winrt: deprecate protection_level
dlech May 24, 2025
b8d89fb
github: add stale bot messages
dlech May 29, 2025
aacc0eb
build(deps-dev): bump requests from 2.32.0 to 2.32.4
dependabot[bot] Jun 10, 2025
b0cc763
backends: winrt: scanner: enable extended advertising
JordanYates Jun 11, 2025
6438da5
build(deps-dev): bump urllib3 from 1.26.19 to 2.5.0
dependabot[bot] Jun 18, 2025
fe82d06
bleak: use longer timeout when pairing during connect
dlech Jun 21, 2025
fa784a1
backends: bluez: handle address change after pairing
dlech Jun 21, 2025
cefe9d8
bleak: use backend-specific key for seen_devices
dlech Jun 21, 2025
69f634e
v1.0.0
dlech Jun 28, 2025
d2d4f63
Merge pull request #1780 from hbldh/release/v1.0.0
dlech Jun 28, 2025
b6a61d4
Merge pull request #1781 from hbldh/master
dlech Jun 28, 2025
7304b4f
"tomli" was included in Python 3.11 as "tomllib" (#1782)
a-detiste Jun 29, 2025
acf7f59
bluez: client: fix a few static typing complaints
dlech Jun 29, 2025
a0acd55
backends/device: restore **kwargs in BLEDevice constructor
dlech Jun 30, 2025
e8fcfa0
backends: bluezdbus: restore deprecated imports
dlech Jun 30, 2025
a46d9b6
github: add -v option to pytest
dlech Jun 30, 2025
bf224c0
v1.0.1
dlech Jun 30, 2025
df55dcd
Merge pull request #1786 from hbldh/release/v1.0.1
dlech Jun 30, 2025
2b4c8b8
Merge pull request #1787 from hbldh/master
dlech Jun 30, 2025
da52232
Update service_explorer.py
patman15 Jul 20, 2025
d65d192
examples/service_explorer: pass objects directly instead of handles
dlech Jul 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Before you submit a pull request, check that it meets these guidelines:
1. If the pull request adds functionality, the docs should be updated.
2. Modify the `CHANGELOG.rst`, describing your changes as is specified by the
guidelines in that document.
3. The pull request should work for Python 3.8+ on the following platforms:
3. The pull request should work for Python 3.9+ on the following platforms:
- Windows 10, version 16299 (Fall Creators Update) and greater
- Linux distributions with BlueZ >= 5.43
- OS X / macOS >= 10.11
- Linux distributions with BlueZ >= 5.55
- OS X / macOS >= 10.13
4. Squash all your commits on your PR branch, if the commits are not solving
different problems and you are committing them in the same PR. In that case,
consider making several PRs instead.
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ name: Build and Test
on:
push:
branches: [ master, develop ]
paths: [ 'bleak/**', 'tests/**' ]
pull_request:
branches: [ master, develop ]
paths: [ 'bleak/**', 'tests/**' ]

jobs:
build_desktop:
Expand All @@ -14,7 +16,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -31,7 +33,7 @@ jobs:
run: pipx run poetry install --only main,test
- name: Test with pytest
run: |
pipx run poetry run pytest tests --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml --cov=com --cov-report=xml --cov-report=html
pipx run poetry run pytest -v tests --junitxml=junit/test-results-${{ matrix.os }}-${{ matrix.python-version }}.xml --cov=com --cov-report=xml --cov-report=html
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install development dependencies
run: pipx run poetry install --only docs,lint
- name: Check import sort with isort
run: pipx run poetry run isort . --check --diff
run: pipx run poetry run isort {.,docs} --check --diff
- name: Check code formatting with black
run: pipx run poetry run black . --check --diff
- name: Lint with flake8
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/stale_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '37 1 * * 0'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-stale: 500
days-before-close: 100
any-of-labels: '3rd party issue, more info required'
stale-issue-message: This issue has been automatically marked as stale because it has not had any activity for 500 days. It will be closed in 100 days if no further activity occurs.
close-issue-message: This issue has been automatically closed because it has not had any activity for 100 days after being marked as stale.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"black-formatter.importStrategy": "fromEnvironment",
"isort.importStrategy": "fromEnvironment",
"isort.args":["--profile", "black"],
"flake8.importStrategy": "fromEnvironment"
"flake8.importStrategy": "fromEnvironment",
"python.analysis.typeCheckingMode": "strict"
}
2 changes: 2 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Contributors
* JP Hutchins <jphutchins@gmail.com>
* Bram Duvigneau <bram@bramd.nl>

And many others who did not wish to be named here.

Sponsors
--------

Expand Down
55 changes: 54 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,56 @@ and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0
`Unreleased`_
=============

`1.0.1`_ (2025-06-30)
=====================

Changed
-------
- Added deprecation warnings for importing ``bleak.args.*`` types from ``bleak.backends.*``.

Fixed
-----

- Restored ``**kwargs`` in ``BLEDevice()`` constructor. Fixes #1783.
- Restored importing ``OrPattern`` from ``bleak.backends.bluezdbus.advertisement_monitor``.


`1.0.0`_ (2025-06-28)
=====================

Added
-----
* Added ``pair`` parameter to ``BleakClient()`` constructor to allow pairing before connecting. Fixes #309.
* Added ``notification_discriminator`` parameter to ``start_notify()`` on CoreBluetooth backend. Merged #1742.

Changed
-------
* Enabled extended advertising scanning in the WinRT backend. Merged #1705.
* Made `response` argument of class ``BleakClient.write_gatt_char()`` explicitly optional. Fixes #1730.
* Updated Poetry build system version to ``>=2.0``. Merged #1718.
* Log to stderr instead of stdout when ``BLEAK_LOGGING`` is enabled. Merged #1709.
* Updated ``winrt`` backend to use PyWinRT >= 3.1.
* Changed return type of ``connect()``, ``disconnect()``, ``pair()`` and ``unpair()`` methods to ``None``.
* Moved backend-specific arg types to new ``bleak.args`` sub-package.
* ``BLEDevice.name`` will now return ``None`` instead of the address when the name is not available. Merged #1762.
* Deprecated ``protection_level`` kwarg for pairing in WinRT backend. Merged #1770.

Fixed
-----
* Fixed resolvable private address not updated after connecting in BlueZ backend. Fixes #1737.
* Fixed possible ``KeyError`` when getting services in BlueZ backend. Fixes #1435.
* Fix D-Bus connection leak when connecting to a device fails in BlueZ backend. Fixes #1698.
* Fixed possible deadlock when connecting on WinRT backend when device is already connected. Fixes #1757.
* Fixed getting notifications from devices connected to BLE adapters with index >9 (hci10, hci11, ...). Merged #1744.
* Fixed ATT error code 15 description to "Insufficient Encryption". Merged #1746.

Removed
-------
* Removed support for Python 3.8. The minimum supported version is now Python 3.9.
* Removed deprecated parameters, properties and methods.
* Removed support for macOS < 10.13.
* Removed support for BlueZ < 5.55.

`0.22.3`_ (2024-10-05)
======================

Expand Down Expand Up @@ -484,6 +534,7 @@ Changed
* Replaced usage of deprecated ``@abc.abstractproperty``.
* Use ``asyncio.get_running_loop()`` instead of ``asyncio.get_event_loop()``.
* Changed "service is already present" exception to logged error in BlueZ backend. Merged #622.
* WinRT backend no longer waits for GATT session to close on disconnect. Fixes #1759.

Removed
-------
Expand Down Expand Up @@ -1047,7 +1098,9 @@ Fixed
* Bleak created.


.. _Unreleased: https://github.com/hbldh/bleak/compare/v0.22.3...develop
.. _Unreleased: https://github.com/hbldh/bleak/compare/v1.0.1...develop
.. _1.0.1: https://github.com/hbldh/bleak/compare/v1.0.0...v1.0.1
.. _1.0.0: https://github.com/hbldh/bleak/compare/v0.22.3...v1.0.0
.. _0.22.3: https://github.com/hbldh/bleak/compare/v0.22.2...v0.22.3
.. _0.22.2: https://github.com/hbldh/bleak/compare/v0.22.1...v0.22.2
.. _0.22.1: https://github.com/hbldh/bleak/compare/v0.22.0...v0.22.1
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ Before you submit a pull request, check that it meets these guidelines:
1. If the pull request adds functionality, the docs should be updated.
2. Modify the ``CHANGELOG.rst``, describing your changes as is specified by the
guidelines in that document.
3. The pull request should work for Python 3.8+ on the following platforms:
3. The pull request should work for Python 3.9+ on the following platforms:
- Windows 10, version 16299 (Fall Creators Update) and greater
- Linux distributions with BlueZ >= 5.43
- OS X / macOS >= 10.11
- Linux distributions with BlueZ >= 5.55
- OS X / macOS >= 10.13
4. Squash all your commits on your PR branch, if the commits are not solving
different problems and you are committing them in the same PR. In that case,
consider making several PRs instead.
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Features
--------

* Supports Windows 10, version 16299 (Fall Creators Update) or greater
* Supports Linux distributions with BlueZ >= 5.43
* OS X/macOS support via Core Bluetooth API, from at least OS X version 10.11
* Supports Linux distributions with BlueZ >= 5.55
* OS X/macOS support via Core Bluetooth API, from at least OS X version 10.13
* Android backend compatible with python-for-android

Bleak supports reading, writing and getting notifications from
Expand Down
Loading
Loading