[sqlalchemy] Re: should a dns error return true in dialect.is_disconnect() ?

2007-12-04 Thread Michael Bayer
On Dec 4, 2007, at 3:26 PM, David Bonner wrote: Hi, I've run into a problem running SA 0.4.0 on top of psycopg2. We had a DNS hiccup, and the next attempt to execute a query triggered a ProgrammingError. Unfortunately, it seems that error didn't also invalidate the (implicit) connection,

[sqlalchemy] Re: should a dns error return true in dialect.is_disconnect() ?

2007-12-04 Thread David Bonner
On Dec 4, 4:32 pm, Michael Bayer [EMAIL PROTECTED] wrote: if the error message isnt caught by is_disconnect(), then yes the specific error message should be installed in there. But also note that psycopg2 has some specific issues with disconnects, namely that the exception is not always

[sqlalchemy] Re: should a dns error return true in dialect.is_disconnect() ?

2007-12-04 Thread Michael Bayer
On Dec 4, 2007, at 5:39 PM, David Bonner wrote: yeah, the more i think about it, the more i realize this is an error when the dbapi connection is created, it's not a disconnect condition. the original error message is No route to host, which I'm pretty sure is EHOSTUNREACH, which you get

[sqlalchemy] Re: should a dns error return true in dialect.is_disconnect() ?

2007-12-04 Thread Michael Bayer
ah, seems to be OK using python 2.5 and psycopg2.0.6, so, i guess thats fixed somehow On Dec 4, 2007, at 5:59 PM, Michael Bayer wrote: On Dec 4, 2007, at 5:39 PM, David Bonner wrote: yeah, the more i think about it, the more i realize this is an error when the dbapi connection is