[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures
josch
report at bugs.python.org
Mon Oct 13 09:15:23 CEST 2014
josch added the comment:
Thank you for your quick reply.
Yes, as I wrote above there are ways around it by creating a stable in-memory representation and comparing that to a stable in-memory representation of the expected output. Since both input are several hundred megabytes in size, this would be CPU intensive but do-able. I would've just likeld to avoid treating this output in a special way because I also compare other files and it is most easy to just md5sum all of the files in one fell swoop.
I started using PYTHONHASHSEED to gain stable output for a certain platform/version combination. When I uploaded my package to Debian and it was built on 13 different architectures I noticed the descrepancy when the same version but different platforms are involved.
>From my perspective it would be nice to just be able to set PYTHONHASH32BIT (or whatever) and call it a day. But of course it is your choice whether you would allow such a "hack" or not.
Would your decision be more favorable if you received a patch implementing this feature?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22621>
_______________________________________
More information about the Python-bugs-list
mailing list