delphij's Chaos


03 Nov 2009

PlanetPlanet vs Python 2.6

On Python 2.6 we have a new ‘hashlib’ module, which superseded older ‘md5’ ‘sha1’ modules.

Therefore, importing ‘md5’ would give the following warnings:

DeprecationWarning: the md5 module is deprecated; use hashlib instead

This is quite annoying if you run PlanetPlanet in a cron(8) job and receive e-mail reports. In order to solve that, we can do some simple sed(1) replace over PlanetPlanet’s

s/import md5/import hashlib/g


That’s it! And PlanetPlanet will now happily work with Python 2.6.