Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #19010
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <modelnine@modelnine.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.017 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'python,': 0.01; 'developer.': 0.07; 'python': 0.08; '32-bit': 0.09; 'hits': 0.09; 'path.': 0.09; 'output': 0.10; ';-)': 0.12; 'developers,': 0.15; 'question.': 0.15; 'caching': 0.16; 'services)': 0.16; 'useless.': 0.16; 'workings': 0.16; 'wrote:': 0.16; "aren't": 0.21; 'file,': 0.21; 'appropriate': 0.22; 'wrote': 0.22; 'header:In-Reply-To:1': 0.22; 'runs': 0.23; '64-bit': 0.23; 'cache': 0.24; 'creating': 0.25; "wasn't": 0.25; 'guess': 0.25; "i'm": 0.27; 'affected': 0.28; 'around.': 0.28; 'interpret': 0.28; 'worked': 0.29; 'problem': 0.29; 'broke': 0.30; 'hash': 0.30; '(the': 0.30; '(as': 0.30; 'functional': 0.30; 'xml': 0.30; '---': 0.31; 'cases': 0.32; 'actually': 0.32; 'break': 0.32; "isn't": 0.32; 'header:User- Agent:1': 0.33; 'to:addr:python-list': 0.33; 'agree': 0.33; 'mostly': 0.34; 'all.': 0.34; 'moving': 0.35; 'file': 0.35; 'query': 0.36; 'entry': 0.37; 'machine': 0.37; 'but': 0.37; 'received:org': 0.37; "there's": 0.37; 'using': 0.37; 'getting': 0.37; 'stable': 0.38; 'received:192': 0.38; 'sometimes': 0.38; 'url:org': 0.39; 'except': 0.39; 'being': 0.39; 'plain': 0.39; 'received:192.168.1': 0.39; 'hit': 0.39; 'subject:: ': 0.39; 'did': 0.39; 'to:addr:python.org': 0.40; 'design': 0.61; 'more': 0.61; 'target': 0.62; 'due': 0.66; 'stated': 0.70; 'production': 0.71; 'mail:': 0.77; 'bite': 0.84; 'querying': 0.84; 'story:': 0.84; 'url:dtd': 0.85; 'migrating': 0.91; 'preferred,': 0.93; 'surprise': 0.97 |
| DKIM-Signature | v=1; a=rsa-sha256; c=simple/simple; d=modelnine.org; s=modelnine1012; t=1326643674; bh=dA6Ly/cAg0RZRm7Diy0Wo0jl9qRbSDdae69NhH4wtgw=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=W9UNhtEMpKuYHEisTzHHqJjUpGTVR1BFKrg7NDLakcNDJ+pSltYgQW5lII5b1yZ63 Ng1/kyuG3SX1tbZtZqaEBNb/fiuxMPowA/3/Xc7TNmZb2R3LzylAq0N6+Kz/rCSQjZ 6dIih5HQwjMroxPX7HZptU8WFgdvWoU4xjEoHyxs= |
| Date | Sun, 15 Jan 2012 17:07:52 +0100 |
| From | Heiko Wundram <modelnine@modelnine.org> |
| 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> <jeritr$4sb$1@dough.gmane.org> <4F1205A7.70303@modelnine.org> <jeu8t4$2kc$1@dough.gmane.org> <4F12BC8A.9040205@modelnine.org> <jeugdp$e1b$1@dough.gmane.org> |
| In-Reply-To | <jeugdp$e1b$1@dough.gmane.org> |
| 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 <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.4774.1326643677.27778.python-list@python.org> (permalink) |
| Lines | 40 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1326643677 news.xs4all.nl 6894 [2001:888:2000:d::a6]:46153 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:19010 |
Show key headers only | View raw
Am 15.01.2012 13:22, schrieb Peter Otten: > Heiko Wundram wrote: >> I agree completely with that (I hit the corresponding problem with suds >> while transitioning from 32-bit Python to 64-bit Python, where hashes >> aren't stable either), but as stated in my mail: that wasn't the >> original question. ;-) > > I'm curious: did you actually get false cache hits or just slower responses? It broke the application using suds, not due to false cache hits, but due to not getting a cache hit anymore at all. Long story: to interpret WSDL-files, suds has to get all related DTDs for the WSDL file, and Microsoft (as I wrote I was querying Exchange Web Services) insists on using http://www.w3.org/2001/xml.dtd for the XML spec path. This path is sometimes functional as a GET URL, but mostly not (due to overload of the W3-servers), so basically I worked around the problem by creating an appropriate cache entry with the appropriate name based on hash() using a local copy of xml.dtd I had around. This took place on a development machine (32-bit), and when migrating the application to a production machine (64-bit), the cache file wasn't used anymore (due to the hash not being stable). It's not that this came as a surprise (I quickly knew the "workaround" by simply rehashing on the target machine and moving the cache file appropriately), and I already said that this is mostly just a plain bad design decision on the part of the suds developers, but it's one of those cases where a non-stable hash() can break applications, and except if you know the internal workings of suds, this will seriously bite the developer. 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. -- --- Heiko.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Hash stability Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-01-14 04:42 +0000
Re: Hash stability Peter Otten <__peter__@web.de> - 2012-01-14 10:46 +0100
Re: Hash stability Heiko Wundram <modelnine@modelnine.org> - 2012-01-14 23:45 +0100
Re: Hash stability Chris Angelico <rosuav@gmail.com> - 2012-01-15 11:36 +1100
Re: Hash stability Bryan <bryanjugglercryptographer@yahoo.com> - 2012-01-15 04:03 -0800
Re: Hash stability Chris Angelico <rosuav@gmail.com> - 2012-01-15 23:21 +1100
Re: Hash stability Roy Smith <roy@panix.com> - 2012-01-14 21:26 -0500
Re: Hash stability Terry Reedy <tjreedy@udel.edu> - 2012-01-14 23:07 -0500
Re: Hash stability Stefan Behnel <stefan_ml@behnel.de> - 2012-01-15 11:13 +0100
Re: Hash stability Heiko Wundram <modelnine@modelnine.org> - 2012-01-15 12:46 +0100
Re: Hash stability Peter Otten <__peter__@web.de> - 2012-01-15 13:22 +0100
Re: Hash stability Heiko Wundram <modelnine@modelnine.org> - 2012-01-15 17:07 +0100
Re: Hash stability Chris Angelico <rosuav@gmail.com> - 2012-01-16 03:13 +1100
Re: Hash stability Heiko Wundram <modelnine@modelnine.org> - 2012-01-15 17:51 +0100
Re: Hash stability Stefan Behnel <stefan_ml@behnel.de> - 2012-01-15 18:20 +0100
Re: Hash stability Peter Otten <__peter__@web.de> - 2012-01-16 09:18 +0100
Re: Hash stability Christian Heimes <lists@cheimes.de> - 2012-01-16 09:44 +0100
Re: Hash stability Heiko Wundram <modelnine@modelnine.org> - 2012-01-16 10:15 +0100
csiph-web