Dnia July 17, 2020 8:10:25 AM UTC, Ulrich Mueller <u...@gentoo.org> napisał(a):
>>>>>> On Fri, 17 Jul 2020, Michał Górny wrote:
>
>> --- a/lib/portage/util/_dyn_libs/PreservedLibsRegistry.py
>> +++ b/lib/portage/util/_dyn_libs/PreservedLibsRegistry.py
>> @@ -34,12 +34,9 @@ class PreservedLibsRegistry(object):
>>  
>>      _json_write_opts = {
>>              "ensure_ascii": False,
>> -            "indent": "\t",
>> -            "sort_keys": True
>> +            "indent": 4,
>
>This is assigning 4 now unconditionally, while it was "\t" before for
>modern Python versions. Is this intentional?

I'm sorry, this is my mistakd. I'll fix it when I get home.

>
>> +            "sort_keys": True,
>
>Why the added comma?
>
>>      }
>> -    if sys.hexversion < 0x30200F0:
>> -            # indent only supports int number of spaces
>> -            _json_write_opts["indent"] = 4
>>  
>>      def __init__(self, root, filename):
>>              """
>
>
>> --- a/lib/portage/util/mtimedb.py
>> +++ b/lib/portage/util/mtimedb.py
>> @@ -29,12 +29,9 @@ class MtimeDB(dict):
>>  
>>      _json_write_opts = {
>>              "ensure_ascii": False,
>> -            "indent": "\t",
>> +            "indent": 4,
>
>Same here.
>
>>              "sort_keys": True
>>      }
>> -    if sys.hexversion < 0x30200F0:
>> -            # indent only supports int number of spaces
>> -            _json_write_opts["indent"] = 4
>>  
>>      def __init__(self, filename):
>>              dict.__init__(self)
>
>Ulrich


--
Best regards, 
Michał Górny

Reply via email to