Skip to content

Releases: python-sdbus/python-sdbus

0.12.0

23 Mar 11:50
0.12.0
55d2667
Compare
Choose a tag to compare

Python 3.8 is getting end of life in 2024. Python-sdbus will most likely increase the minimum Python version requirement to 3.9 in 2024.

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.

Features:

  • @setter_private can now be used in overrides. (requested by @colazzo)
  • Added assertDbusSignalEmits method to IsolatedDbusTestCase.
    Can be used to assert that a D-Bus signal was emitted
    inside the async with block.
  • Added sdbus.utils.parse_get_managed_objects function. Can be
    used to parse the ObjectManager's get_managed_objects method
    data to classes and Python attribute names.
  • Added a handle that is returned by export_to_dbus and export_with_manager
    methods. This handle can be used to explicitly control when object is accessible
    from D-Bus. (requested by @dragomirecky)

Fixes:

  • 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)

0.12.RC1

17 Mar 15:42
0.12.RC1
95751a7
Compare
Choose a tag to compare
0.12.RC1 Pre-release
Pre-release

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.

Features:

  • @setter_private can now be used in overrides. (requested by @colazzo)
  • Added assertDbusSignalEmits method to IsolatedDbusTestCase.
    Can be used to assert that a D-Bus signal was emitted
    inside the async with block.
  • Added sdbus.utils.parse_get_managed_objects function. Can be
    used to parse the ObjectManager's get_managed_objects method
    data to classes and Python attribute names.
  • Added a handle that is returned by export_to_dbus and export_with_manager
    methods. This handle can be used to explicitly control when object is accessible
    from D-Bus. (requested by @dragomirecky)

Fixes:

  • 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)

0.11.1

29 Oct 13:51
0.11.1
9040f15
Compare
Choose a tag to compare

Features:

  • Improved interface generator handling of multiple uppercase letters
    sequences. For example, ACTIVATE_CONNECTION would before be converted
    to a_c_t_i_v_a_t_e__c_o_n_n_e_c_t_i_o_n and after to activate_connection.
    (reported by @bhattarabi)
  • Improved python formatting generated by interface code generator.
  • Added option --block to generate blocking interface code.
    (requested by @zhanglongqi and @MathisMARION)

Fixes:

  • 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 unknown being 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.

0.11.0

22 Jan 10:38
0.11.0
f1312d4
Compare
Choose a tag to compare

Features:

  • Added support for None signals without data.
  • Added boolean flags for the name request functions
    which can be used to specify replacements or queueing.
  • Added sdbus.utils.parse_properties_changed helper function.
    Parses signal data to python member names and values.
  • Added sdbus.utils.parse_interfaces_added helper function.
    Parses signal data to path, python class and python member names
    and values.
  • Added sdbus.utils.parse_interfaces_removed helper function.
    Parses signal data to path and python class.
  • Added setter_private decorator 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.

Deprecations:

  • Moved all exceptions to sdbus.exceptions module.
    For backwards compatibility old exceptions will be
    available from the root module until the version 1.0.0.

Fixes:

  • Fixed autodoc adding dbus_method to dbus methods names
  • Fix async D-Bus name requests not raising appropriate exceptions.
  • Fixed request_default_bus_name being an async function.
    For backwards compatibility it returns an awaitable that raises a warning.

0.10.2

13 Aug 17:58
0.10.2
4893c6e
Compare
Choose a tag to compare

Features:

  • Added on_unknown_member option to the properties_get_all_dict
    method. Specifies the action on what to do with unknown property.
    ("error" (default), "ignore", "reuse")

Fixes:

  • Fixed autodoc regressions introduced in 0.10.1.
    Properties and signals headers have been redesigned.
  • Fixed PropertiesChanged signal emitting only the newest object
    path.

0.10.1

31 Jul 18:01
0.10.1
7928ef9
Compare
Choose a tag to compare

Features:

  • Added catch_anywhere method 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 to DbusInterfaceCommonAsync and
    DbusInterfaceCommon classes. Retrieves all D-Bus object properties as
    a dictionary where keys are member names translated to Python names and
    values are property values.

0.10.0

13 Jun 18:27
0.10.0
47c54f5
Compare
Choose a tag to compare

Features:

  • 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_error which 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.IsolatedDbusTestCase which is a test case that
    runs on a separated D-Bus instance. Requires dbus-daemon command 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.

Fixes:

  • 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 str and int subclasses 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.

0.9.0

17 Apr 19:41
0.9.0
0612446
Compare
Choose a tag to compare
  • 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.

0.8.5

27 Nov 15:57
0.8.5
74af8c8
Compare
Choose a tag to compare
* Fixed missing header file from the source package.

0.8.4

31 Oct 09:14
0.8.4
b0364af
Compare
Choose a tag to compare
  • Deprecated DbusInterfaceCommonAsync._connect and DbusInterfaceCommonAsync.new_connect in favor
    of DbusInterfaceCommonAsync._proxify and DbusInterfaceCommonAsync.new_proxy respectively.