Description of problem:
Connection object has broken escape() method in 1.2.2. Due to a bug the
upstream author caused when adding additional type encoding support, the default
encoders for such mundane objects as strings and integers is broken.
This problem did not exist in versions prior to 1.2.2. It was introduced when
upstream fix SF.net bug 1567804:
A patch is available upstream in the SourceForge bug (1774101).
Version-Release number of selected component (if applicable):
Steps to Reproduce:
>>> import MySQLdb
>>> conn = MySQLdb.connect(user='xxx', passwd='yyy', db='foo')
>>> print conn.escape("you're")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: no default type converter defined
>>> print conn.escape("you're")
Should return a safely encoded string suitable for using in run-time
construction of SQL via string concatenation.
This isn't used very often, but it is necessary for avoiding security problems
in certain situations. When using specialize MySQL syntax such as multiple
tuple inserts or ON DUPLICATE KEY extensions a programmer may need to manually
escape values while building an SQL string. This escape() function is the best
way to do it.
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.
Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.
Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.
Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.
Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:
The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
My apologies for not having done something with this sooner. I was waiting around for adustman to put
out 1.2.3 or at least accept the patch into his sources, but it's becoming clear that he's wedged somehow.
I'm pushing your patch into F-8 and F-9.
MySQL-python-1.2.2-7.fc9 has been submitted as an update for Fedora 9
MySQL-python-1.2.2-7.fc8 has been submitted as an update for Fedora 8
MySQL-python-1.2.2-7.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report.
MySQL-python-1.2.2-7.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.