Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'builtins': 0.07; 'something,': 0.07; 'output': 0.10; 'am,': 0.12; 'algorithm': 0.13; 'received:209.85.210.174': 0.13; 'received:mail- iy0-f174.google.com': 0.13; '16,': 0.15; 'mon,': 0.15; 'caching': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'useless.': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'header:In-Reply- To:1': 0.22; 'runs': 0.23; 'guess': 0.25; 'message- id:@mail.gmail.com': 0.28; 'affected': 0.28; 'hash': 0.30; '(the': 0.30; 'anyone': 0.31; 'version': 0.31; "isn't": 0.32; 'it.': 0.33; 'to:addr:python-list': 0.33; 'points': 0.33; 'function.': 0.34; 'something': 0.35; 'depend': 0.36; 'query': 0.36; 'but': 0.37; "there's": 0.37; 'received:google.com': 0.37; 'using': 0.37; 'could': 0.37; 'stable': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'received:209': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'more': 0.61; 'course,': 0.61; 'stability': 0.67; 'kept': 0.68; 'proclaimed': 0.84; 'preferred,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=KTdokw48CMib9DbdtyRhGI553cTIfkssI5pEytJ/pm0=; b=BdpsHnHLt2cBK6X+KV3uhrJaff1Fz8zhuWJ5hU/Nc24jIlP3qfE/8wPPNFNh957iDE UlfRFH/LPpVh8ZixG0gW3cOxY9IjzU2ufZ/voyBKpjUTcMWgLgZ2iVe9CbcKoBKWP9ES WlKt0OTog3n27dx2sUAvlA3TpmDACVF3/p1d4= MIME-Version: 1.0 In-Reply-To: <4F12F9D8.5080904@modelnine.org> References: <4f1107b7$0$29988$c3e8da3$5496439d@news.astraweb.com> <4F1205A7.70303@modelnine.org> <4F12BC8A.9040205@modelnine.org> <4F12F9D8.5080904@modelnine.org> Date: Mon, 16 Jan 2012 03:13:01 +1100 Subject: Re: Hash stability From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326643983 news.xs4all.nl 6952 [2001:888:2000:d::a6]:58122 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19011 On Mon, Jan 16, 2012 at 3:07 AM, Heiko Wundram wrote: > I don't know the prevalence of suds, but I guess there's more people than me > using it to query SOAP-services - all of those will be affected if the > hash() output is changed. Additionally, if hash() isn't stable between runs > (the randomized hash() solution which is preferred, and would also be my > preference), suds caching becomes completely useless. And for the results, > see above. Or you could just monkey-patch it so that 'hash' points to an old hashing function. If the current hash() is kept in builtins as (say) hash_320() or hash_272() or something, then anyone who wants the old version of the hash can still get it. Of course, it's still dodgy to depend on the stability of something that isn't proclaimed stable, and would be far better to use some other hashing algorithm (MD5 or SHA for uberreliability). ChrisA