Skip to content

Commit 718e5d7

Browse files
committed
v2.0.0
1 parent 2d18e16 commit 718e5d7

File tree

6 files changed

+16
-12
lines changed

6 files changed

+16
-12
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@ and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0
1010
`Unreleased`_
1111
=============
1212

13+
`2.0.0`_ (2025-11-22)
14+
=====================
15+
1316
Added
1417
-----
1518
* Added ``bleak.backends.get_default_backend()`` and ``BleakBackend`` enum for a centralized backend detection.
1619
* Added ``BleakClient().backend_id`` and ``BleakScanner().backend_id`` properties to identify the backend in use.
1720

1821
Changed
1922
-------
20-
* Use AcquireNotify rather than StartNotify for Linux backend on supported characteristics
21-
* Allow multiple calls to ``disconnect()`` on Windows to align behaviour over all backends.
23+
* Use ``"AcquireNotify"`` rather than ``"StartNotify"`` for Linux backend on supported characteristics
24+
* Allow multiple calls to ``disconnect()`` on Windows to align behavior over all backends.
2225
* Raise new ``BleakBluetoothNotAvailableError`` when Bluetooth is not supported, turned off or permission is denied.
2326

2427
Fixed
@@ -1144,7 +1147,8 @@ Fixed
11441147
* Bleak created.
11451148

11461149

1147-
.. _Unreleased: https://github.com/hbldh/bleak/compare/v1.1.1...develop
1150+
.. _Unreleased: https://github.com/hbldh/bleak/compare/v2.0.0...develop
1151+
.. _2.0.0: https://github.com/hbldh/bleak/compare/v1.1.1...v2.0.0
11481152
.. _1.1.1: https://github.com/hbldh/bleak/compare/v1.1.0...v1.1.1
11491153
.. _1.1.0: https://github.com/hbldh/bleak/compare/v1.0.1...v1.1.0
11501154
.. _1.0.1: https://github.com/hbldh/bleak/compare/v1.0.0...v1.0.1

bleak/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def backend_id(self) -> BleakBackend | str:
148148
The value is one of the :class:`BleakBackend` enum values in case of
149149
built-in backends, or a string identifying a custom backend.
150150
151-
.. versionadded:: unreleased
151+
.. versionadded:: 2.0
152152
"""
153153
return self._backend_id
154154

@@ -172,7 +172,7 @@ async def start(self) -> None:
172172
BleakBluetoothNotAvailableError:
173173
if Bluetooth is not currently available
174174
175-
.. versionchanged:: unreleased
175+
.. versionchanged:: 2.0
176176
Now raises :class:`BleakBluetoothNotAvailableError` instead of :class:`BleakError`
177177
when Bluetooth is not currently available.
178178
"""
@@ -547,7 +547,7 @@ def backend_id(self) -> BleakBackend | str:
547547
The value is one of the :class:`BleakBackend` enum values in case of
548548
built-in backends, or a string identifying a custom backend.
549549
550-
.. versionadded:: unreleased
550+
.. versionadded:: 2.0
551551
"""
552552
return self._backend_id
553553

bleak/backends/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class BleakBackend(str, enum.Enum):
1919
"""
2020
Identifiers for available built-in Bleak backends.
2121
22-
.. versionadded:: unreleased
22+
.. versionadded:: 2.0
2323
"""
2424

2525
P4ANDROID = "p4android"
@@ -52,7 +52,7 @@ def get_default_backend() -> BleakBackend:
5252
"""
5353
Returns the preferred backend for the current platform/environment.
5454
55-
.. versionadded:: unreleased
55+
.. versionadded:: 2.0
5656
"""
5757
if os.environ.get("P4A_BOOTSTRAP") is not None:
5858
return BleakBackend.P4ANDROID

bleak/backends/bluezdbus/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def get_default_adapter(self) -> str:
379379
BleakBluetoothNotAvailableError:
380380
if there are no Bluetooth Low Energy adapters or if none of the adapters are powered
381381
382-
.. versionchanged:: unreleased
382+
.. versionchanged:: 2.0
383383
Now raises :class:`BleakBluetoothNotAvailableError` instead of :class:`BleakError`.
384384
"""
385385
if not any(self._adapters):

bleak/exc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class BleakBluetoothNotAvailableReason(enum.Enum):
1414
"""
1515
Reasons for Bluetooth not being available.
1616
17-
.. versionadded:: unreleased
17+
.. versionadded:: 2.0
1818
"""
1919

2020
NO_BLUETOOTH = enum.auto()
@@ -57,7 +57,7 @@ class BleakBluetoothNotAvailableError(BleakError):
5757
"""
5858
Exception which is raised if the Bluetooth access is not available for some reason.
5959
60-
.. versionadded:: unreleased
60+
.. versionadded:: 2.0
6161
"""
6262

6363
def __init__(self, msg: str, reason: BleakBluetoothNotAvailableReason) -> None:

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "bleak"
3-
version = "1.1.1"
3+
version = "2.0.0"
44
description = "Bluetooth Low Energy platform Agnostic Klient"
55
authors = [{ name = "Henrik Blidh", email = "[email protected]" }]
66
license = "MIT"

0 commit comments

Comments
 (0)