[PATCH] Fix _quote to accept subclasses of 'str' and 'long'
"Pinchart, Laurent" <[email protected]> Fri, 20 Jun 2003 14:54:52 +0200
| Newsgroups | gmane.comp.python.db.pypgsql.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, Here's a patch that fixes a problem in _quote for instances of a subclass of 'str'. pyPgSQL quotes values depending on their type, and uses type() to check the value type. Because of that, instances of a subclass of 'str' are not processed by PgQuoteString like they should. I noticed the problem because util.FieldStorage in mod_python returns instances of a class called 'StringField', which is a subclass of 'str'. The patch also contains a fix for Connection.unlink that hadn't been commited from my last patch. As I received no negative comment about it, I assume that it had been forgotten. Please comment if something is wrong. Laurent Pinchart ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php