Connector/Python is now compatible with Django 1.7. (Bug #72746, Bug #19163169)
-
RANGE_DATETIME
is now supported as a sharding type. This is similar to the regularRANGE
sharding type, but instead of an integer key, requires a datetime or date object. For example, to get the shard which holds employees hired after the year 2000, you could do the following, with lower bounds set as "group1/1980-01-01, group2/2000-01-01":cnx.set_property(tables=["employees.employees"], key=datetime.date(2000, 1, 1), mode=fabric.MODE_READONLY)
If the lower bounds included a time, it would have been like this:
cnx.set_property(tables=["employees.employees"], key=datetime.datetime(2000, 1, 1, 12, 0, 0), mode=fabric.MODE_READONLY)
Only
datetime.datetime
anddatetime.date
values are supported. Any other type given when using a shard defined usingRANGE_DATETIME
causes aValueError
to be raised. (WL #7955) -
RANGE_STRING
is now supported as a sharding type. This is similar to the regularRANGE
sharding type, but instead of an integer key, requires a UTF-8 encoded string. For example:cnx.set_property(tables=["employees.employees"], key=u'employee_name', mode=fabric.MODE_READONLY)
Only Unicode strings are supported. Any other type given when using a shard defined using
RANGE_STRING
causes aValueError
to be raised. (WL #7954)
Connector/Python failed to catch an exception when SSL capability was found to be unavailable. (Bug #19440592)
Date and time query formatting was fixed for the Django back end. (Bug #19179711)
Multiple
[connector_python]
option groups sometimes caused an error. (Bug #19170287)An error failed to occur if an option file was named multiple times. (Bug #19169143)
Some valid Connector/Python connection options were not recognized when specified in the
[connector_python]
option group. (Bug #19168737)!include
and!includedir
directives in option files were not handled properly. (Bug #73660, Bug #19481761)Binding
None
(NULL
) to a parameter marker in a prepared statement did not work. (Bug #73370, Bug #19282158)With Python 2, Connector/Python could truncate digits of floating-point values. (Bug #73266, Bug #19225481)
An exception was raised when a cursor tried to convert
LINESTRING
data as UTF-8 data. Now such values are returned without decoding. (Bug #73187, Bug #19164627)Connector/Python now supports a
shutdown()
method that, unlikedisconnect()
, closes the client connection without attempting to send aQUIT
command to the server first. Thus, it will not block if the connection is disrupted for some reason such as network failure. (Bug #72691, Bug #18798953)