>>>>> 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?

> +             "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

Attachment: signature.asc
Description: PGP signature

Reply via email to