From a4892cd07e6bae97170018340ebcf8c39c73731b Mon Sep 17 00:00:00 2001 From: adustman Date: Sun, 3 Apr 2005 04:23:18 +0000 Subject: [PATCH] Merge in changes from the trunk --- MySQLdb/MySQLdb/__init__.py | 4 ++-- MySQLdb/MySQLdb/converters.py | 7 +++++++ MySQLdb/README | 4 ++-- MySQLdb/_mysql.c | 4 ++-- MySQLdb/setup.py | 9 ++++++--- 5 files changed, 19 insertions(+), 9 deletions(-) diff --git a/MySQLdb/MySQLdb/__init__.py b/MySQLdb/MySQLdb/__init__.py index dbd5492..9531c42 100644 --- a/MySQLdb/MySQLdb/__init__.py +++ b/MySQLdb/MySQLdb/__init__.py @@ -17,8 +17,8 @@ __author__ = "Andy Dustman " __revision__ = """$Revision$"""[11:-2] version_info = ( 1, - 1, - 10, + 2, + 0, "final", 1) if version_info[3] == "final": __version__ = "%d.%d.%d" % version_info[:3] diff --git a/MySQLdb/MySQLdb/converters.py b/MySQLdb/MySQLdb/converters.py index fe1cd00..dc2bdad 100644 --- a/MySQLdb/MySQLdb/converters.py +++ b/MySQLdb/MySQLdb/converters.py @@ -147,3 +147,10 @@ try: conversions[FIELD_TYPE.DECIMAL] = Decimal except ImportError: pass + +try: + from types import BooleanType + def Bool2Str(s, d): return str(int(s)) + conversions[BooleanType] = Bool2Str +except ImportError: + pass diff --git a/MySQLdb/README b/MySQLdb/README index 160eeca..62948e9 100644 --- a/MySQLdb/README +++ b/MySQLdb/README @@ -128,8 +128,8 @@ or you want to use the embedded server (mysqld). Finally, putting it together:: - $ tar xfz MySQL-python-1.1.10.tar.gz - $ cd MySQL-python-1.1.10 + $ tar xfz MySQL-python-1.2.0.tar.gz + $ cd MySQL-python-1.2.0 $ python setup.py build $ su # or use sudo # python setup.py install diff --git a/MySQLdb/_mysql.c b/MySQLdb/_mysql.c index 50bbfc8..7b61a72 100644 --- a/MySQLdb/_mysql.c +++ b/MySQLdb/_mysql.c @@ -1,5 +1,5 @@ -#define version_info "(1,1,10,'final',1)" -#define __version__ "1.1.10" +#define version_info "(1,2,0,'final',1)" +#define __version__ "1.2.0" /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/MySQLdb/setup.py b/MySQLdb/setup.py index 9d79676..f3d85d4 100644 --- a/MySQLdb/setup.py +++ b/MySQLdb/setup.py @@ -37,7 +37,7 @@ embedded_server = (mysqlclient == 'mysqld') name = "MySQL-%s" % os.path.basename(sys.executable) if embedded_server: name = name + "-embedded" -version = "1.1.10" +version = "1.2.0" extra_objects = [] @@ -62,9 +62,12 @@ else: def config(what): from os import popen - return popen("mysql_config --%s" % what).read().strip().split() + f = popen("mysql_config --%s" % what) + data = f.read().strip().split() + if f.close(): data = [] + return data - include_dirs = [ i[2:] for i in config('include') ] + include_dirs = [ i[2:] for i in config('include') if i.startswith('-i') ] if mysqlclient == "mysqlclient": libs = config("libs")