robotpy / robotpy/semiwrap

Move away from ruamel.yaml and pyyaml somehow

Open
#310 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7
Forks
3
Avg merge
18h 33m
Merged PRs (30d)
7

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the semiwrap update-yaml command and inspect how ruamel.yaml currently reads and writes configuration. Review the existing test suite as the starting point for evaluating alternatives. Done means the command can replace the pinned dependency while retaining YAML comments and supporting the project’s stated Python-version needs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.