Hi,

On Tuesday 02 October 2007, Oleg Broytmann wrote in "Re: [SQLObject] SQLObject 
0.9.2b1":
> Hello!
>
> On Tue, Oct 02, 2007 at 09:34:08AM +0200, Markus Gritsch wrote:
> > the new version 0.9.2b1 added a try except block around the conversion
> > to unicode of the query in mysqlconnection.py:
> >
> >     if self.need_unicode and not isinstance(query, unicode):
> >         try:
> >             query = unicode(query, self.encoding)
> >         except UnicodeError:
> >             pass
> >
> > In which case is it necessary that the UnicodeError is silently
> > ignored?  Isn't it dangerous and misleading to swallow such an
> > exception?
>
>    Pretty valid concern that deserves a longer answer.
>
>    From time to time people report problems with MySQLdb and unicode. See
> this report, for example:
> ...
>    I never knew how to fix the problem, and was reluctant to apply
> different patches that were more like small hacks to fix small part of
> the problem.
>    Finally David Turner dived into the problem and, using test_blob.py and
> test_unicode.py tests, fixed the problem; the try/except is the part of the
> solution.
Perhaps it would be nice to include that description or the one of David in a 
comment? Those statements surely raise a warning light in the head of many 
people...

Greetings,

Andres

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to