Thread: [SQL-CVS] [ sqlobject-Patches-1578414 ] exception called b/c pgdb.Binary('') fails
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: SourceForge.net <no...@so...> - 2006-10-16 18:32:40
|
Patches item #1578414, was opened at 2006-10-16 13:32 Message generated for change (Tracker Item Submitted) made by Item Submitter 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: None Priority: 5 Submitted By: ptwobrussell (ptwobrussell) Assigned to: Nobody/Anonymous (nobody) 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() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=540674&aid=1578414&group_id=74338 |
From: SourceForge.net <no...@so...> - 2006-11-10 14:18:18
|
Patches item #1578414, was opened at 2006-10-16 22:32 Message generated for change (Comment added) made by phd 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: Oleg Broytmann (phd) Date: 2006-11-10 17: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 |
From: SourceForge.net <no...@so...> - 2006-11-11 14:42:02
|
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 |
From: SourceForge.net <no...@so...> - 2006-11-13 17:15:01
|
Patches item #1578414, was opened at 2006-10-16 22:32 Message generated for change (Comment added) made by phd 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: Oleg Broytmann (phd) Date: 2006-11-13 20:14 Message: 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. ---------------------------------------------------------------------- Comment By: ptwobrussell (ptwobrussell) Date: 2006-11-11 17: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 17: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 |