[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-13 Thread Raymond Hettinger
Raymond Hettinger added the comment: > some libraries I use rely on the order of items in Python dictionaries for > their output Your choices are: * create a custom hash function using __hash__ * or sort the output from within Python * or sort the output externally, prior to diffing. > From m

[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-13 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-13 Thread Ethan Furman
Ethan Furman added the comment: Like Georg I am sympathetic to the problem, but this is not the correct solution. You might post a question on python-list to see if a usable, not-to-painful solution can be found. -- nosy: +ethan.furman status: pending -> open

[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-13 Thread Georg Brandl
Georg Brandl added the comment: > Would your decision be more favorable if you received a patch implementing > this feature? I'll keep this on "pending" for other devs to weigh in with opinions. In general, we are not keen on keeping text representations stable, as they do not form part of th

[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-13 Thread josch
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 wo

[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-12 Thread Georg Brandl
Georg Brandl added the comment: While I can feel your pain regarding the use case you describe, I don't think this has enough general value to add to CPython. It is not really related to PYTHONHASHSEED, since we never made guarantees about hash values being stable across platforms and Python

[issue22621] Please make it possible to make the output of hash() equal between 32 and 64 bit architectures

2014-10-12 Thread josch
New submission from josch: I recently realized that the output of the following is different between 32 bit and 64 bit architectures: PYTHONHASHSEED=0 python3 -c 'print(hash("a"))' In my case, I'm running some test cases which involve calling a Python module which creates several hundred mega