MySQLdb1 icon indicating copy to clipboard operation
MySQLdb1 copied to clipboard

1.2.5 is not backwards compatible! Breaks _mysql.escape

Open carlsverre opened this issue 11 years ago • 1 comments
trafficstars

_mysql is one of the best parts of MySQLdb, and the latest release breaks the escape function. Up till now, when passed a list or tuple, escape would return a list or tuple with each element escaped. Now when passed a list or tuple, escape returns a string.

As much as that feature is nice, it is not backwards compatible for people who depend on escape to return a list when passed a list.

At the very least make this a major or minor version bump and add it to the HISTORY (and maybe README). Your library is depended on by a huge amount of people, and changes like this are pretty dangerous.

The best solution would be to make escape continue to return a sequence if passed a sequence, but to escape any sub-sequences inside the root sequence.

Thanks.

carlsverre avatar Jan 02 '14 21:01 carlsverre

Will back out in the 1.2 branch

farcepest avatar Jan 03 '14 00:01 farcepest