Christopher Arndt schrieb:
> We could also make it configurable. Or how would you check for the SA
> version? sqlalchemy.__version__ only has the version number a string value.

I created a new patch that just puts the definition of the
session_mapper factory outside the if/else structure that checks for the
availability of the session-aware mapper. Users can then choose to
import 'session_mapper' or 'mapper' from turbogears.database. In the
first case they'll always get the emulation (and thus avoid
DeprecationWarnings), in the second case only when the real thing is not
available (anymore).

>> Does it work with SA 0.4.0 
>> (which is the minimum SA version required by TG 1.1)?
> 
> Dunno. I have to try. I will do so tomorrow. I should also write some
> tests for this.

Unfortunately, it only works with SA >= 0.4.3, since
scoped_session.query_property is not available before that. Can we up
the SA requirement for TG1.1. accordingly?

> One thing I noticed, for example, is that
> MappedClass.query().something() does not work with the emulation, only
> MappedClass.query.something().

Is this important? Code which uses MappedClass.query().something() could
be updated with a simple global search&replace.


Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to