[Python-modules-team] Bug#942342: traitlets: please make the output reproducible

Chris Lamb lamby at debian.org
Mon Oct 14 22:48:10 BST 2019


Chris Lamb wrote:

> Patch attached.

Let's try that again:

    --- a/traitlets/traitlets.py
    +++ b/traitlets/traitlets.py
    @@ -2366,6 +2366,10 @@ class Set(List):
	     """
	     super(Set, self).__init__(trait, default_value, minlen, maxlen, **kwargs)
     
    +    def make_dynamic_default(self):
    +        # Ensure default value is sorted for a reproducible build
    +        return sorted(super(Set, self).make_dynamic_default())
    +
     
     class Tuple(Container):
	 """An instance of a Python tuple."""


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-



More information about the Python-modules-team mailing list