public

  • Download Gist
MySQL-python-1.2.2 patch for Snow Leopard
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
diff -rup MySQL-python-1.2.2/MySQLdb/converters.py MySQL-python-1.2.2.new/MySQLdb/converters.py
--- MySQL-python-1.2.2/MySQLdb/converters.py 2010-08-13 16:50:32.000000000 +0200
+++ MySQL-python-1.2.2.new/MySQLdb/converters.py 2007-01-29 19:02:17.000000000 +0100
@@ -34,9 +34,7 @@ MySQL.connect().
 
from _mysql import string_literal, escape_sequence, escape_dict, escape, NULL
from constants import FIELD_TYPE, FLAG
-#from sets import BaseSet, Set
-BaseSet = set
-Set = frozenset
+from sets import BaseSet, Set
from times import *
import types
import array
diff -rup MySQL-python-1.2.2/MySQLdb/__init__.py MySQL-python-1.2.2.new/MySQLdb/__init__.py
--- MySQL-python-1.2.2/MySQLdb/__init__.py 2007-02-26 20:00:32.000000000 +0100
+++ MySQL-python-1.2.2.new/MySQLdb/__init__.py 2010-08-06 16:58:57.000000000 +0200
@@ -31,14 +31,16 @@ from MySQLdb.constants import FIELD_TYPE
from MySQLdb.times import Date, Time, Timestamp, \
DateFromTicks, TimeFromTicks, TimestampFromTicks
-from sets import ImmutableSet
+#from sets import ImmutableSet
+ImmutableSet = frozenset
class DBAPISet(ImmutableSet):
"""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
+# from sets import BaseSet
+ BaseSet = set
if isinstance(other, BaseSet):
return super(DBAPISet.self).__ne__(self, other)
else:
diff -rup MySQL-python-1.2.2/_mysql.c MySQL-python-1.2.2.new/_mysql.c
--- MySQL-python-1.2.2/_mysql.c 2007-02-28 03:35:56.000000000 +0100
+++ MySQL-python-1.2.2.new/_mysql.c 2010-08-06 16:16:04.000000000 +0200
@@ -34,9 +34,6 @@ PERFORMANCE OF THIS SOFTWARE.
#else
#include "my_config.h"
#endif
-#ifndef uint
-#define uint unsigned int
-#endif
#include "mysql.h"
#include "mysqld_error.h"
#include "errmsg.h"
@@ -481,8 +478,8 @@ _mysql_ConnectionObject_Initialize(
#endif
char *host = NULL, *user = NULL, *passwd = NULL,
*db = NULL, *unix_socket = NULL;
- uint port = MYSQL_PORT;
- uint client_flag = 0;
+ unsigned int port = MYSQL_PORT;
+ unsigned int client_flag = 0;
static char *kwlist[] = { "host", "user", "passwd", "db", "port",
"unix_socket", "conv",
"connect_timeout", "compress",
diff -rup MySQL-python-1.2.2/setup_posix.py MySQL-python-1.2.2.new/setup_posix.py
--- MySQL-python-1.2.2/setup_posix.py 2007-03-04 03:52:26.000000000 +0100
+++ MySQL-python-1.2.2.new/setup_posix.py 2010-08-06 16:21:01.000000000 +0200
@@ -23,7 +23,7 @@ def mysql_config(what):
if ret/256 > 1:
raise EnvironmentError, "%s not found" % mysql_config.path
return data
-mysql_config.path = "mysql_config"
+mysql_config.path = "/usr/local/mysql/bin/mysql_config"
def get_config():
import os, sys

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.