Thursday, 28 January 2010

MySQL Connector/Python v0.1.3-devel is now available for download from Launchpad.org. Please note that this is a development (i.e. alpha, unstable, ..) release and we welcome everyone to test and report problems.

Highlights for this v0.1.3-devel:

  • Important memory leak fixed when closing cursors.
  • Warnings can now be raised as exceptions.
  • Fixing unicode usage and broken error message when MySQL chops them
  • Client flags can now be set correctly when connecting
  • Conversion fixes for BIT/YEARSET and Python to DATE/DATETIME
  • Adding MySQL Client Errors and raising better exceptions based on errno.

Enjoy!

Friday, 22 January 2010

Using SQLAlchemy unit test cases to further develop MySQL Connector/Python. It's probably debatable whether that's a good method or just lame. But it sure helps lots!

We've been pushing some code past days that makes Connector/Python almost pass all tests. Well, 4% is still failing, but I'm confident that in a few most problems will be dealt with. I had to make some changes to the SQLAlchemy v0.6 dialect as well, and some test cases had to be corrected. Hopefully those corrections will also go in the SQLAlchemy trunk later on.


shell> nosetests --dburi=mysql+mysqlconnector://root:@localhost/sqlalchemy
..
----------------------------------------------------------------------
Ran 2092 tests in 314.656s

FAILED (errors=72, failures=11)

If you run the same tests against MySQLdb, you'll see (of course) less failures (9 to be exact).

Saturday, 9 January 2010

FOSDEM 2010, Sunday 7 February, the MySQL Developer Room packed with 12 talks! And this year we serve Python just before the lunch break.

In 20 minutes I'll try to give an overview of the drivers currently available for connecting your Python applications with MySQL. Incase you wonder, this will not evolve around MySQL Connector/Python alone!

We'll also go over some frameworks and tools like SQLAlchemy.

20 minutes, it's not much, but should be enough. I hope to get a similar talk accepted for the MySQL Conference&Expo 2010.

Friday, 8 January 2010

Last week I took SQLAlchemy v0.6 out of its trunk and tested it again with our MySQL Connector/Python. And surprise! SQLAlchemy comes with a 'dialect' supporting it! Nice!

However, we're still a long way on making it work. I found some additional problems which need to be fixed first.


shell> nosetests --dburi=mysql+mysqlconnector://root:@localhost/sqlalchemy \
test/dialect/test_mysql.py
..
Ran 32 tests in 4.507s

FAILED (errors=6, failures=1)

Oh, there were more errors and failures and all that due to bugs in MySQL Connector/Python. There were already some modification to the dialect (e.g. name change), and there might be some more.

If we got this sorted, Turbogears should work too!

Monday, 4 January 2010

A few days ago MySQL 5.1.42 got released and it is now available with builds for MacOS X 10.6 (Snow Leopard)! The download website doesn't show it yet, but if you are burning to try, you can get it from the mirror-picking-website.

As usual, don't forget to checkout the changelog before upgrading!

If you want to compile it yourself, and need a universal binary, you could try my previous blog entry «Building MySQL universal binaries using MacOS X 10.6 (Snow Leopard)».

Sunday, 3 January 2010

Saturday 2 January, 13:05 CET: "This is your captain speaking. We are ready to start but we'll have to wait another 5 to 10 minutes because a bag was apparently loaded to much. Security regulations say we have to get it off the plane." Fair enough, the passengers were silently agreeing.
20 minutes later, the voice from the cockpit brought some update, which really wasn't one: "Bag not found yet.."

A few passengers, including me, were already getting annoyed, some a bit angry. Lots of people had connecting flights in Munich (Germany), and staying longer on the ground in Kraków (Poland) was just not helping the flight schedule.

"People, the bag has.. not been found." Silence in the plane as few had already wondered why the bags were getting lined up on the airport's Tarmac.. in the snow.. getting wet. The captain spoke again: "We ask you kindly to get off the plane using the front exit, walk past the luggage and identify yours. Please re-enter through the rear entrance."
Laughter, a few people clapping hands but failing to get more folks doing the same. Most passengers were tired waiting and wanted to get it over with. This identification was probably going to be our fasted way up.
Few of us having only carry-on luggage didn't care, and we were watching from the plane what was happening outside. It was like a carousel, only the music and the chairs were missing as I picture me stopping the music.

After about 2 hours, the bag was eventually found, the voice out of the cockpit explained. "Now we can continue our flight.. but we'll need another 5 to 10 minutes to de-ice the airplane." Sighs and moaning rushed through the belly of the machine, but people already accepted their faiths.

We arrived like 2 hours late in Munich. Lufthansa had their service center well staffed and were helping people as fast as they could. It's not easy to rebook as passengers also need to think about the consequences when getting a day later at their destination.
I had luck: there was another flight at 19:05 to Brussels. However, the queue was really slowly dissolving and time was critically getting toowards my hopefully new departure. But after a jolly hour and a half waiting, my ticket got rebooked in 10 seconds and I was on my way!

During the waiting in line at the service center I learned from other passengers that it wasn't apparently one bag, but a whole bunch of them! They saw a chariot full of bags driving away from the plane. There might be lots of people missing their toothbrush next day..

Lufthansa is a great company. They have a very, good service, both on the ground and in the air. Planes are nice and mostly on time. I admire companies that have to endure human behavior, make it somehow work out and get people there. Kudos to the folks at the service center keeping their cool.
This incident wasn't Lufthansa's fault, I think. It might have been some mistake from the Krakaw airport luggage services. Shit happens..