-
Notifications
You must be signed in to change notification settings - Fork 8
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
Can AttributeAnnotations set __parent__
?
#11
Comments
I'll note that zope.principalannotation does this by default. |
But the I am not sure what you want to change. Could you sketch it on a branch? I think it is much easier to think about existing code. |
Fixes #11 in a BWC way using a property. This makes it more like zope.principalannotation (though I didn't change the interface here). Also some doc fixes I noticed when I was fixing up the doctest snippets (I originally had this implementing ``ILocation`` with a `__name__` of `__annotations__` but I realized that didn't really make any sense.)
Fixes #11 in a BWC way using a property. This makes it more like zope.principalannotation (though I didn't change the interface here). Also some doc fixes I noticed when I was fixing up the doctest snippets (I originally had this implementing ``ILocation`` with a `__name__` of `__annotations__` but I realized that didn't really make any sense.)
Sure, #13. It's very simple, it isn't even a new field. |
Fixes #11 in a BWC way using a property. This makes it more like zope.principalannotation (though I didn't change the interface here). Also some doc fixes I noticed when I was fixing up the doctest snippets (I originally had this implementing ``ILocation`` with a `__name__` of `__annotations__` but I realized that didn't really make any sense.)
I did not think it was that easy, but a line of code tells more than a hundred words. :-) |
This would make it compatible with the
IConnection
adapter provided byzope.keyreference
(assuming the object it annotates is persistent), which could simplify some use cases. AttributeAnnotations is itself not persistent, though the BTree it contains is.For pickle compatibility this could be a property that reads
self.obj
.Are there any downsides to making this generally the case?
(This comes out of a discussion in a private repository.)
The text was updated successfully, but these errors were encountered: