You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor the registries massively, to prepare for even more registry and handler types.
Description
Originally, there were sub-registries and one operator registry consisting of sib-registries. And the operator registry was exposing multiple registed_blah_blah_handler(), [has|get|iter]_blah_blah_handlers() methods, so on.
As the number of handler type increases, having these proxying methods becomes a problem: they do nothing, just proxy to the actual sub-registries (simple lists), but bring a lot of method signatures that has to be maintained and tested.
With this PR, we remove all of these proxying methods completely (technically, deprecate them and warn if they are used, but keep them for a while until the next major release).
The sub-registries should now be used directly, and its handlers should be accesses via the similar methods (same-named, but different typing signatures: e.g. [get|iter]_handlers(...)).
Purpose: In the following PRs, even more registry and handler types will be added: e.g. daemons & timers. Not having even more proxying methods seems convenient.
Also, registries prefixes are removed. They were used for the sub-handlers only. Now, the prefixes are implemented directly for sub-handler decorators.
Since registries were never created directly by the users (unlike the accessing methods above), we have no need to keep backward compatible changes for deprecated prefixes — we just drop them.
What do these changes do?
Refactor the registries massively, to prepare for even more registry and handler types.
Description
Originally, there were sub-registries and one operator registry consisting of sib-registries. And the operator registry was exposing multiple
registed_blah_blah_handler()
,[has|get|iter]_blah_blah_handlers()
methods, so on.As the number of handler type increases, having these proxying methods becomes a problem: they do nothing, just proxy to the actual sub-registries (simple lists), but bring a lot of method signatures that has to be maintained and tested.
With this PR, we remove all of these proxying methods completely (technically, deprecate them and warn if they are used, but keep them for a while until the next major release).
The sub-registries should now be used directly, and its handlers should be accesses via the similar methods (same-named, but different typing signatures: e.g.
[get|iter]_handlers(...)
).Purpose: In the following PRs, even more registry and handler types will be added: e.g. daemons & timers. Not having even more proxying methods seems convenient.
Also, registries prefixes are removed. They were used for the sub-handlers only. Now, the prefixes are implemented directly for sub-handler decorators.
Since registries were never created directly by the users (unlike the accessing methods above), we have no need to keep backward compatible changes for deprecated prefixes — we just drop them.
The end users should not be affected (in theory).
Issues/PRs
Type of changes
Checklist
CONTRIBUTORS.txt
The text was updated successfully, but these errors were encountered: