* removed directory filtering in setup.py; should no longer be necessary,

and it seems to cause problems on some platforms or versions of MySQL
  (most likely 3.23's mysql_config)

* removed use of weak references; I don't think they were needed any more,
  and they caused problems in some of the threaded tests.

* applied patch #1188359: If converters are passed in, use a copy().

* Version 1.2.1c2.
This commit is contained in:
adustman
2005-05-01 00:09:25 +00:00
parent cebe539399
commit f58ed4b020
4 changed files with 11 additions and 19 deletions

View File

@ -20,7 +20,7 @@ version_info = (
2,
1,
"gamma",
1)
2)
if version_info[3] == "final": __version__ = "%d.%d.%d" % version_info[:3]
else: __version__ = "%d.%d.%d%1.1s%d" % version_info[:5]

View File

@ -116,10 +116,10 @@ class Connection(_mysql.connection):
from constants import CLIENT, FIELD_TYPE
from converters import conversions
import types
from weakref import proxy
kwargs2 = kwargs.copy()
if kwargs.has_key('conv'):
kwargs2['conv'] = conv = kwargs['conv']
kwargs2['conv'] = conv = kwargs['conv'].copy()
else:
kwargs2['conv'] = conv = conversions.copy()
if kwargs.has_key('cursorclass'):
@ -136,16 +136,16 @@ class Connection(_mysql.connection):
self.charset = self.character_set_name().split('_')[0]
if use_unicode:
def u(s, self=proxy(self)):
def u(s):
return s.decode(self.charset)
conv[FIELD_TYPE.STRING] = u
conv[FIELD_TYPE.VAR_STRING] = u
conv[FIELD_TYPE.BLOB].insert(-1, (None, u))
def string_literal(obj, dummy=None, self=proxy(self)):
def string_literal(obj, dummy=None):
return self.string_literal(obj)
def unicode_literal(u, dummy=None, self=proxy(self)):
def unicode_literal(u, dummy=None):
return self.literal(u.encode(self.charset))
self.converter[types.StringType] = string_literal

View File

@ -1,5 +1,5 @@
#define version_info "(1,2,1,'gamma',1)"
#define __version__ "1.2.1c1"
#define version_info "(1,2,1,'gamma',2)"
#define __version__ "1.2.1c2"
/*
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

View File

@ -37,7 +37,7 @@ embedded_server = (mysqlclient == 'mysqld')
name = "MySQL-%s" % os.path.basename(sys.executable)
if embedded_server:
name = name + "-embedded"
version = "1.2.1c1"
version = "1.2.1c2"
extra_objects = []
@ -67,11 +67,6 @@ else:
if f.close(): data = []
return data
def stripquotes(s):
if s[0] in ("'", '"') and s[0] == s[-1]:
return s[1:-1]
return s
include_dirs = [ i[2:] for i in config('include') if i.startswith('-i') ]
if mysqlclient == "mysqlclient":
@ -80,8 +75,8 @@ else:
libs = config("libs_r")
elif mysqlclient == "mysqld":
libs = config("embedded")
library_dirs = [ stripquotes(i[2:]) for i in libs if i.startswith("-L") ]
libraries = [ stripquotes(i[2:]) for i in libs if i.startswith("-l") ]
library_dirs = [ i[2:] for i in libs if i.startswith("-L") ]
libraries = [ i[2:] for i in libs if i.startswith("-l") ]
# Workaround for a pre-4.1.9 bug
if "z" not in libraries:
@ -95,9 +90,6 @@ else:
else:
libraries.append(mysqlclient)
# avoid frightening noobs with warnings about missing directories
include_dirs = [ d for d in include_dirs if os.path.isdir(d) ]
library_dirs = [ d for d in library_dirs if os.path.isdir(d) ]
classifiers = """
Development Status :: 5 - Production/Stable