Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic registration of serializables happens to early #298

Closed
terrorfisch opened this issue Jul 9, 2018 · 0 comments
Closed

Automatic registration of serializables happens to early #298

terrorfisch opened this issue Jul 9, 2018 · 0 comments

Comments

@terrorfisch
Copy link
Member

For some PulseTemplates the automatic registration happens to early as it triggers serialization for some containers (PulseStorage).

The easy fix for classes that do not need their superclasses attributes in their __init__ is to put the superclass initialization at the end. Is there a better way?

Maybe some kind of __init__ decorator?

@terrorfisch terrorfisch added the Bug label Jul 9, 2018
@terrorfisch terrorfisch added this to the New Serialization Routines milestone Jul 9, 2018
lumip added a commit that referenced this issue Jul 12, 2018
…global registry after they are completely initialized.

Serializable now does not perform registration in __init__ but provides a method _register() which MUST be called by leaf-level subclasses. (This is probably also not a good solution in the long term as it effectively prevents further subclassing from those classes but it works for now).

Signed-off-by: Lukas Prediger <lukas.prediger@rwth-aachen.de>
@lumip lumip closed this as completed Jul 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants