mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 11:10:58 +08:00
Version 1.2.1c3:
* _mysql.c: raise ProgrammingError for certain methods if they are used on Result object created with conn.use_result(), since they don't make sense. * setup.py: Reimplement quote stripping around directory names. This seems to be a bug in older versions of mysql_config * cursors.py: If a unicode query string is passed, encode it in the connection's character set.
This commit is contained in:
@ -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.1c2"
|
||||
version = "1.2.1c3"
|
||||
|
||||
extra_objects = []
|
||||
|
||||
@ -67,7 +67,15 @@ else:
|
||||
if f.close(): data = []
|
||||
return data
|
||||
|
||||
include_dirs = [ i[2:] for i in config('include') if i.startswith('-i') ]
|
||||
# This dequote() business is required for some older versions
|
||||
# of mysql_config
|
||||
|
||||
def dequote(s):
|
||||
if (s[0] == "'" or s[0] == '"') and (s[0] == s[-1]):
|
||||
s = s[1:-1]
|
||||
return s
|
||||
|
||||
include_dirs = [ dequote(i[2:]) for i in config('include') if i.startswith('-i') ]
|
||||
|
||||
if mysqlclient == "mysqlclient":
|
||||
libs = config("libs")
|
||||
@ -75,8 +83,8 @@ else:
|
||||
libs = config("libs_r")
|
||||
elif mysqlclient == "mysqld":
|
||||
libs = config("embedded")
|
||||
library_dirs = [ i[2:] for i in libs if i.startswith("-L") ]
|
||||
libraries = [ i[2:] for i in libs if i.startswith("-l") ]
|
||||
library_dirs = [ dequote(i[2:]) for i in libs if i.startswith("-L") ]
|
||||
libraries = [ dequote(i[2:]) for i in libs if i.startswith("-l") ]
|
||||
|
||||
# Workaround for a pre-4.1.9 bug
|
||||
if "z" not in libraries:
|
||||
|
Reference in New Issue
Block a user