Dnia 2009-11-02, pon o godzinie 11:05 -0500, Michael Bayer pisze:

> flush what you need first.   then do things that are not compatible with
> autoflush.

The point is that I am developing a layer which attempts to hide all
sqlalchemy/relational details and provide a clean and consitent API to
effectively build/manage persistent python data structures. Enforcing
the user (developer) to call flush() "in case" seems wrong to me.


> need you to attach the patch to an email or paste it elsewhere since
> dpaste is down

Sure thing, here it is: http://filip.math.uni.lodz.pl/attributes.diff

>  it surprises me that all tests would pass since I recall
> writing tests that were very sensitive to the order of events in those
> methods, in particular that the events would fire off in such a way as to
> prevent further steps from proceeding,

http://filip.math.uni.lodz.pl/sqlatest.txt here is the test session
result.

> then again it seems unusual that
> modified_event() is called first, so perhaps the tests did not address
> that aspect.
> 
> the patch also needs to be against trunk.

Well I am developing on 0.5 so I have prepared a patch against 0.5.

>  Before patching someone would
> have to add some tests to at least test_attributes.py that exercise its
> expected behavior.

I am looking at test_attributes.py and have trouble figuring out how to
write such test, but I will try.

>  I would also need to document within another test how
> autoflush is being called from within modified_event().

I am kinda lost here - do you mean running queries in AttributeExtension
with autoflush=True resulting in flushes or something else?

regards,
Filip Zyzniewski
Tefnet


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to