[PATCH] D93115: LNT: Sort testsuites ascendingly

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 07:00:46 PST 2020


thopre requested changes to this revision.
thopre added inline comments.
This revision now requires changes to proceed.


================
Comment at: lnt/server/db/v4db.py:59
+        # Order testuites alphabetically to get groupings
+        self.testsuite = dict (sorted (self.testsuite.items()))
 
----------------
thopre wrote:
> tnfchris wrote:
> > thopre wrote:
> > > Shouldn't you use an OrderedDict instead of dict to guarantee the ordering will be the same as when inserted?
> > From what I understand, in Python 3, dict is guaranteed to keep order during insertion https://mail.python.org/pipermail/python-dev/2017-December/151283.html
> Ah yes indeed, https://docs.python.org/3/library/stdtypes.html#dict has:
> 
> 
> > Changed in version 3.7: Dictionary order is guaranteed to be insertion order. This behavior was an implementation detail of CPython from 3.6.
> 
> 
Wait, we currently only require Python 3.6 or later because that's what lots of distribution provide. Could you make it use OrderedDict instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93115/new/

https://reviews.llvm.org/D93115



More information about the llvm-commits mailing list