altdesktop / python-dbus-next

🚌 The next great DBus library for Python with asyncio support
https://python-dbus-next.readthedocs.io/en/latest/
MIT License
187 stars 59 forks source link

update the re pattern for valid name assertion to support gtk application #97

Closed rtgiskard closed 2 years ago

rtgiskard commented 2 years ago

For gtk application(test with Gtk-3.0), generally the registered dbus interface include snippet like this:

    <interface name="org.gtk.Application">
    <method name="Activate">
      <arg type="a{sv}" name="platform-data" direction="in">
      </arg>
    </method>

Currently the member name is matched with the pattern in validators.py:

_element_re = re.compile(r'^[A-Za-z_][A-Za-z0-9_]*$')

for which name with dash like platform-data will be invalid, the pattern need to be update to support gtk application

rtgiskard commented 2 years ago

add PR