This version significantly reworked the internal undocumented classes
and functions. If you used the undocumented API you would probably need
to adjust your code. Type checker like mypy can be very useful for this.
@setter_privatecan now be used in overrides.- Added
assertDbusSignalEmitsmethod toIsolatedDbusTestCase. Can be used to assert that a D-Bus signal was emitted inside theasync withblock. - Added
sdbus.utils.parse_get_managed_objectsfunction. Can be used to parse the ObjectManager'sget_managed_objectsmethod data to classes and Python attribute names. - Added a handle that is returned by
export_to_dbusandexport_with_managermethods. This handle can be used to explicitly control when object is accessible from D-Bus. (requested by @dragomirecky)
- Fixed async D-Bus properties not having a proper generic typing. (reported by @ValdezFOmar)
- Fixed build not working when systemd has a minor version suffix.
- Fixed being unable to name arguments in D-Bus introspection when method has no return arguments. (reported by @colazzo)
- Fixed serving D-Bus methods that return a single struct. (reported by @colazzo)
- Fixed sending extremely large D-Bus messages getting stuck. (reported by @colazzo)
- Improved interface generator handling of multiple uppercase letters
sequences. For example,
ACTIVATE_CONNECTIONwould before be converted toa_c_t_i_v_a_t_e__c_o_n_n_e_c_t_i_o_nand after toactivate_connection. (reported by @bhattarabi) - Improved python formatting generated by interface code generator.
- Added option
--blockto generate blocking interface code. (requested by @zhanglongqi and @MathisMARION)
- Fixed docstrings still being present even if python was configured with
--without-doc-strings. - Fixed interface generator crashing when a rare write-only property is encountered. (reported by @gotthardp)
- Fixed async interfaces iterating over all members during initialization. (reported by @gotthardp)
- Fixed
TypeError: Dbus type '\x00' is unknownbeing raised when trying to read from a message more than one time. (reported by @IB1387 and @asmello) - Fixed missing class body when generating code for interface without members.
- Added support for
Nonesignals without data. - Added boolean flags for the name request functions which can be used to specify replacements or queueing.
- Added
sdbus.utils.parse_properties_changedhelper function. Parses signal data to python member names and values. - Added
sdbus.utils.parse_interfaces_addedhelper function. Parses signal data to path, python class and python member names and values. - Added
sdbus.utils.parse_interfaces_removedhelper function. Parses signal data to path and python class. - Added
setter_privatedecorator to async properties. Private setter can only be called locally but to D-Bus property will appear as read only. - Added new exceptions for when D-Bus name requests fail.
SdBusRequestNameExistsError: Someone already owns name.SdBusRequestNameAlreadyOwnerError: Caller already owns name.SdBusRequestNameInQueueError: Name request queued up.
- Moved all exceptions to
sdbus.exceptionsmodule. For backwards compatibility old exceptions will be available from the root module until the version1.0.0.
- Fixed autodoc adding
dbus_methodto dbus methods names - Fix async D-Bus name requests not raising appropriate exceptions.
- Fixed
request_default_bus_namebeing an async function. For backwards compatibility it returns an awaitable that raises a warning.
- Added
on_unknown_memberoption to theproperties_get_all_dictmethod. Specifies the action on what to do with unknown property. ("error"(default),"ignore","reuse")
- Fixed autodoc regressions introduced in
0.10.1. Properties and signals headers have been redesigned. - Fixed PropertiesChanged signal emitting only the newest object path.
- Added
catch_anywheremethod to dbus signals. Creates an async iterator which yields object path that emitted signal and signal data. Can be called from class but requires explicit service name in that case. - Added
properties_get_all_dict()method toDbusInterfaceCommonAsyncandDbusInterfaceCommonclasses. Retrieves all D-Bus object properties as a dictionary where keys are member names translated to Python names and values are property values.
- Mapped all built-in Python exceptions to D-Bus errors.
- Default bus connection now uses context/thread-local storage. This is potentially breaking in code that used bus in a different threads or contexts.
- Added
map_exception_to_dbus_errorwhich lets mapping of any exception to D-Bus error name. - D-Bus interfaces and member names are now verified before exporting to D-Bus. A helpful error message will be returned if verification fails.
- Added ability to export and track objects with ObjectManager.
- Added
sdbus.unittest.IsolatedDbusTestCasewhich is a test case that runs on a separated D-Bus instance. Requiresdbus-daemoncommand be installed. - Allow replacing the default bus. Changing default bus will not have effect on existing objects which will continue to use the old bus.
- Fixed non-mapped errors in methods called from D-Bus not returning generic error.
- Fixed errors in properties always returning Access Denied instead of specific or generic D-Bus errors.
- Fixed
strandintsubclasses not being accepted on fast API. - Fixes trying to process a disconnected bus and causing high CPU usage.
- Marked autodoc extension safe for parallel reading and writing.
- pkg-config is now required when building from source.
- Added support for Alpine Linux and any other distros using elogind instead of systemd.
- Improved PropertiesChanged signal emissions for python objects.
- Fixed python D-Bus methods that return single struct.
- Fixed missing header file from the source package.
- Deprecated
DbusInterfaceCommonAsync._connectandDbusInterfaceCommonAsync.new_connectin favor ofDbusInterfaceCommonAsync._proxifyandDbusInterfaceCommonAsync.new_proxyrespectively.
- Added
gen-from-connectioncommand to module that generates interface classes from run-time introspection. Takes service name and one or more object paths as arguments. Outputs to stdout. - Added
sd_bus_open_system_remotecall that opens a remote system bus through SSH. - Added
sd_bus_open_system_machineandsd_bus_open_user_machinecalls that open a bus connection inside systemd-nspawn containers.
- Typing stub will raise an exception when called in case the C module failed to load. This should reduce crypting errors in case the module failure.
- Interface generator now skips standard interfaces such as
org.freedesktop.DBus.Introspectable
- Added limited API module. This has advantage of working on multiple Python versions but 5% performance penalty. PyPI will probably use the limited API module.
- Fixed any libsystemd errors causing a segmentation fault.
- Fixed unmapped errors not being raised properly.
- Added binary packages to PyPI. No more issues with libsystem versions.
- BREAKING Moved proxies from
sdbus.proxies,sdbus.async_proxiestosdbus_asyncandsdbus_block. - Added
org.freedesktop.DBus.ObjectManagerinterface and a base interface with it. - Added
org.freedesktop.DBus.Propertiesinterface to base interface. - Added autodoc extension.
- Added interface code generator.
- Added
request_default_bus_nameto request name on default bus in blocking order. - Added
SdBus.request_nameto requests name in blocking order. Useful to initialize the daemons. - Fixed any initialized dbus objects never being deleted even if there were no more references to them.