On 6/25/06, Dirk Stoop [EMAIL PROTECTED] wrote:
python-dateutil is very cool for getting a correct date from a
relative difference, it seems like they put a lot of work in getting
all of the nasty bits (like leapyears etc.) right, but does anyone
know about a library that can do this the other
The one (?) place that sqlalchemy pool isn't really transparent is wrt closing connections.Consider this function --def foo(): conn = psycopg2.connect(...) c = conn.cursor() c.execute('select * from users')
To keep this correct in a pooled environment, I have to manually add conn.rollback() or
On Jun 26, 2006, at 12:09 PM, Jonathan Ellis wrote:
The one (?) place that sqlalchemy pool isn't really transparent is
wrt closing connections.
Consider this function --
def foo():
conn = psycopg2.connect(...)
c = conn.cursor()
c.execute('select * from users')
To keep this
Test script and stack trace below:import sqlalchemy.mods.threadlocalfrom sqlalchemy import *sqlite = 'sqlite:///:memory:'db = create_engine(sqlite, strategy='plain', echo=True)
metadata = BoundMetaData(db)# TABLE
I made a change that should fix this in changeset 1660.
On Jun 23, 2006, at 3:21 PM, Brad Clements wrote:
On 22 Jun 2006 at 23:44, Michael Bayer wrote:
a lot has changed with mapper initialization (and plenty of
bugs), but not tables. can you send a test example ?
Sorry my example
this was something reasonably stupid (the bug in the code, not the test case !) and is fixed in 1663 .On Jun 26, 2006, at 2:27 PM, Tim Van Steenburgh wrote:Test script and stack trace below:import sqlalchemy.mods.threadlocalfrom sqlalchemy import *sqlite = 'sqlite:///:memory:'db =
the change to not produce SERIAL when a ForeignKey is present is
committed in changeset 1664. MySQL already had this logic in place
with regards to AUTO_INCREMENT.
On Jun 23, 2006, at 5:09 PM, Randall Smith wrote:
In a secondary table used for many to many relationships, usually a
On Jun 26, 2006, at 12:53 PM, Jonathan Ellis wrote:
I'd still like to see this mentioned in the docs, though. :)
consider it mentioned ! (or look at it mentioned on the pooling
page)
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with
Michael,
Thanks for the advice. I'm working with TurboGears and determined to
use SA, but having a tough time. TG defines a PackageEngine which is
a subclass of AutoConnectEngine. The SA imports look like this:
import sqlalchemy.mods.threadlocal
import sqlalchemy
from
On 6/25/06, Michael Bayer [EMAIL PROTECTED] wrote:
you should try 1657 to see if it solves your problems right now. I am also posting on the Python list to see what they think of formally allowing the Lock to be configurable, or at least making it an RLock (someone else also wanted this feature :
I must be missing something.
I have a dict of keys and values that I want to build a select statement
from.
The dict is of the form
dict['key1'] = value1
dict['key2'] = value2
dict['key3'] = value3
I want to build a select statement that has a where clause
where key1 = value1 and key2 =
you might want to temporarily disregard whatever theyre doing with
turbogears, since it seems theyre still using patterns that are only
relevant to the 0.1 series, particularly the AutoConnectEngine which
is totally obsolete, and it seems theres a level of conceptual
confusion going on
On Jun 26, 2006, at 7:47 PM, Mike Bernson wrote:
I must be missing something.
I have a dict of keys and values that I want to build a select
statement
from.
The dict is of the form
dict['key1'] = value1
dict['key2'] = value2
dict['key3'] = value3
I want to build a select
On 26 Jun 2006 at 15:30, Michael Bayer wrote:
I made a change that should fix this in changeset 1660.
It appears to be fixed, thanks
--
Brad Clements,[EMAIL PROTECTED](315)268-1000
http://www.murkworks.com
AOL-IM or SKYPE: BKClements
Using
SVN revision 1666
I am looking at More on Mapper Options on
http://sqlalchemy.org/docs/adv_datamapping.myt
I have a generic wsgi middleware that takes a table name and returns data from
that table.
For one table, I want to hide one field. That is, for table named
'coordinator' I
want to
noload() is used only for multi-table relations(), to indicate that a
secondary relation should not be eager or lazy loaded.
what youre looking for is almost like deferred column
loading (http://www.sqlalchemy.org/docs/
adv_datamapping.myt#advdatamapping_properties_deferred) but i guess
Michael Bayer wrote:
it seems from symptom 1 and symptom 2 that your objects are not
finding their way into Sessions, or are getting removed. if you
stick with the simpler pattern above, it should be clear what Session
your objects are a part of. symptom 2 also should be raising an
I think I made some progress and wanted to share it. I'm forced to use
threadlocal because TurboGears uses it. My SA definitions exist outside
of TG so I have to associate a connection to them after they are
imported, and that's where I've been hung up.
When sqlalchemy.mods.threadlocal is
18 matches
Mail list logo