Title: Move code for exporting attributes to the attribute's classes by dragomirecky · Pull Request #82 · python-sdbus/python-sdbus · GitHub
Open Graph Title: Move code for exporting attributes to the attribute's classes by dragomirecky · Pull Request #82 · python-sdbus/python-sdbus
X Title: Move code for exporting attributes to the attribute's classes by dragomirecky · Pull Request #82 · python-sdbus/python-sdbus
Description: Hello, this PR makes some relatively small improvements (in my opinion) to the internal structure of the code. It renames all the DbusSomething classes to DbusAttribute. "Something" referred to method/signal/property of an interface. Looking at sdbus and elsewhere, those are usually called "attributes" of the interface. Together with the other changes in this PR, I believe it makes the code clearer. It renames the classes for bound attributes Discussed here already #65 I believe calling the attributes "bound" is correct, the same way we have "bound methods" in Python. Thus the base classes for bound attributes is "DbusBound". The concrete subclasses representing bound attributes are then called DbusLocalMethodAsync, DbusLocalMethodAsync, etc (as suggested by @igo95862 ; not repeating the "Bound" word, as it doesn't seem to be necessary in that context) Most importantly, it moves some attribute-specific code from DbusInterfaceBaseAsync to the DbusLocalMethodAsync. This change is my main motivation behind this PR. By having the logic of "exporting an attribute to dbus" in the attribute class itself, it gets much easier for clients of this library to extend the library with more advanced attributes (which is my case – I need to be able to implement custom versions of @dbus_property_async and this change makes it much easier to do so). At the same time, it tries to make the code actually simpler (also slightly improving DbusExportHandle).
Open Graph Description: Hello, this PR makes some relatively small improvements (in my opinion) to the internal structure of the code. It renames all the DbusSomething classes to DbusAttribute. "Something" ref...
X Description: Hello, this PR makes some relatively small improvements (in my opinion) to the internal structure of the code. It renames all the DbusSomething classes to DbusAttribute. "Something&q...
Opengraph URL: https://github.com/python-sdbus/python-sdbus/pull/82
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:a7f0d05e-d9cc-2005-e305-3c5c8eb5a6c4 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E63C:3CD90B:1CBF985:276F9E0:698DC652 |
| html-safe-nonce | dcc194674f17fed2a2a19e4af88408364f65b90c85e798cd2661a91668f51471 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjNDOjNDRDkwQjoxQ0JGOTg1OjI3NkY5RTA6Njk4REM2NTIiLCJ2aXNpdG9yX2lkIjoiNjA1NjcyNjc4NzY4NDk0MzQ0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c8b861c4d8840081656d84330f97170e93e5e8705915e5292f5c7dc7f0e18bd7 |
| hovercard-subject-tag | pull_request:2220503796 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python-sdbus/python-sdbus/pull/82/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1269664?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1269664?s=400&v=4 |
| og:image:alt | Hello, this PR makes some relatively small improvements (in my opinion) to the internal structure of the code. It renames all the DbusSomething classes to DbusAttribute. "Something" ref... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2457fd9a1b17ca7f38c3c2653895ccb2e0dd04f18f77446a21354e9bc4b7902f |
| turbo-cache-control | no-cache |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 878672b82363fd98fbdc5bd0edb68e572c8a8d9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width