1. 09 Jan, 2024 27 commits
  2. 08 Jan, 2024 5 commits
  3. 05 Jan, 2024 8 commits
    • Kirill Smelkov's avatar
      format-json, test: Don't force ASCII · cd75648d
      Kirill Smelkov authored
      Currently, due to ensure_ascii=True default of json.dumps, we are
      insisting on our JSON schemas to be ascii-only and all other characters
      to be represented by \uxxxx escapes. So far this was not problematic as
      all our schemas contains only ASCII characters, but upcoming
      ors-amarisoft changes want to use e.g. "→" symbol:
      
          https://lab.nexedi.com/kirr/slapos/blob/b51f5523/software/ors-amarisoft/software.cfg.json#L15
      
      which currently results in failure of json-schema test:
      
          FAIL: test_ors-amarisoft_software_cfg_json_format (slapos.test.test_json_schema.TestJSONSchemaValidation)
          ...
      
          First differing element 14:
          '      "title": "\\u2192  eNB/gNB | Radio Unit",'
          '      "title": "→  eNB/gNB | Radio Unit",'
      
      And in general, in 2023 I think there is no reason to insist on our schemas to
      be ASCII-only: say if one wants to describe something about "α" parameter. It
      would be good to use that α character directly and seeing it in the editor,
      instead of using escapes all the time.
      
      As indicated by below stackoverflow answer "JSON spec requires UTF-8 support by
      decoders": https://stackoverflow.com/a/594881/9456786 , and indeed checking
      JSON specification also confirms that by default JSON decoders shall use UTF-8:
      
          https://datatracker.ietf.org/doc/html/rfc7159#section-8.1
      
      This way, I think, we can switch to UTF-8 safely.
      
      /reviewed-by @jerome, @lu.xu
      /reviewed-on nexedi/slapos!1498
      cd75648d
    • Kirill Smelkov's avatar
      . · e41706c1
      Kirill Smelkov authored
      e41706c1
    • Kirill Smelkov's avatar
      . · 9cc9eab0
      Kirill Smelkov authored
      9cc9eab0
    • Kirill Smelkov's avatar
      . · 6a19e79d
      Kirill Smelkov authored
      6a19e79d
    • Kirill Smelkov's avatar
      . · 82d45f8f
      Kirill Smelkov authored
      82d45f8f
    • Kirill Smelkov's avatar
      . · 4922b16d
      Kirill Smelkov authored
      4922b16d
    • Kirill Smelkov's avatar
      . · 1448e6ad
      Kirill Smelkov authored
      1448e6ad
    • Kirill Smelkov's avatar
      . · 59671464
      Kirill Smelkov authored
      59671464