[Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Christian Heimes
Hi, the buildbots are flaky because two repr() tests for userdict and functools.partial fail every now and then. The test cases depend on a fixed order of keyword arguments the representation of userdict and partial instances. The improved hash randomization of PEP 456 shows its power. I haven't s

Re: [Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Christian Heimes
Am 21.11.2013 18:57, schrieb Tim Peters: > Best to change the failing tests. For example, _they_ can sort the > dict keys if they rely on a fixed order. Sorting in general is a > dubious idea because it can be a major expense with no real benefit > for most uses. I don't consider repr() as a per

Re: [Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Tim Peters
[Christian Heimes] > the buildbots are flaky because two repr() tests for userdict and > functools.partial fail every now and then. The test cases depend on a > fixed order of keyword arguments the representation of userdict and > partial instances. The improved hash randomization of PEP 456 shows

Re: [Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Daniel Holth
+1 on unsorted repr(). It makes it obvious that the collection is not sorted. On Thu, Nov 21, 2013 at 1:10 PM, Christian Heimes wrote: > Am 21.11.2013 18:57, schrieb Tim Peters: >> Best to change the failing tests. For example, _they_ can sort the >> dict keys if they rely on a fixed order. Sor

Re: [Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Guido van Rossum
Correct. On Nov 21, 2013 10:15 AM, "Daniel Holth" wrote: > +1 on unsorted repr(). It makes it obvious that the collection is not > sorted. > > On Thu, Nov 21, 2013 at 1:10 PM, Christian Heimes > wrote: > > Am 21.11.2013 18:57, schrieb Tim Peters: > >> Best to change the failing tests. For examp

Re: [Python-Dev] flaky tests caused by repr() sort order

2013-11-21 Thread Nick Coghlan
On 22 Nov 2013 04:12, "Christian Heimes" wrote: > > Am 21.11.2013 18:57, schrieb Tim Peters: > > Best to change the failing tests. For example, _they_ can sort the > > dict keys if they rely on a fixed order. Sorting in general is a > > dubious idea because it can be a major expense with no real