# HG changeset patch # User Julien Cristau # Date 1459263419 -7200 # Node ID 6b0807ba056a4af86f8b9539dca70ddfbec2aa97 # Parent 0f8301ea653b153a6e727896fd89c33f7649d49e [devtools] fix sorting in ExecutionPlan._check_permissions on python3 Sort lists instead of dict_items objects to get predictable results. With this change, unittest_querier.UtilsTC.test_preprocess_security passes every time instead of once in a blue moon. Closes #11759133. diff -r 0f8301ea653b -r 6b0807ba056a cubicweb/devtools/repotest.py --- a/cubicweb/devtools/repotest.py Mon Mar 21 13:55:29 2016 +0100 +++ b/cubicweb/devtools/repotest.py Tue Mar 29 16:56:59 2016 +0200 @@ -325,7 +325,7 @@ def _check_permissions(*args, **kwargs): res, restricted = _orig_check_permissions(*args, **kwargs) - res = DumbOrderedDict(sorted(res.items(), key=lambda x: [y.items() for y in x[1]])) + res = DumbOrderedDict(sorted(res.items(), key=lambda x: [list(y.items()) for y in x[1]])) return res, restricted def _dummy_check_permissions(self, rqlst):