Title: How to create two (or more) interfaces with the same name · Issue #103 · python-sdbus/python-sdbus · GitHub
Open Graph Title: How to create two (or more) interfaces with the same name · Issue #103 · python-sdbus/python-sdbus
X Title: How to create two (or more) interfaces with the same name · Issue #103 · python-sdbus/python-sdbus
Description: I have a case where I have to create two interfaces with the same name, but with different properties (these interfaces are exposed on different paths). Basically I have two options: a) create one class which will return properties based...
Open Graph Description: I have a case where I have to create two interfaces with the same name, but with different properties (these interfaces are exposed on different paths). Basically I have two options: a) create one ...
X Description: I have a case where I have to create two interfaces with the same name, but with different properties (these interfaces are exposed on different paths). Basically I have two options: a) create one ...
Opengraph URL: https://github.com/python-sdbus/python-sdbus/issues/103
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to create two (or more) interfaces with the same name","articleBody":"I have a case where I have to create two interfaces with the same name, but with different properties (these interfaces are exposed on different paths). Basically I have two options: a) create one class which will return properties based on exposed path (some props are optional) b) create two classes with the same interface name. Unfortunately, both these solutions are not possible right now.\n\nIn case of option a) the limitation seems to be imposed by libsystemd. It's not possible to define property as \"optional\", i.e. when property is not available, the `org.freedesktop.DBus.Properties.GetAll` does not return value for such property and `org.freedesktop.DBus.Properties.Get` returns `org.freedesktop.DBus.Error.InvalidArgs: No such property 'Name'`. The problem is that the `sd_bus_emit_interfaces_added_strv()` function collects all properties internally and in case when property value getter fails, the entire sd_bus_emit_interfaces_ added_* call fails. There are some possibilities like libsystemd-specific `PropertyExplicitFlag` flag, but this conflicts with `PropertyEmitsChangeFlag`. So, such approach is not ideal.\n\nFor option b) the problem is with `sdbus` internals where `parse_properties_changed` uses global `DBUS_INTERFACE_NAME_TO_CLASS` mapping... Would it be possible to remove internal mapping in favor of user provided list of interfaces? This function takes `interface` argument but does not use it...","author":{"url":"https://github.com/arkq","@type":"Person","name":"arkq"},"datePublished":"2025-04-15T13:15:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/103/python-sdbus/issues/103"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:59b530ea-ac5b-9b3a-0d35-a7f0c0b71710 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D850:354483:475C16:632740:698DF489 |
| html-safe-nonce | 714d5031dc3cf6a91ceb46f4470a13cbaff3d0d9decf4b954643da7074934f5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODUwOjM1NDQ4Mzo0NzVDMTY6NjMyNzQwOjY5OERGNDg5IiwidmlzaXRvcl9pZCI6IjYzOTIxODM0MTMwNDI3MDU1NDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9bb4f251ea1abcd840053d535fc3105b1e53738c6511027d1dc8749881b653ec |
| hovercard-subject-tag | issue:2996401647 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-sdbus/python-sdbus/103/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fc44b65387e333e40d6c0614a864388e5a7a561c9554998d2a672f6ba897711f/python-sdbus/python-sdbus/issues/103 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fc44b65387e333e40d6c0614a864388e5a7a561c9554998d2a672f6ba897711f/python-sdbus/python-sdbus/issues/103 |
| og:image:alt | I have a case where I have to create two interfaces with the same name, but with different properties (these interfaces are exposed on different paths). Basically I have two options: a) create one ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | arkq |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae22ef6ad27c5aeb770c5acd314c5724055bb23a663877aafdaaa50ed317ba34 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-sdbus/python-sdbus git https://github.com/python-sdbus/python-sdbus.git |
| octolytics-dimension-user_id | 88226657 |
| octolytics-dimension-user_login | python-sdbus |
| octolytics-dimension-repository_id | 311269257 |
| octolytics-dimension-repository_nwo | python-sdbus/python-sdbus |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 311269257 |
| octolytics-dimension-repository_network_root_nwo | python-sdbus/python-sdbus |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e545f5becd5b3ce9b429b68c3f994ad93c680ddb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width