--- python-mysqldb-1.2.2.orig/debian/control
+++ python-mysqldb-1.2.2/debian/control
@@ -0,0 +1,38 @@
+Source: python-mysqldb
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders: Jonas Meurer <mejo@debian.org>, Raphael Hertzog <hertzog@debian.org>, Bernd Zeimetz <bzed@debian.org>, Monty Taylor <monty@inaugust.com>
+Build-Depends: debhelper (>= 5.0.37.2), dpatch, python-all-dev, libmysqlclient15-dev (>= 5.0.26), zlib1g-dev, python-support, python-setuptools, python2.4-dbg
+XS-Python-Version: all
+Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-mysqldb/trunk/
+Vcs-Browser: http://svn.debian.org/wsvn/python-modules/packages/python-mysqldb/trunk/?op=log
+Standards-Version: 3.7.3
+Homepage: http://mysql-python.sourceforge.net/
+
+Package: python-mysqldb
+Architecture: any
+Depends: ${python:Depends}, ${shlibs:Depends}
+Suggests: python-egenix-mxdatetime, mysql-server-5.0 | mysql-server, python-mysqldb-dbg
+Conflicts: python2.3-mysqldb, python2.4-mysqldb
+Replaces: python2.3-mysqldb, python2.4-mysqldb
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: A Python interface to MySQL
+ MySQLdb is an interface to the popular MySQL database server for
+ Python. The design goals are:
+ .
+  + Compliance with Python database API version 2.0
+  + Thread-safety
+  + Thread-friendliness (threads will not block each other)
+  + Compatibility with MySQL-3.23 and later
+
+Package: python-mysqldb-dbg
+Priority: extra
+Architecture: any
+Depends: python-mysqldb (= ${binary:Version}), python-dbg, ${shlibs:Depends}
+Suggests: python-egenix-mxdatetime-dbg
+Description: A Python interface to MySQL (debug extension)
+ MySQLdb is an interface to the popular MySQL database server for Python.
+ .
+ This package contains the extension built for the Python debug interpreter.
--- python-mysqldb-1.2.2.orig/debian/rules
+++ python-mysqldb-1.2.2/debian/rules
@@ -0,0 +1,85 @@
+#!/usr/bin/make -f
+#-*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# Include dpatch stuff.
+include /usr/share/dpatch/dpatch.make
+
+# export some vars
+export mysqlversion=5.0.38
+export mysqlclient=mysqlclient_r
+export mysqloptlibs=ssl crypto
+
+PYVERS=$(shell pyversions -r)
+
+build: build-stamp
+build-stamp: patch-stamp
+	dh_testdir
+	
+	set -e; \
+	for PYTHON in $(PYVERS); do \
+		echo "--- Compiling for $$PYTHON"; \
+		$$PYTHON setup.py build; \
+		echo "--- Compiling for $$PYTHON-dbg"; \
+		$$PYTHON-dbg setup.py build; \
+	done
+
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	@echo "--- Cleaning"
+	rm -f build-stamp install-stamp
+	rm -rf build
+	find . -name "*.py[co]" -exec rm -f {} \;
+	dh_clean
+
+install: install-stamp
+install-stamp: build-stamp
+	dh_testdir
+	dh_testroot
+
+	set -e; \
+	for PYTHON in $(PYVERS); do \
+		echo "--- Installing for $$PYTHON"; \
+		$$PYTHON setup.py install --root `pwd`/debian/python-mysqldb; \
+		echo "--- Installing for $$PYTHON-dbg"; \
+		$$PYTHON-dbg setup.py install --root `pwd`/debian/python-mysqldb-dbg; \
+	done
+	
+	@echo "  -- Cleaning build from *.py[co] files"
+	-find debian -name '*.py[co]' | xargs -n 50 rm -f
+	
+	find debian/python-mysqldb-dbg ! -type d ! -name '*_d.so' | xargs rm -f
+	find debian/python-mysqldb-dbg -depth -empty -exec rmdir {} \;
+	touch install-stamp
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_installdocs
+	dh_installchangelogs ChangeLog
+	install -d debian/python-mysqldb-dbg/usr/share/lintian/overrides
+	install -m644 debian/python-mysqldb-dbg.lintian-overrides \
+		debian/python-mysqldb-dbg/usr/share/lintian/overrides/python-mysqldb-dbg
+	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
+	dh_compress
+	dh_fixperms
+	dh_pysupport
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+	
+binary: binary-indep binary-arch
+.PHONY: build clean install binary-indep binary-arch binary patch unpatch
--- python-mysqldb-1.2.2.orig/debian/compat
+++ python-mysqldb-1.2.2/debian/compat
@@ -0,0 +1 @@
+5
--- python-mysqldb-1.2.2.orig/debian/docs
+++ python-mysqldb-1.2.2/debian/docs
@@ -0,0 +1,4 @@
+HISTORY
+README
+doc/FAQ.txt
+doc/MySQLdb.txt
--- python-mysqldb-1.2.2.orig/debian/changelog
+++ python-mysqldb-1.2.2/debian/changelog
@@ -0,0 +1,511 @@
+python-mysqldb (1.2.2-7~bpo40+1) etch-backports; urgency=low
+
+  * Rebuild for etch-backports.
+  * Relax dependency on python-all-dev; python2.5 is not targetted.
+  * Replace dependency on python-all-dbg with python2.4-dbg.
+  * Relax versioned dependency on python-support.
+
+ -- Chris Lamb <lamby@debian.org>  Thu, 09 Oct 2008 13:39:19 +0100
+
+python-mysqldb (1.2.2-7) unstable; urgency=low
+
+  [ Sandro Tosi ]
+  * debian/control
+    - list items lines in description starts with 2 space, to avoid reformat
+      on webpages (Closes: #480341)
+
+  [ Bernd Zeimetz ]
+  * debian/patches/02_reconnect.dpatch:
+    - Dropping patch:
+      Comment in Storm which explains the problem:
+
+        # Here is another sad story about bad transactional behavior. MySQL
+        # offers a feature to automatically reconnect dropped connections.
+        # What sounds like a dream, is actually a nightmare for anyone who
+        # is dealing with transactions. When a reconnection happens, the
+        # currently running transaction is transparently rolled back, and
+        # everything that was being done is lost, without notice. Not only
+        # that, but the connection may be put back in AUTOCOMMIT mode, even
+        # when that's not the default MySQLdb behavior. The MySQL developers
+        # quickly understood that this is a terrible idea, and removed the
+        # behavior in MySQL 5.0.3. Unfortunately, Debian and Ubuntu still
+        # have a patch right now which *reenables* that behavior by default
+        # even past version 5.0.3.
+
+ -- Bernd Zeimetz <bzed@debian.org>  Mon, 16 Jun 2008 20:03:09 +0200
+
+python-mysqldb (1.2.2-6) unstable; urgency=low
+
+  [ Sandro Tosi ]
+  * debian/control
+    - uniforming Vcs-Browser field
+
+  [ Monty Taylor ]
+  * Added patch to allow setting the port in my.cnf or ~/.my.cnf to actually
+    work.
+  * Added myself to Uploaders.
+
+  [ Bernd Zeimetz ]
+  * debian/control:
+    - Updating my email address.
+
+  [ Jonas Meurer ]
+  * Several minor fixes thanks to lintian warnings:
+    - Update standards-version to 3.7.3 (no changes needed).
+    - Change build-depends on libmysqlclient15-dev (>= 5.0.26-1) to >= 5.0.26
+      to make live easier for backporters
+    - Capitalize Python in the long description of python-mysqldb-dbg
+    - Add lintian override file for 'package-contains-empty-directory
+      usr/share/python-support/python-mysqldb-dbg/', python-support relies on
+      this directory.
+    - Actually mention Copyright and the © symbol in debian/copyright.
+  * debian/rules:
+    install target should depend on build-stamp instead of build. This way,
+    the build target is only executed once.
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 19 Mar 2008 01:34:10 +0100
+
+python-mysqldb (1.2.2-5) unstable; urgency=low
+
+  [ Piotr Ożarowski ]
+  * Rename XS-Vcs-Svn field to Vcs-Svn (dpkg supports it now)
+  * Add Vcs-Browser field
+
+  [ Bernd Zeimetz ]
+  * debian/patches:
+    - Adding 05_null-connection-guard.dpatch, providing an interface to set
+      MYSQL_OPT_RECONNECT
+    - Adding 00dpatch.conf to make the handling of dpatches more easy
+  * debian/control
+    - Adding myself as uploader
+    - Adding Homepage field
+    - Replacing the depricated ${Source-Version} by ${binary:Version} in the
+      dependency list of python-mysqldb-dbg 
+
+ -- Bernd Zeimetz <bernd@bzed.de>  Sun, 14 Oct 2007 12:15:09 +0200
+
+python-mysqldb (1.2.2-4) unstable; urgency=low
+
+   [ Scott Kitterman ]
+  * Update debian/control and debian/rules to build python-dbg package
+
+   [ Piotr Ozarowski ]
+  * debian/watch file updated
+  * add 04_disable_ez_setup patch (closes: #431552)
+
+  [ Jonas Meurer ]
+  * upload to unstable
+
+ -- Jonas Meurer <mejo@debian.org>  Fri, 10 Aug 2007 15:15:10 +0200
+
+python-mysqldb (1.2.2-3) unstable; urgency=low
+
+  * Build-Depend on python-setuptools, thanks to Michael Ablassmeier
+    <abi@grinser.de>. (closes: #422665)
+
+ -- Jonas Meurer <mejo@debian.org>  Tue, 08 May 2007 04:01:09 +0200
+
+python-mysqldb (1.2.2-2) unstable; urgency=low
+
+  * Move to python-support
+  * Bump versoned Build-Depend on python-all-dev to (>= 2.4.4-3) for
+    enabling extensions for python2.5. (closes: #409814)
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 02 May 2007 01:33:54 +0200
+
+python-mysqldb (1.2.2-1) unstable; urgency=low
+
+  * new upstream stable release 1.2.2
+    - fixes crash with unicode chars (closes: #406956)
+    - update patches accordingly
+  * bump mysql version in debian rules to 5.0.38
+  * update copyright file: change "program" to "package", and mention GPL
+    version 2, not version 2.1 which is not available on debian systems.
+    thanks to Marko Randjelovic <marel@sbb.co.yu> (closes: #417964)
+  * remove dh_python call from debian/rules
+
+ -- Jonas Meurer <mejo@debian.org>  Sun, 22 Apr 2007 21:16:28 +0200
+
+python-mysqldb (1.2.2~b2-1) unstable; urgency=medium
+
+   [ Jonas Meurer ]
+  * yet another beta, updated debian patches
+  * bump minimal mysql version in package description to 3.23
+  * bump versioned build-depends on libmysqlclient15-dev to >= 5.0.26-1
+  * don't apply patch 03_converters_set2str. breaks too much and only one
+    person reported problems without the patch. (closes: 394999)
+  * don't install a ChangeLog file, as no one exists.
+
+   [ Piotr Ozarowski ]
+  * Added XS-Vcs-Svn field
+
+ -- Jonas Meurer <mejo@debian.org>  Sat, 25 Nov 2006 13:02:21 +0100
+ 
+python-mysqldb (1.2.2~b1-1) unstable; urgency=low
+
+  * new upstream beta release
+  * adjust patches 01 and 02 for new beta
+
+ -- Jonas Meurer <mejo@debian.org>  Wed,  6 Sep 2006 05:30:45 +0200
+
+python-mysqldb (1.2.1-p2-4) unstable; urgency=HIGH
+
+  [ Jonas Meurer ]
+  * bump build-depends on libmysqlclient-dev to >= 5.0.24-2. the abi changes
+    introduced in mysql 5.0.24-1 are reverted now. I would highly appreciate
+    coordination by the mysql maintainers in such a case.
+  * urgency set to high due to this fact.
+  * bump build-depends on python-central to >= 0.5 to make lintian happy.
+
+ -- Jonas Meurer <mejo@debian.org>  Fri, 18 Aug 2006 15:44:04 +0200
+
+python-mysqldb (1.2.1-p2-3) unstable; urgency=low
+
+  [ Jonas Meurer ]
+  * bump mysqlversion to 5.0.24, tighten build-depends on libmysqlclient-dev
+    to >= 5.0.24-1. unfortunately, the abi changes where not documented.
+    (closes: #383603)
+  * move DH_COMPAT to debian/compat
+  * add FAQ.txt to dh_installdoc
+  * add 03_converters_set2str.dpatch, fixes handling of MySQL SETs,
+    thanks to Simeon Anastasov <simeon@know-it.net> for the patch.
+  * remove -a from all dh_* calls in debian/rules. there is only one package
+    left anyway, so there is no need for the arch-dependent option.
+
+ -- Jonas Meurer <mejo@debian.org>  Fri, 18 Aug 2006 13:53:07 +0200
+
+python-mysqldb (1.2.1-p2-2) unstable; urgency=low
+
+  * Updated for the new python policy. Closes: #373329
+  * Udpdated Standards-Version to 3.7.2.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Fri, 23 Jun 2006 22:45:25 +0200
+
+python-mysqldb (1.2.1-p2-1) unstable; urgency=low
+
+  [ Jonas Meurer ]
+  * new upstream release (closes: #301419)
+    - update patches
+  * bump mysqlversion in debian/rules to 5.0.19
+  * set the maintainer to the debian python modules team
+  * relax dependency of python-mysqldb on python2.3-mysqldb
+    (closes: #361940, #358747)
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 12 Apr 2006 19:10:00 +0200
+
+python-mysqldb (1.2.1c3-6) unstable; urgency=low
+
+  * reconnect to lost connections even with mysql 5.x,
+    thanks to Dan Pascu <dan@ag-projects.com> for the patch.
+
+ -- Jonas Meurer <mejo@debian.org>  Tue, 24 Jan 2006 13:24:21 +0100
+
+python-mysqldb (1.2.1c3-5) unstable; urgency=low
+
+  * rebuild against 5.0.16-1 (closes: #343802)
+  * set mysqlversion=5.0.16
+  * drop python2.2-mysqldb packages, as zope-mysqlda as last reverse
+    depend got removed from the archive
+
+ -- Jonas Meurer <mejo@debian.org>  Sun, 18 Dec 2005 18:53:02 +0100
+
+python-mysqldb (1.2.1c3-4) unstable; urgency=low
+
+  * set mysqlversion=4.1.14 according to the version of mysql libs
+    we use to build
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 26 Oct 2005 17:57:47 +0200
+
+python-mysqldb (1.2.1c3-3) unstable; urgency=low
+
+  * rebuild against latest libmysqlclient14 with versioned symbols.
+    this fixes one half of the segfaults when python-mysqldb is used
+    by mod_python in apache with php4-mysql used by the same apache
+    at the same time. the other half has already been fixed by a new
+    php4 upload, also rebuilt against libmysqlclient14 with versioned
+    symbols. (closes: #333117)
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 26 Oct 2005 17:31:45 +0200
+
+python-mysqldb (1.2.1c3-2) unstable; urgency=low
+
+  * rebuild against mysql 4.1 (closes: #329753)
+  * remove patches/02_mysql_41: unused, obsolete
+  * bump standards-version to 3.6.2
+  * update fsf address
+
+ -- Jonas Meurer <mejo@debian.org>  Mon, 26 Sep 2005 00:32:22 +0200
+
+python-mysqldb (1.2.1c3-1) unstable; urgency=low
+
+  * new upstream pre-release
+
+ -- Jonas Meurer <mejo@debian.org>  Sat,  4 Jun 2005 03:12:12 +0200
+
+python-mysqldb (1.2.1c2-1) unstable; urgency=high
+
+  * new upstream release
+  * readd python 2.2 support to make zope-mysqlda happy again
+  * remove README.Debian, debian/python-mysqldb.doc-base:
+    this version doesn't ship any documentation except MySQLdb.txt
+  * urgency high to push fix for #306906 into sarge
+
+ -- Jonas Meurer <mejo@debian.org>  Sun,  1 May 2005 17:53:26 +0200
+
+python-mysqldb (1.2.0-4) unstable; urgency=low
+
+  * rebuild with sources included 
+
+ -- Jonas Meurer <mejo@debian.org>  Sat, 26 Mar 2005 16:48:30 +0100
+
+python-mysqldb (1.2.0-3) unstable; urgency=low
+
+  * python2.4 packages are built (closes: #301402)
+  * remind scripts to ack NMU (closes: #299168, #297472)
+
+ -- Jonas Meurer <mejo@debian.org>  Sat, 26 Mar 2005 02:29:33 +0100
+
+python-mysqldb (1.2.0-2) unstable; urgency=low
+
+  * fix bool convertion: patches/01_converters_boolean
+    - take boolean vars into account (closes: #300324)
+    - reintroduced dpatch in build scripts
+  * add build support for mysql 4.1: patches/02_mysql_41
+    - simply enable in patches/00list to build packages
+      with libmysqlclient14-dev from mysql-dfsg-4.1
+    - disabled by default to prevent segfaults if
+      used with mysql 4.0 libraries.
+
+ -- Jonas Meurer <mejo@debian.org>  Fri, 25 Mar 2005 17:06:52 +0100
+
+python-mysqldb (1.2.0-1) unstable; urgency=low
+
+  * new upstream release
+    - add 2.4 to, remove 2.2 freom supported python versions,
+      MySQLdb-Python 1.2.0 doesn't support Python 2.2 any more.
+    - redesign documentation management as upstream ships a lot
+      more docs than in previous releases.
+  * Acknowledge NMU:
+    - rebuild against libmysqlclient12-dev (closes: #299168, #297472)
+
+ -- Jonas Meurer <mejo@debian.org>  Fri, 25 Mar 2005 02:34:01 +0100
+
+python-mysqldb (1.1.6-1.1) unstable; urgency=high
+
+  * Non-maintainer upload.
+  * High-urgency upload for sarge-targetted RC bugfix.
+  * Rebuild against libmysqlclient12-dev instead of libmysqlclient10-dev,
+    for compatibility with newer servers and to avoid segfaults when
+    other mysql-using apache modules are loaded together with mod-python
+    (closes: #299168).
+
+ -- Steve Langasek <vorlon@debian.org>  Fri, 18 Mar 2005 02:47:59 -0800
+
+python-mysqldb (1.1.6-1) unstable; urgency=low
+
+  * new upstream release
+  * dropped patches/01_format_time: included in upstream
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 29 Sep 2004 19:13:46 +0200
+
+python-mysqldb (1.1.5-2) unstable; urgency=high
+
+  * removed "ssl crypto" compile options to actually build with
+    libmysqlclient10-dev from mysql 3.23.56 (closes: #272839)
+  * still urgency high because of #270555
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 22 Sep 2004 15:13:15 +0200
+
+python-mysqldb (1.1.5-1) unstable; urgency=high
+
+  * New upstream release
+  * Built with libmysqlclient10-dev (closes: #270555, #270570)
+  * Fixed rules to install maintainer scripts, rm install-stamp at clean
+  * Changed maintainer scripts for pythonPV-mysqldb to static ones
+  * Urgency high to push it into sarge, because of #270555
+
+ -- Jonas Meurer <mejo@debian.org>  Tue, 21 Sep 2004 15:43:26 +0200
+
+python-mysqldb (1.1.4-1) unstable; urgency=low
+
+  * New upstream release
+  * fixed README.Debian, refering to docs in python-mysqldb, as they
+    aren't shipped with the python$PV-mysqldb packages.
+    (closes: #158355)
+
+ -- Jonas Meurer <mejo@debian.org>  Wed, 15 Sep 2004 23:48:19 +0200
+
+python-mysqldb (1.1.3-1) unstable; urgency=low
+
+  * New Upstream Release 1.1.3
+    - Removes support for python2.1 (python2.2 isn't recommented as well)
+    - patch handled by upstream: 02_allow_stringified_timestamps
+      hope that the patch is superseeded, as this would add support for
+      MySQL 4.1 out of the box.
+  * Updated the package descriptions.
+  * cleaned up debian/rules:
+    - Moved exports in rules from build-python* to top
+    - removed quotes at var declarations
+    - changed from dynamical build for every configured python version to a
+      static one, to make build scripts more stable and avoid stupid bugs.
+      hopefully (closes: #270570, #270555)
+    - fixed sed usage, made package lintian clean
+  * fixed sed in postinst to work in woody (closes: #271013)
+  * fixed a small typo in the description of 2.3 package.
+
+ -- Jonas Meurer <mejo@debian.org>  Mon, 13 Sep 2004 10:20:16 +0200
+
+python-mysqldb (1.0.0-1) unstable; urgency=low
+
+  * Overtook package, changed Maintainer field (closes: 255473)
+  * New Upstream Release (closes: #229678)
+  * Accept the NMUs (closes: #205344, #205654, #190655, #158357)
+  * changed build-depends to libmysqlclient-dev, license issues
+    have been resolved, see #242449 for further information.
+  * changed patch system to dpatch
+  * improved debian/rules
+  * some minor changes in maintainer scripts
+  * upgraded standards-version to 3.6.1.1
+  * added upstream changelog
+  * patches/02_allow_stringified_timestamps:
+    - Allow stringified timestamps. This is the default in MySQL 4.1
+    - this patch breaks package install for MySQL < 4.1, therefore
+      still disabled in binary, only build support added (closes: #185462)
+  * added debian/watch file
+
+ -- Jonas Meurer <mejo@debian.org>  Fri, 13 Aug 2004 16:26:59 +0200
+
+python-mysqldb (0.9.2-0.4) unstable; urgency=low
+
+  * NMU
+  * Build for python2.3 as the default python version.
+    Closes: #205344, #205654.
+  * Change section to `python'.
+
+ -- Matthias Klose <doko@debian.org>  Thu, 21 Aug 2003 23:53:29 +0200
+
+python-mysqldb (0.9.2-0.3) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Fix conversion of datetime variables: times over 24 hours were
+    not converted properly. Closes: Bug#190655
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Fri, 25 Apr 2003 00:58:14 +0200
+
+python-mysqldb (0.9.2-0.2) unstable; urgency=low
+
+  * Build python2.3 packages.
+
+ -- Matthias Klose <doko@debian.org>  Sat, 28 Sep 2002 14:14:25 +0200
+
+python-mysqldb (0.9.2-0.1) unstable; urgency=low
+
+  * New upstream version.
+  * Fix download location (closes: #158357).
+
+ -- Matthias Klose <doko@debian.org>  Tue, 27 Aug 2002 09:15:24 +0200
+
+python-mysqldb (0.9.1-3) unstable; urgency=low
+
+  * Make the dependency on python2.1-mysqldb more strict.
+  * Build a package for python2.2 as well.
+
+ -- Gregor Hoffleit <flight@debian.org>  Mon, 31 Dec 2001 13:03:16 +0100
+
+python-mysqldb (0.9.1-2) unstable; urgency=low
+
+  * Fix to postinst (fixes "Can't list
+    /usr/lib/python2.1/site-packages/extension" message).
+
+ -- Gregor Hoffleit <flight@debian.org>  Thu, 27 Dec 2001 12:02:23 +0100
+
+python-mysqldb (0.9.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Gregor Hoffleit <flight@debian.org>  Fri, 14 Dec 2001 15:59:48 +0100
+
+python-mysqldb (0.9.0-1.1) unstable; urgency=low
+
+  * NMU to adapt to draft python-policy (default is python2.1).
+  * Add zlib1g-dev to build dependencies (closes: #103913).
+  * Remove old .py[co] files left from old package (closes: #101483).
+
+ -- Matthias Klose <doko@debian.org>  Fri,  2 Nov 2001 00:30:06 +0100
+
+python-mysqldb (0.9.0-1) unstable; urgency=low
+
+  * New upstream version (closes: 101224).
+    - now a true package.
+    - therefore some minor incompatibilities with earlier versions. They
+      won't hurt if you have sticked to the DB API.
+
+  * A FAQ is now included.
+  * examples have been removed (upstream).
+  * README.MySQLmodule is gone.
+
+ -- Gregor Hoffleit <flight@debian.org>  Sun, 17 Jun 2001 23:14:39 +0200
+
+python-mysqldb (0.3.5-2) unstable; urgency=low
+
+  * Correct the dependencies of python2-mysqldb (closes: #92166).
+
+ -- Gregor Hoffleit <flight@debian.org>  Fri, 30 Mar 2001 22:51:56 +0200
+
+python-mysqldb (0.3.5-1) unstable; urgency=high
+
+  * New upstream:
+    - fixes a typographical error which broke 0.3.4 badly
+    - also a fix for a long-standing bug in _mysql which caused it to not
+      work with Python 2.1b2
+  * Added back the documentation (from 0.3.3), which was somehow left out
+    in 0.3.4 and 0.3.5.
+  * Include all docs and examples in python2-mysqldb as well.
+
+ -- Gregor Hoffleit <flight@debian.org>  Thu, 29 Mar 2001 16:32:51 +0200
+
+python-mysqldb (0.3.4-1) unstable; urgency=low
+
+  * New upstream version. 
+  * New python2-mysqldb package, added python2-dev to build-dependencies.
+  * Docs have been removed...
+
+ -- Gregor Hoffleit <flight@debian.org>  Sun, 25 Mar 2001 20:28:34 +0200
+
+python-mysqldb (0.3.3-1) unstable; urgency=low
+
+  * New upstream version.
+  * Added build-dependency on debhelper (closes: #84786).
+  * Cleanups in debian/rules.
+
+ -- Gregor Hoffleit <flight@debian.org>  Sat, 17 Feb 2001 22:44:09 +0100
+
+python-mysqldb (0.3.0-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Gregor Hoffleit <flight@debian.org>  Sat,  2 Dec 2000 11:29:03 +0100
+
+python-mysqldb (0.2.999b2-1) unstable; urgency=low
+
+  * New upstream version (is really 0.3.0b2), closes: #74752.
+  * Recompiled with libmysqlclient10-dev, built with python-distutils.
+  * Include dependency on python-base (closes: #68776).
+  * Author's email address and download location changed in copyright
+    file.
+  * Note that examples/dbtrainer0 is currently broken.
+
+ -- Gregor Hoffleit <flight@debian.org>  Sat, 25 Nov 2000 10:50:34 +0100
+
+python-mysqldb (0.1.1-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Gregor Hoffleit <flight@debian.org>  Wed, 20 Oct 1999 22:23:30 +0200
+
+python-mysqldb (0.1.0-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Gregor Hoffleit <flight@debian.org>  Wed, 15 Sep 1999 14:07:55 +0200
+
--- python-mysqldb-1.2.2.orig/debian/python-mysqldb-dbg.lintian-overrides
+++ python-mysqldb-1.2.2/debian/python-mysqldb-dbg.lintian-overrides
@@ -0,0 +1 @@
+python-mysqldb-dbg binary: package-contains-empty-directory usr/share/python-support/python-mysqldb-dbg/
--- python-mysqldb-1.2.2.orig/debian/watch
+++ python-mysqldb-1.2.2/debian/watch
@@ -0,0 +1,2 @@
+version=3
+opts="uversionmangle=s/([a-z]\d+)$/~$1/" http://qa.debian.org/watch/sf.php/mysql-python/MySQL-python-(.*)\.tar\.gz debian uupdate
--- python-mysqldb-1.2.2.orig/debian/copyright
+++ python-mysqldb-1.2.2/debian/copyright
@@ -0,0 +1,28 @@
+This package was debianized by Gregor Hoffleit <flight@debian.org> on
+Wed, 15 Sep 1999 14:07:55 +0200.
+
+It was downloaded from http://sourceforge.net/projects/mysql-python
+
+Upstream Author: Andy Dustman <andy@dustman.net>
+
+Copyright © 2002-2007 Andy Dustman <andy@dustman.net>
+
+License:
+
+   This package is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This package is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+   
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- python-mysqldb-1.2.2.orig/debian/patches/00dpatch.conf
+++ python-mysqldb-1.2.2/debian/patches/00dpatch.conf
@@ -0,0 +1,2 @@
+conf_debianonly=1
+conf_origtargzpath=../tarballs
--- python-mysqldb-1.2.2.orig/debian/patches/00list
+++ python-mysqldb-1.2.2/debian/patches/00list
@@ -0,0 +1,5 @@
+01_converters_boolean
+03_converters_set2str
+04_disable_ez_setup
+05_null-connection-guard
+06_mysql_connect_port
--- python-mysqldb-1.2.2.orig/debian/patches/04_disable_ez_setup.dpatch
+++ python-mysqldb-1.2.2/debian/patches/04_disable_ez_setup.dpatch
@@ -0,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_disable_ez_setup.dpatch by Piotr Ożarowski <piotr@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):
--- python-mysqldb-1.2.2.orig/debian/patches/05_null-connection-guard.dpatch
+++ python-mysqldb-1.2.2/debian/patches/05_null-connection-guard.dpatch
@@ -0,0 +1,62 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_null-connection-guard.dpatch by Bernd Zeimetz <bernd@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) {
--- python-mysqldb-1.2.2.orig/debian/patches/06_mysql_connect_port.dpatch
+++ python-mysqldb-1.2.2/debian/patches/06_mysql_connect_port.dpatch
@@ -0,0 +1,20 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_mysql_connect_port.dpatch by Monty Taylor <monty@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",
--- python-mysqldb-1.2.2.orig/debian/patches/03_converters_set2str.dpatch
+++ python-mysqldb-1.2.2/debian/patches/03_converters_set2str.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+
+## 03_converters_set2str.dpatch by Simeon Anastasov <simeon.anastasov@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix set2str
+
+@DPATCH@
+
+--- python-mysqldb-1.2.2/MySQLdb/converters.py
++++ python-mysqldb-1.2.2/MySQLdb/converters.py
+@@ -42,7 +42,8 @@
+ def Bool2Str(s, d): return str(int(s))
+ 
+ def Str2Set(s):
+-    return Set([ i for i in s.split(',') if i ])
++    values = s.split(',')
++    return map(str, tuple(values))
+ 
+ def Set2Str(s, d):
+     return string_literal(','.join(s), d)
--- python-mysqldb-1.2.2.orig/debian/patches/01_converters_boolean.dpatch
+++ python-mysqldb-1.2.2/debian/patches/01_converters_boolean.dpatch
@@ -0,0 +1,23 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+
+## 01_converters_boolean.dpatch by Jonas Meurer <mejo@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: take boolean into account at converters.py
+
+@DPATCH@
+
+--- python-mysqldb-1.2.2/MySQLdb/converters.py
++++ python-mysqldb-1.2.2/MySQLdb/converters.py
+@@ -163,5 +163,10 @@
+ except ImportError:
+     pass
+ 
+-
++try:
++    from types import BooleanType
++    def Bool2Str(s, d): return str(int(s))
++    conversions[BooleanType] = Bool2Str
++except ImportError:
++    pass
+ 
--- python-mysqldb-1.2.2.orig/debian/postinst
+++ python-mysqldb-1.2.2/debian/postinst
@@ -0,0 +1,10 @@
+#! /bin/sh -e
+
+# remove old .py[co] files leftover from old package
+if [ -d /usr/lib/python1.5/site-packages/_mysql_const ]; then
+  rm -rf /usr/lib/python1.5/site-packages/_mysql_const
+fi
+
+#DEBHELPER#
+
+exit 0
