properties with backref has it's own attribute_ext overriden by a backref extension
line 662 of properties.py is self.attributeext = self.backref.get_extension()
is this desired?
or should we
self.attributeext = (self.attributeext or [+ self.backref.get_extension())
Comments (5)
-
repo owner -
Account Deleted Hi, yep it's the person who posted
#925. I did mention a while back on the forum that i am going to report the bugs mentionedI don't really have a sensible use case for attributeext, but have implemented a small aspect of something as attributeext to test it out.
If anything, attributeext would be good for append and remove handling on collection attributes (and provide a common way to organise/register such extensions)
Lei
-
repo owner Ok, append/remove is somewhat of a use case, but then again the collections framework allows you to build your own collections with whatever customized behavior you want and that's where we've put the time in documenting how to do it and such (using @appender decorators, etc).
I still think i want to take "attributeext" out of
PropertyLoader
; its not in the publicrelation()
function.if i did want attribute extensions to be a publically available feature, maybe it could be done like:
from sqlalchemy.orm.attributes import attribute_extender class Foo(object): bar = attribute_extender(on_set=somesetter, on_append=onappend)
-
repo owner - changed status to wontfix
attributeext is no longer a public argument and we have quite a lot of ways to augment instrumentation behavior now
-
repo owner - removed milestone
Removing milestone: 0.4.xx (automated comment)
- Log in to comment
uh yeah probably, but then again i think
attributeext
might be better as just becoming something private (remove from PropertyLoader constructor, add an underscore). I'm not really sure I want people building their own attribute extensions ( I did originally). Is there some use case you see for user-defined attribute extensions ? (which would not be more simply and API-neutrally built as class-defined properties).also who's this ? same person who spotted
#925?