Patches item #1578414, was opened at 2006-10-16 13:32
Message generated for change (Comment added) made by ptwobrussell
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578414&group_id=74338
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: Invalid
Priority: 5
Private: No
Submitted By: ptwobrussell (ptwobrussell)
Assigned to: Oleg Broytmann (phd)
Summary: exception called b/c pgdb.Binary('') fails
Initial Comment:
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()
----------------------------------------------------------------------
>Comment By: ptwobrussell (ptwobrussell)
Date: 2006-11-11 09:42
Message:
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.
----------------------------------------------------------------------
Comment By: Oleg Broytmann (phd)
Date: 2006-11-10 09:18
Message:
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.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578414&group_id=74338
|