- You can now set interaction callbacks at the
DesktopNotifier
level which will be called on interactions with any notifications from the running app. Callbacks set on an individual notification take precedence if set.
send
methods now return the notification ID instead of the notification instance.- Notification objects are fully immutable.
- Callbacks on notification dismissal not being called on macOS.
- Setting
notification_limit
will be ignored and logs a deprecation warning.
- Deprecated APIs from v5.0.0.
- Fixed compatibility of type annotations with Python 3.8.
- Support for custom notification sounds on all backends.
- Allow specifying sounds and icons either by name (for existing system sounds) or as a referenced by a URI or path.
- Allow specifying attachments either by URI or path.
- Add a
get_capabilities()
API that returns which features are supported by a platform. - Compatibility with Ubuntu 20.04 and other older Dbus notification servers which do not conform to the current desktop notification API spec.
- A dedicated class
DesktopNotifierSync
with a blocking API instead of the async API ofDesktopNotifier
.
- Removed code signing requirement for macOS binaries. Instead of preventing notification requests, only log a warning that notifications may fail. It is not documented which code signature checks an app must pass to send notifications and this allows apps that fail some of the checks and still send notifications.
- Fixed a segfault on macOS when passing an attachment path that does not refer to an actual file.
- Deprecated specifying icons as strings. Use the
base.Icon
class instead. - Deprecated specifying attachments as URI strings. Use the
base.Attachement
class instead. - Deprecated specifying notification sounds as boolean (
True
= default sound,False
= no sound). Usebase.DEFAULT_SOUND
for the system default andNone
for no sound instead. Use thebase.Sound
class for custom sounds.
- Removed the synchronous
DesktopNotifier.send_sync()
API. UseDesktopNotifierSync
instead.
- Require winrt>=2.0, the first stable release of the Python to WinRT bridge.
- Fail gracefully when call for authorization fails on Windows with an OSError.
- Added type checking to Windows backend.
- Removed support for NSUserNotificationCenter. This means that macOS 10.13 and older are no longer supported.
- Remove importlib_resources dependency in favour of stdlib importlib.resources. This also fixes a breakage due to API changes in importlib_resources>=6.0.
- Fixes an issue with the
on_clicked
callback being shown as a button with label "default" on Xfce desktop environments.
- Adds a new API DesktopNotifier.send_notification(notification) which directly takes a notification instance as argument.
- Fixes an issue on macOS where type hints for ObjC classes where incorrectly interpreted due to the use of deferred type hint evaluation.
- Fixes missing default app icon.
- Fixes callbacks for interactions with grouped notifications on Windows.
- This release introduces proper Windows support after the windows backend has been in pre-release for some time.
- Handle gracefully if we cannot detect the App ID on Windows.
- Introduce support for notification timeouts, currently on Linux only.
- Improve error handling and detection in Windows implementation when asking for permission to send notifications and run background tasks.
- Update winsdk to v1.0.0b7 and make API adjustments.
Fixes an issue where passing icon = ''
to DesktopNotifier.send()
would always
default to using the app icon. This should only be the case when passing icon = None
which is the default value.
- Experimental support for Windows Toast notifications.
- Fixes callbacks not being called when pressing the button with index 0 when using the Dbus backend.
- Updated type hints and marked package as py.typed.
- Added support for notification urgencies in macOS 12 and iOS 15.
- Fixed a segfault when running from a non-framework build of Python on macOS 10.14 and higher.