1 |
Dnia July 17, 2020 8:10:25 AM UTC, Ulrich Mueller <ulm@g.o> napisał(a): |
2 |
>>>>>> On Fri, 17 Jul 2020, Michał Górny wrote: |
3 |
> |
4 |
>> --- a/lib/portage/util/_dyn_libs/PreservedLibsRegistry.py |
5 |
>> +++ b/lib/portage/util/_dyn_libs/PreservedLibsRegistry.py |
6 |
>> @@ -34,12 +34,9 @@ class PreservedLibsRegistry(object): |
7 |
>> |
8 |
>> _json_write_opts = { |
9 |
>> "ensure_ascii": False, |
10 |
>> - "indent": "\t", |
11 |
>> - "sort_keys": True |
12 |
>> + "indent": 4, |
13 |
> |
14 |
>This is assigning 4 now unconditionally, while it was "\t" before for |
15 |
>modern Python versions. Is this intentional? |
16 |
|
17 |
I'm sorry, this is my mistakd. I'll fix it when I get home. |
18 |
|
19 |
> |
20 |
>> + "sort_keys": True, |
21 |
> |
22 |
>Why the added comma? |
23 |
> |
24 |
>> } |
25 |
>> - if sys.hexversion < 0x30200F0: |
26 |
>> - # indent only supports int number of spaces |
27 |
>> - _json_write_opts["indent"] = 4 |
28 |
>> |
29 |
>> def __init__(self, root, filename): |
30 |
>> """ |
31 |
> |
32 |
> |
33 |
>> --- a/lib/portage/util/mtimedb.py |
34 |
>> +++ b/lib/portage/util/mtimedb.py |
35 |
>> @@ -29,12 +29,9 @@ class MtimeDB(dict): |
36 |
>> |
37 |
>> _json_write_opts = { |
38 |
>> "ensure_ascii": False, |
39 |
>> - "indent": "\t", |
40 |
>> + "indent": 4, |
41 |
> |
42 |
>Same here. |
43 |
> |
44 |
>> "sort_keys": True |
45 |
>> } |
46 |
>> - if sys.hexversion < 0x30200F0: |
47 |
>> - # indent only supports int number of spaces |
48 |
>> - _json_write_opts["indent"] = 4 |
49 |
>> |
50 |
>> def __init__(self, filename): |
51 |
>> dict.__init__(self) |
52 |
> |
53 |
>Ulrich |
54 |
|
55 |
|
56 |
-- |
57 |
Best regards, |
58 |
Michał Górny |