[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Patch] Replace deprecated md5 module by hashlib

From: Neil Puttock
Subject: Re: [Patch] Replace deprecated md5 module by hashlib
Date: Sat, 11 Jul 2009 00:01:05 +0100

2009/7/9 Maximilian Albert <address@hidden>:
> 2009/7/9 Jan Nieuwenhuizen <address@hidden>:
>> On do, 2009-07-09 at 21:41 +0900, Maximilian Albert wrote:
>>> Hi,
>>> while running the regtests I spotted a warning about the use of the
>>> deprecated md5 module in scripts/ Attached is a patch
>>> which replaces this module by hashlib as recommended in the warning.
>> This won't work with python 2.4, or am I missing something?
>>  -- the rest of lily still builds with that...
> Ah, sorry. In this case please ignore my message. Sorry for the noise.

How about using a `try' block to import conditionally?

Here's how Rietveld's deals with it:

# The md5 module was deprecated in Python 2.5.
  from hashlib import md5
except ImportError:
  from md5 import md5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]