Invalid dates returning None, or raise error using Connector/Python?

In this blog we discuss invalid dates in MySQL, how to retrieve them using Connector/Python and we raise the question: Should Connector/Python raise an error or just keep returning None on invalid dates? If you run MySQL without proper SQL Modes, you will be able to update and read invalid dates such as 2012-06-00. If you’ve payed attention the past decade, you’ll know that you can prevent this configuring your MySQL server setting SQL Mode to TRADITIONAL.

MySQL Connector/Python bugs reports on bugs.mysql.com

We have moved bugs for MySQL Connector/Python from Launchpad to the MySQL Bugs website http://bugs.mysql.com. Reports which are (probably) fixed in newer code were not taken with. If there is a bug which you really want to get tracked: please report it again. Please use the MySQL Bugs website to report problems using MySQL Connector/Python. To see a list of active reports, click here.

Automatic reconnect in MySQL Connector/Python?

There have been some request to have some reconnect possibilities in Connector/Python. I’m wondering now whether there should be some automatic reconnect on certain errors within the database driver. My personal feeling is to have no automatic reconnect within Connector/Python and the programmer has to come up with retrying transactions herself. For example: cnx.disconnect() # For testing.. tries = 2 while tries > 0: tries -= 1 try: cursor.execute("INSERT INTO t1 (c1) VALUES ('ham')") cnx.

MySQL Connector/Python available through the Python Package Index

Today we registered MySQL Connector/Python with the Python Package Index (PyPI). It makes installing your favorite connector even easier (provided you first install setuptools or pip): $ easy_install mysql-connector $ pip install mysql-connector Please report problems either using Launchpad or MySQL Bugs website.