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!newsfeed20.multikabel.net!news2.euro.net!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'implements': 0.05; 'builtins': 0.07; 'something,': 0.07; 'caching,': 0.09; 'overwrite': 0.09; 'output': 0.10; ';-)': 0.12; 'am,': 0.12; '16,': 0.15; 'mon,': 0.15; 'caching': 0.16; 'replaced.': 0.16; 'useless.': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'header:In-Reply- To:1': 0.22; 'runs': 0.23; 'cache': 0.24; 'guess': 0.25; 'module': 0.26; 'fact': 0.27; 'example': 0.28; 'affected': 0.28; 'hash': 0.30; '(the': 0.30; 'chris': 0.30; '---': 0.31; 'anyone': 0.31; 'version': 0.31; 'implementing': 0.32; "isn't": 0.32; 'it.': 0.33; 'header:User-Agent:1': 0.33; 'instead': 0.33; 'to:addr:python- list': 0.33; 'there': 0.33; 'points': 0.33; 'function.': 0.34; 'something': 0.35; 'query': 0.36; 'skip:" 10': 0.36; 'but': 0.37; 'received:org': 0.37; "there's": 0.37; 'using': 0.37; 'could': 0.37; 'stable': 0.38; 'received:192': 0.38; 'characters': 0.38; 'point': 0.39; '(with': 0.39; 'received:192.168.1': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'more': 0.61; 'projects': 0.62; 'special': 0.67; 'kept': 0.68; 'bitten': 0.84; 'preferred,': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=modelnine.org; s=modelnine1012; t=1326646273; bh=SE+9HPOzrQAiEw/HjNs02h8VFI/bKjozG+GSwTifNtA=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=GFDWOOomsgUFt3fP5Y+MjlDtd/YEpq00+CJIrHAgj88eL8dJ3ePhEwjmKC+4kv63R X9WJtlpEPZ8oV/ae5XRFXzxEP6Dtqd0blB3BqbQbAAYi1qEdx3pSlGxF4TOzl973j3 MM0/QMnsWsCCGGj4tmhXQS8QTgKVG4G/Wl1NXHaI= Date: Sun, 15 Jan 2012 17:51:12 +0100 From: Heiko Wundram User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120111 Thunderbird/10.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Hash stability References: <4f1107b7$0$29988$c3e8da3$5496439d@news.astraweb.com> <4F1205A7.70303@modelnine.org> <4F12BC8A.9040205@modelnine.org> <4F12F9D8.5080904@modelnine.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326646275 news.xs4all.nl 6897 [2001:888:2000:d::a6]:59424 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19012 Am 15.01.2012 17:13, schrieb Chris Angelico: > 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. Or even easier: overwrite the default caching module (called FileCache) with something that implements "sensible" caching, for example by using the complete URL (with special characters replaced) of the DTD as a cache index, instead of hash()ing it. ;-) There's "workarounds", I know - and I may be implementing one of them if the time comes. Again, my mail was only to point at the fact that there are (serious) projects out there relying on the "stableness" of hash(), and that these will get bitten when hash() is replaced. Which is not a bad thing if you ask me. ;-) -- --- Heiko.