ruamel.yaml is used by semiwrap update-yaml command specifically because it can read a YAML file and write it while retaining comments. Unfortunately, it's not pure python, and the creator decided to no longer publish wheels for the C portion starting with release 0.19. This is annoying for a bunch of reasons, so I'd like to move away from it.
Possibilities:
- Switch to some other configuration language
- I tried TOML and hated it
Find a pure python YAML library that can round-trip comments
strictyaml claims to do this, but it has its own weird quirks. Would need to look harder at it sometime
Alternatively, maybe we could just vibe-code a pure python implementation of the C library using the existing test suite as a starting point? (prior art: https://simonwillison.net/2025/Dec/15/porting-justhtml/)
ruamel.yaml has a pure python implementation, forking that so that it's used by default might be a way to go?
I've pinned to 0.18 for now, but once Python 3.15 comes out then we'll need to have figured something out.
ruamel.yaml is used by
semiwrap update-yamlcommand specifically because it can read a YAML file and write it while retaining comments. Unfortunately, it's not pure python, and the creator decided to no longer publish wheels for the C portion starting with release 0.19. This is annoying for a bunch of reasons, so I'd like to move away from it.Possibilities:
Find a pure python YAML library that can round-trip commentsstrictyaml claims to do this, but it has its own weird quirks. Would need to look harder at it sometimeAlternatively, maybe we could just vibe-code a pure python implementation of the C library using the existing test suite as a starting point? (prior art: https://simonwillison.net/2025/Dec/15/porting-justhtml/)ruamel.yamlhas a pure python implementation, forking that so that it's used by default might be a way to go?I've pinned to 0.18 for now, but once Python 3.15 comes out then we'll need to have figured something out.