Yesterday I rolled a new Apple release and moved some site changes to my prod server.  After doing this mod_python went nuts throwing assorted exceptions about the recursion limit being exceeded.  After some troubleshooting it seems that the python-json module bundled with Apple was returning an empty string when json.read() was called (regardless of whether the string in question was valid JSON or not).  Next I need to determine why my code became so angry when session wasn’t completely available.

This isn’t necessarily significant, but considering I had already deployed the exact same code base to a dev and stage server… I didn’t expect to run into any problems.  In fact I think this is the first time I’ve ever had my code work so differently in prod as it did in dev/stage.  Eventually I gave up on trying to determine why python-json was returning empty strings and simply replaced it with another Python JSON implementation.  I chose to use demjson simplejson which is now running beautifully.

While troubleshooting my failed upgrade I also stumbled across two defects.  Apple was duplicating all session keys in the database because it wasn’t resetting properly after the db commit.  I bundled this fix into the 0.2.4 release.  I also realized that I need to stop procrastinating and “eggify” the Apple build process.

All is finally well