Re: [pysqlite] [ANN] pysqlite 2.5.4
"Joshua J. Kugler" <[email protected]> Wed, 11 Mar 2009 10:39:37 -0800
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Organization | EE Internet |
| Message-ID | <[email protected]> |
On Wednesday 11 March 2009, Gerhard H=E4ring said something like: > pysqlite 2.5.4 released I don't know if anyone has mentioned this yet, but the increased DB-API = compliance as of 2.5.2 has managed to break SQLAlchemy. We were = getting an error that had to be worked around this way (credit for this = patch, if used, should go to Gerard Escelante, = gescalante-wTs/inGz/[email protected]) diff -rwu SQLAlchemy-0.4.8.orig/lib/sqlalchemy/engine/base.py = SQLAlchemy-0.4.8/lib/sqlalchemy/engine/base.py --- SQLAlchemy-0.4.8.orig/lib/sqlalchemy/engine/base.py Sun Oct 12 = 10:32:58 2008 +++ SQLAlchemy-0.4.8/lib/sqlalchemy/engine/base.py Wed Mar 4 = 12:32:15 2009 @@ -1642,6 +1642,9 @@ def fetchone(self): """Fetch one row, just like DB-API ``cursor.fetchone()``.""" + # GE 20090304 - Don't poke at the cursor if it's closed -- it = might get angry. + if self.closed: + return None try: row =3D self._fetchone_impl() if row is not None: (yes, the formatting is messed up) That patch has not been thoroughly tested, but it Works For Us(TM). j -- = Joshua Kugler Part-Time System Admin/Programmer http://www.eeinternet.com PGP Key: http://pgp.mit.edu/ =A0ID 0xDB26D7CE