Here's a diff of the debian directory for changes to make this happen
-- Mario Limonciello supe...@gmail.com
diff -urN python-mysqldb-1.2.2/debian//changelog python-mysqldb-1.2.3/debian/changelog --- python-mysqldb-1.2.2/debian//changelog 2011-07-13 00:44:12.000000000 -0500 +++ python-mysqldb-1.2.3/debian/changelog 2011-07-14 01:30:00.700774560 -0500 @@ -1,3 +1,14 @@ +python-mysqldb (1.2.3-1) UNRELEASED; urgency=low + + * New upstream version. (Closes: #609906) + * Drop 02_python_2.6, applied upstream. + * Drop 04_disable_ez_setup.dpatch, applied upstream. + * Drop 05_null-connection-guard.dpatch per upstream recommendation. + * Drop 06_mysql_connect_port.dpatch, applied upstream. + * debian/rules: Don't install upstream changelog (not in package anymore). + + -- Mario Limonciello <supe...@ubuntu.com> Thu, 14 Jul 2011 01:27:02 -0500 + python-mysqldb (1.2.2-10build2) natty; urgency=low * Rebuild to add support for python 2.7. diff -urN python-mysqldb-1.2.2/debian//patched/01_converters_boolean.dpatch python-mysqldb-1.2.3/debian/patched/01_converters_boolean.dpatch --- python-mysqldb-1.2.2/debian//patched/01_converters_boolean.dpatch 2011-07-14 00:58:29.379395994 -0500 +++ python-mysqldb-1.2.3/debian/patched/01_converters_boolean.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1 +0,0 @@ -patching file MySQLdb/converters.py diff -urN python-mysqldb-1.2.2/debian//patches/00list python-mysqldb-1.2.3/debian/patches/00list --- python-mysqldb-1.2.2/debian//patches/00list 2011-07-13 00:44:12.000000000 -0500 +++ python-mysqldb-1.2.3/debian/patches/00list 2011-07-14 01:15:43.812525464 -0500 @@ -1,6 +1,2 @@ 01_converters_boolean -02_python_2.6.dpatch 03_converters_set2str -04_disable_ez_setup -05_null-connection-guard -06_mysql_connect_port diff -urN python-mysqldb-1.2.2/debian//patches/02_python_2.6.dpatch python-mysqldb-1.2.3/debian/patches/02_python_2.6.dpatch --- python-mysqldb-1.2.2/debian//patches/02_python_2.6.dpatch 2011-07-14 00:58:52.003508182 -0500 +++ python-mysqldb-1.2.3/debian/patches/02_python_2.6.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1,109 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 02_python_2.6.dpatch by <supe...@ubuntu.com> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Cherry pick upstream 554 & 603 to fix python 2.6 support - -@DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' python-mysqldb-1.2.2~/MySQLdb/__init__.py python-mysqldb-1.2.2/MySQLdb/__init__.py ---- python-mysqldb-1.2.2~/MySQLdb/__init__.py 2007-02-26 13:00:32.000000000 -0600 -+++ python-mysqldb-1.2.2/MySQLdb/__init__.py 2011-07-14 00:58:42.635461732 -0500 -@@ -19,8 +19,8 @@ - import _mysql - - if version_info != _mysql.version_info: -- raise ImportError, "this is MySQLdb version %s, but _mysql is version %r" %\ -- (version_info, _mysql.version_info) -+ raise ImportError("this is MySQLdb version %s, but _mysql is version %r" % -+ (version_info, _mysql.version_info)) - - threadsafety = 1 - apilevel = "2.0" -@@ -31,25 +31,20 @@ - from MySQLdb.times import Date, Time, Timestamp, \ - DateFromTicks, TimeFromTicks, TimestampFromTicks - --from sets import ImmutableSet --class DBAPISet(ImmutableSet): -+try: -+ frozenset -+except NameError: -+ from sets import ImmutableSet as frozenset -+ -+class DBAPISet(frozenset): - - """A special type of set for which A == x is true if A is a - DBAPISet and x is a member of that set.""" - -- def __ne__(self, other): -- from sets import BaseSet -- if isinstance(other, BaseSet): -- return super(DBAPISet.self).__ne__(self, other) -- else: -- return other not in self -- - def __eq__(self, other): -- from sets import BaseSet -- if isinstance(other, BaseSet): -- return super(DBAPISet, self).__eq__(self, other) -- else: -- return other in self -+ if isinstance(other, DBAPISet): -+ return not self.difference(other) -+ return other in self - - - STRING = DBAPISet([FIELD_TYPE.ENUM, FIELD_TYPE.STRING, -@@ -65,6 +60,18 @@ - DATETIME = TIMESTAMP - ROWID = DBAPISet() - -+def test_DBAPISet_set_equality(): -+ assert STRING == STRING -+ -+def test_DBAPISet_set_inequality(): -+ assert STRING != NUMBER -+ -+def test_DBAPISet_set_equality_membership(): -+ assert FIELD_TYPE.VAR_STRING == STRING -+ -+def test_DBAPISet_set_inequality_membership(): -+ assert FIELD_TYPE.DATE != STRING -+ - def Binary(x): - return str(x) - -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' python-mysqldb-1.2.2~/MySQLdb/converters.py python-mysqldb-1.2.2/MySQLdb/converters.py ---- python-mysqldb-1.2.2~/MySQLdb/converters.py 2011-07-14 00:58:42.543461270 -0500 -+++ python-mysqldb-1.2.2/MySQLdb/converters.py 2011-07-14 00:58:42.635461732 -0500 -@@ -34,15 +34,19 @@ - - from _mysql import string_literal, escape_sequence, escape_dict, escape, NULL - from constants import FIELD_TYPE, FLAG --from sets import BaseSet, Set - from times import * - import types - import array - -+try: -+ set -+except NameError: -+ from sets import Set as set -+ - def Bool2Str(s, d): return str(int(s)) - - def Str2Set(s): -- return Set([ i for i in s.split(',') if i ]) -+ return set([ i for i in s.split(',') if i ]) - - def Set2Str(s, d): - return string_literal(','.join(s), d) -@@ -126,7 +130,7 @@ - types.BooleanType: Bool2Str, - DateTimeType: DateTime2literal, - DateTimeDeltaType: DateTimeDelta2literal, -- Set: Set2Str, -+ set: Set2Str, - FIELD_TYPE.TINY: int, - FIELD_TYPE.SHORT: int, - FIELD_TYPE.LONG: long, diff -urN python-mysqldb-1.2.2/debian//patches/04_disable_ez_setup.dpatch python-mysqldb-1.2.3/debian/patches/04_disable_ez_setup.dpatch --- python-mysqldb-1.2.2/debian//patches/04_disable_ez_setup.dpatch 2011-07-13 00:44:12.000000000 -0500 +++ python-mysqldb-1.2.3/debian/patches/04_disable_ez_setup.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 04_disable_ez_setup.dpatch by Piotr Ożarowski <pi...@debian.org> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Required setuptools version will always be installed (see Build-Depends) -## DP: so there's no need to double check it - -@DPATCH@ -diff -urNad python-mysqldb-1.2.2~/setup.py python-mysqldb-1.2.2/setup.py ---- python-mysqldb-1.2.2~/setup.py 2007-02-25 04:37:12.000000000 +0100 -+++ python-mysqldb-1.2.2/setup.py 2007-07-03 15:14:49.000000000 +0200 -@@ -2,7 +2,6 @@ - - import os - import sys --import ez_setup; ez_setup.use_setuptools() - from setuptools import setup, Extension - - if sys.version_info < (2, 3): diff -urN python-mysqldb-1.2.2/debian//patches/05_null-connection-guard.dpatch python-mysqldb-1.2.3/debian/patches/05_null-connection-guard.dpatch --- python-mysqldb-1.2.2/debian//patches/05_null-connection-guard.dpatch 2011-07-13 00:44:12.000000000 -0500 +++ python-mysqldb-1.2.3/debian/patches/05_null-connection-guard.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1,62 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 05_null-connection-guard.dpatch by Bernd Zeimetz <be...@bzed.de> -## -## DP: guard against a null connection. -## DP: patch from http://dev.zenoss.com/trac/browser/trunk/inst/externallibs/MySQL-python-1.2.0.patch02 - -@DPATCH@ -diff -urNad python-mysqldb~/_mysql.c python-mysqldb/_mysql.c ---- python-mysqldb~/_mysql.c 2007-10-07 00:00:11.000000000 +0200 -+++ python-mysqldb/_mysql.c 2007-10-07 00:00:11.000000000 +0200 -@@ -489,10 +489,10 @@ - "named_pipe", "init_command", - "read_default_file", "read_default_group", - "client_flag", "ssl", -- "local_infile", -+ "local_infile", "reconnect", - NULL } ; - int connect_timeout = 0; -- int compress = -1, named_pipe = -1, local_infile = -1; -+ int compress = -1, named_pipe = -1, local_infile = -1, reconnect = -1; - char *init_command=NULL, - *read_default_file=NULL, - *read_default_group=NULL; -@@ -500,7 +500,7 @@ - self->converter = NULL; - self->open = 0; - check_server_init(-1); -- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ssssisOiiisssiOi:connect", -+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|ssssisOiiisssiOii:connect", - kwlist, - &host, &user, &passwd, &db, - &port, &unix_socket, &conv, -@@ -509,7 +509,7 @@ - &init_command, &read_default_file, - &read_default_group, - &client_flag, &ssl, -- &local_infile -+ &local_infile, &reconnect - )) - return -1; - -@@ -553,6 +553,7 @@ - mysql_options(&(self->connection), MYSQL_OPT_COMPRESS, 0); - client_flag |= CLIENT_COMPRESS; - } -+ - if (named_pipe != -1) - mysql_options(&(self->connection), MYSQL_OPT_NAMED_PIPE, 0); - if (init_command != NULL) -@@ -574,6 +575,12 @@ - conn = mysql_real_connect(&(self->connection), host, user, passwd, db, - port, unix_socket, client_flag); - -+ /* Needs to come after real_connect per mysql API manual */ -+ if (conn && reconnect > 0) { -+ my_bool bool = reconnect; -+ mysql_options(conn, MYSQL_OPT_RECONNECT, &bool); -+ } -+ - Py_END_ALLOW_THREADS ; - - if (!conn) { diff -urN python-mysqldb-1.2.2/debian//patches/06_mysql_connect_port.dpatch python-mysqldb-1.2.3/debian/patches/06_mysql_connect_port.dpatch --- python-mysqldb-1.2.2/debian//patches/06_mysql_connect_port.dpatch 2011-07-13 00:44:12.000000000 -0500 +++ python-mysqldb-1.2.3/debian/patches/06_mysql_connect_port.dpatch 1969-12-31 18:00:00.000000000 -0600 @@ -1,20 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 06_mysql_connect_port.dpatch by Monty Taylor <mo...@inaugust.com> -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Allows port settings in my.cnf files to work properly. -## DP: Patch from https://sourceforge.net/tracker/?func=detail&aid=1761612&group_id=22307&atid=374932 - -@DPATCH@ -diff -urNad python-mysqldb-1.2.2~/_mysql.c python-mysqldb-1.2.2/_mysql.c ---- python-mysqldb-1.2.2~/_mysql.c 2008-02-27 12:57:51.351846703 -0800 -+++ python-mysqldb-1.2.2/_mysql.c 2008-02-27 12:58:10.404183220 -0800 -@@ -481,7 +481,7 @@ - #endif - char *host = NULL, *user = NULL, *passwd = NULL, - *db = NULL, *unix_socket = NULL; -- uint port = MYSQL_PORT; -+ uint port = 0; - uint client_flag = 0; - static char *kwlist[] = { "host", "user", "passwd", "db", "port", - "unix_socket", "conv", diff -urN python-mysqldb-1.2.2/debian//rules python-mysqldb-1.2.3/debian/rules --- python-mysqldb-1.2.2/debian//rules 2011-07-13 00:44:12.000000000 -0500 +++ python-mysqldb-1.2.3/debian/rules 2011-07-14 01:19:58.557788692 -0500 @@ -73,7 +73,6 @@ # Build architecture-dependent files here. binary-arch: build install dh_installdocs - dh_installchangelogs ChangeLog rm -rf debian/python-mysqldb-dbg/usr/share/doc/python-mysqldb-dbg ln -s python-mysqldb debian/python-mysqldb-dbg/usr/share/doc/python-mysqldb-dbg dh_strip -ppython-mysqldb --dbg-package=python-mysqldb-dbg
_______________________________________________ Python-modules-team mailing list Python-modules-team@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team