Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-26 Thread Markus Gritsch
On 4/25/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Tue, Apr 24, 2007 at 03:58:44PM +0200, Markus Gritsch wrote: >http://sourceforge.net/tracker/index.php?func=detail&aid=1653898&group_id=74338&atid=540674 > >I applied a part of the patch Allows the using unicode queries problem and wor

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-25 Thread Oleg Broytmann
On Tue, Apr 24, 2007 at 03:58:44PM +0200, Markus Gritsch wrote: > On 4/24/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > >http://sourceforge.net/tracker/index.php?func=detail&aid=1653898&group_id=74338&atid=540674 I applied a part of the patch, but I didn't apply the UnicodeStringLikeConvertor

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Oleg Broytmann
On Tue, Apr 24, 2007 at 03:58:44PM +0200, Markus Gritsch wrote: > On 4/24/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > >What do you think of this one? > >http://sourceforge.net/tracker/index.php?func=detail&aid=1653898&group_id=74338&atid=540674 > > I applied it and looked at the changes it mak

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Markus Gritsch
On 4/24/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > What do you think of this one? > http://sourceforge.net/tracker/index.php?func=detail&aid=1653898&group_id=74338&atid=540674 > > Can you test it? I applied it and looked at the changes it makes. The last hunk def _setAutoCommit(self, c

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Oleg Broytmann
On Tue, Apr 24, 2007 at 03:03:23PM +0200, Markus Gritsch wrote: > Great! So, is there a chance that the patch for the MySQLdb backend > will be incorporated? Not so fast. Now it's your turn to review patches. ;) What do you think of this one? http://sourceforge.net/tracker/index.php?func=deta

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Oleg Broytmann
On Tue, Apr 24, 2007 at 05:00:09PM +0400, Oleg Broytmann wrote: >It's debugging print. In SQLObject 0.9 one can setup logging instead of using stdout: __connection__ = "sqlite:/:memory:?debug=1&logger=TEST&loglevel=debug" Logging correctly does debugging prints in utf-8. Oleg. --

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Markus Gritsch
On 4/24/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > Found the problem: > > On Thu, Apr 19, 2007 at 07:42:20PM +0400, Oleg Broytmann wrote: > > File > > "/usr/local/lib/python2.4/site-packages/SQLObject-0.8.2dev_r2514-py2.4.egg/sqlobject/dbconnection.py", > > line 759, in __init__ > > db

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Oleg Broytmann
Found the problem: On Thu, Apr 19, 2007 at 07:42:20PM +0400, Oleg Broytmann wrote: > File > "/usr/local/lib/python2.4/site-packages/SQLObject-0.8.2dev_r2514-py2.4.egg/sqlobject/dbconnection.py", > line 759, in __init__ > dbconn.printDebug(rawconn, self.query, 'Select') > File > "/usr/lo

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Robert Forkel
[EMAIL PROTECTED]:~$ python Python 2.4.4c1 (#2, Oct 11 2006, 21:51:02) [GCC 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from sqlobject import * >>> >>> sqlhub.threadConnection = connectionForURI('sqlite:/

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-24 Thread Markus Gritsch
Hi all, can some people on this list please be so kind and run the following short program and confirm that it works or send the traceback in case of any? It is self-contained and does not require any further setup. Thanks in advance, Markus from sqlobject import * sqlhub.threadConnection = c

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-23 Thread Markus Gritsch
On 4/19/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: On Wed, Apr 18, 2007 at 09:21:15PM +0200, Markus Gritsch wrote: > p = Person(name=u'\u20ac') # \u20ac is the 'Euro symbol'. > print Person.select(LIKE(Person.q.name, u'\u20ac'))[0].name.encode('utf-8') Doesn't work with Postgres and SQLite

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-19 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 09:21:15PM +0200, Markus Gritsch wrote: > p = Person(name=u'\u20ac') # \u20ac is the 'Euro symbol'. > print Person.select(LIKE(Person.q.name, u'\u20ac'))[0].name.encode('utf-8') Doesn't work with Postgres and SQLite. To demonstrate the exact place of the problem I change

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 09:21:15PM +0200, Markus Gritsch wrote: > p = Person(name=u'\u20ac') # \u20ac is the 'Euro symbol'. > print Person.select(LIKE(Person.q.name, u'\u20ac'))[0].name.encode('utf-8') Thank you. Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROT

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Markus Gritsch
On 4/18/07, Oleg Broytmann <[EMAIL PROTECTED]> wrote: > On Wed, Apr 18, 2007 at 08:57:09PM +0200, Markus Gritsch wrote: > > +if self.need_unicode and not isinstance(query, unicode): > >Can you add a test for this? Some test that produces unicode query... from sqlobject import

Re: [SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Oleg Broytmann
On Wed, Apr 18, 2007 at 08:57:09PM +0200, Markus Gritsch wrote: > +if self.need_unicode and not isinstance(query, unicode): Can you add a test for this? Some test that produces unicode query... Oleg. -- Oleg Broytmannhttp://phd.pp.ru/[EMAIL PROTEC

[SQLObject] Patch for mysqlconnection.py to handle unicode queries

2007-04-18 Thread Markus Gritsch
Hi, I am using the patch below in my local version of SQLObject for several month now. I think I already proposed it some time ago. It allows me to use an application I wrote using the SQLite backend unmodified also with the MySQL backend. The SQLite backend of SQLObject has no problem with han