Re: [sqlalchemy] mapper_configured event, class fully configured?

2015-08-28 Thread Ladislav Lenart
On 27.8.2015 22:13, Douglas Russell wrote: Ok, thanks, that makes sense. Generally everything I see about SQLAlchemy referencing is using backref and it is convenient, but knowing that you actually think back_populates would be your preferred way to implement things is quite nice. I

Re: [sqlalchemy] mapper_configured event, class fully configured?

2015-08-27 Thread Douglas Russell
Ok, thanks, that makes sense. Generally everything I see about SQLAlchemy referencing is using backref and it is convenient, but knowing that you actually think back_populates would be your preferred way to implement things is quite nice. I quite prefer that as I think it makes my code much

[sqlalchemy] mapper_configured event, class fully configured?

2015-08-24 Thread Douglas Russell
Hi again, I'm trying to track an issue making use of Marshmallow-SQLAlchemy (I've also seen what looks like a very similar problem in ColanderAlchemy, but I haven't dug into that yet). I think it might have something to do with the mapper_configured event and whether the class is truly fully

Re: [sqlalchemy] mapper_configured event, class fully configured?

2015-08-24 Thread Mike Bayer
On 8/24/15 9:21 PM, Mike Bayer wrote: On 8/24/15 7:41 PM, Douglas Russell wrote: | def print_stuff(mapper, class_): print getattr(class_, 'books') event.listen(mapper, 'mapper_configured', print_stuff) author = Author(name='Chuck Paluhniuk') | When I run this code, the result is

Re: [sqlalchemy] mapper_configured event, class fully configured?

2015-08-24 Thread Mike Bayer
On 8/24/15 7:41 PM, Douglas Russell wrote: | def print_stuff(mapper, class_): print getattr(class_, 'books') event.listen(mapper, 'mapper_configured', print_stuff) author = Author(name='Chuck Paluhniuk') | When I run this code, the result is that when Author is first used, the