Patch is located inline below. Apparently, you need to
specialize the check because no Binary() method exists
as of pgdb v3.6+ (possibly earlier too, I don't know).
dbconnection.orig is the original file and
dbconnection.py is the updated file that now works
--- dbconnection.py.orig 2006-10-16
14:09:01.000000000 -0400
+++ dbconnection.py 2006-10-16 14:10:58.000000000 -0400
@@ -213,7 +213,10 @@
self._pool = []
self._poolLock = threading.Lock()
DBConnection.__init__(self, **kw)
- self._binaryType = type(self.module.Binary(''))
+ if self.usePygresql:
+ self._binaryType = type(self.module.BINARY)
+ else:
+ self._binaryType =
type(self.module.Binary(''))
def _runWithConnection(self, meth, *args):
conn = self.getConnection()
Logged In: YES
user_id=4799
First, the patch is invalid. self.usePygresql is defined
only in PostgresConnection, hence that "if" will fail for
any other connection class.
Then, the absence of Binary() means Pygresql doesn't
implement DB API 2.0 specification properly.
Third, there are more calls to Binary() in the SQLObject.
Logged In: YES
user_id=1622325
Ok, apparently I'm an idiot. At any rate, without the change
above, I wasn't able to to use SQLObject. I don't know what
this means in the grand scheme of things for how to fix the
issue I ran across. I was just trying to be helpful and
point out that something wasn't working properly and
(naively) suggest the steps I took to fix it.
Logged In: YES
user_id=4799
Please don't take this to the personal level. It is the
patch that's invalid, not you.
But the patch is invalid and cannot be applied. Either you
are going to work on it further, or it will wait until
someone (including me) finds time to work on it.