MySQL Blog Archive
For the latest blogs go to blogs.oracle.com/mysql
MySQL Connector/Python 8.0.13 has been released

Dear MySQL users,

MySQL Connector/Python 8.0.13 is the third GA release version of the
MySQL Connector Python 8.0 series. This series adds support for Python
3.7. The X DevAPI enables application developers to write code that
combines the strengths of the relational and document models using a
modern, NoSQL-like syntax that does not assume previous experience
writing traditional SQL.

To learn more about how to write applications using the X DevAPI, see
http://dev.mysql.com/doc/x-devapi-userguide/en/. For more information
about how the X DevAPI is implemented in MySQL Connector/Python, and its
usage, see http://dev.mysql.com/doc/dev/connector-python.

For general documentation about how to get started using MySQL
as a document store, see
http://dev.mysql.com/doc/refman/8.0/en/document-store.html.

To download MySQL Connector/Python 8.0.13, see the “General Available
(GA) releases” tab at http://dev.mysql.com/downloads/connector/python/

Enjoy!


Changes in MySQL Connector/Python 8.0.13 (2018-10-22, General Availability)


Functionality Added or Changed


     * Added Python 3.7 support. (Bug #27081809, Bug #87818)

     * To go with the existing mysqlx.get_session(conn_str)
       method, a new mysqlx.get_client(conn_str, options) method was
       added that creates a connection pool handler that provides a
       get_session() method to create and retrieve connections from the
       pool. The collection pooling options are:

          + enabled: enables or disables connection pooling;
            boolean and defaults to true.

          + max_size: maximum number of connections available in
            the pool; positive integer and defaults to 25.

          + max_idle_time: maximum number of milliseconds a
            connection can be idle in the queue before being
            closed; integer >= 0 and defaults to 0 (infinite).

          + queue_timeout: maximum number of milliseconds a
            request will wait for a connection to become
            available; integer >= 0 and defaults to 0
            (infinite).
            This is different than connect_timeout that's used
            for non-pooling. In a pooling scenario there are
            already connections in the pool, so queue_timeout
            controls how long to wait for a connection in the
            pool.
       Example usage:
client = mysqlx.get_client(
    {
    'host': 'localhost',
    'port': 33060,
    'user': 'mike',
    'password': 'password'
    },
    { pooling: {
        enabled: true,
        max_idle_time: 5000,
        max_size: 25,
        queue_timeout: 20000
        }
    }
)

       Closing a session attached to the pool makes the
       connection available in the pool for subsequent
       get+session() calls, while closing (destroying) the pool
       effectively closes all server connections.

     * Added a connection-timeout connection timeout query
       parameter. This defines the length of time (milliseconds)
       the client waits for a MySQL server to become available
       in the given network addresses. It was added to both the
       mysqlx.get_session() (non-pooling sessions) and
       mysqlx.get_client() (pooling sessions) interfaces. This
       option defaults to 10000 (10 seconds). The value 0
       disables the timeout so the client will wait until the
       underlying socket (platform dependent) times out.
       Example usages:
mysqlx.get_session("root@localhost?connect-timeout=0");
mysqlx.get_session("root@[localhost:33060, 127.0.0.1:33060]?connect-ti
meout=5000");

       In a multi-host scenario, the connect-timeout value applies to
       each individual host.

Bugs Fixed


     * On Windows, the 32-bit MSI failed to install. The
       registry key path was updated to allow the CEXT prerequisite
       check to execute and pass. (Bug #28395599, Bug #28464866)

     * Subsequent collection.add() method calls would leak
       memory if the C extension was enabled. (Bug #28278352)

     * Missing bind() parameters could cause an unclear error
       message or unexpectedly halt. (Bug #28037275)

     * The username and password fields are now quoted to allow
       special characters when making X DevAPI connections.
       (Bug #27528819, Bug #89614)

Enjoy and thanks for the support!

On behalf of the MySQL Release Team,
Nawaz Nazeer Ahamed