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
DM-15599: Stop using boost persistence in afw #58
Conversation
python/lsst/utils/wrappers.py
Outdated
@@ -377,6 +377,8 @@ def register(self, key, subclass): | |||
isStatic = isinstance(obj, staticmethod) | |||
if isBuiltin or isStatic: | |||
if hasattr(self, name): | |||
if name != "__init__subclass__": | |||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to avoid this special-casing if we can. Can you say anything more about the conditions under which it was needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved it to the if name in "__new__":
test, and that does appear to be a new method we can expect on objects. Please have another look.
from wrappers.py
in TemplateMeta.register. The old message did not provide enough values to `format`, resulting in a strange and irrelevant error. While I was at it I tried to make the message clearer and more informative.
0dc0ffd
to
e43f680
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for me. I was hoping we could use INTRINSIC_SPECIAL_ATTRIBUTES
, but it looks like that wouldn't actually do the job.
in TemplateMeta.register. The problem only showed up for MaskX because that was the only subclass registered with non-None `TEMPLATE_DEFAULTS`
e43f680
to
28adf19
Compare
I am not sure why this change was required.