[Python-modules-team] Bug#883716: Please apply patch for reproducible output (ie: Alembic)

Thomas Goirand zigo at debian.org
Wed Dec 6 18:56:07 UTC 2017


Source: python-changelog
Version: 0.3.5-1
Severity: wishlist
Tags: patch

Dear Maintainer,

I noticed that Alembic produced a non-reproducible output of its changelog.
After investigation, I understood that the issue was in python-changelog,
which doesn't sort tags. The attached patch fixes the issue. Please apply
it and upload the package.

Cheers,

Thomas Goirand (zigo)
-------------- next part --------------
Description: Reproducible output
Author: Thomas Goirand <zigo at debian.org>
Forwarded: no
Last-Update: 2017-12-06

--- python-changelog-0.3.5.orig/changelog/changelog.py
+++ python-changelog-0.3.5/changelog/changelog.py
@@ -250,10 +250,10 @@ class ChangeLogDirective(EnvDirective, D
             tag_node = nodes.strong('',
                         " ".join("[%s]" % t for t
                             in
-                                [t1 for t1 in [section, cat]
+                                sorted([t1 for t1 in [section, cat]
                                     if t1 in rec['tags']] +
 
-                                list(rec['tags'].difference([section, cat]))
+                                list(rec['tags'].difference([section, cat])))
                         ) + " "
                     )
             para.children[0].insert(0, tag_node)


More information about the Python-modules-team mailing list