Skip to content

Vendor copy of tomli-w 1.2.0, use it to implement dump_toml function in easybuild.tools.filetools#5071

Merged
boegel merged 9 commits intoeasybuilders:developfrom
Flamefire:toml-writer
Dec 13, 2025
Merged

Vendor copy of tomli-w 1.2.0, use it to implement dump_toml function in easybuild.tools.filetools#5071
boegel merged 9 commits intoeasybuilders:developfrom
Flamefire:toml-writer

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

As tomllib can only read TOML files we need a writer too.

I decided for tomli-w as it is basically a single file

@Flamefire Flamefire marked this pull request as draft December 11, 2025 10:04
@Flamefire Flamefire marked this pull request as ready for review December 12, 2025 07:47
Trigger more code paths of the TOML parser and writer to ensure it
works reliably.
Comment thread easybuild/tools/__init__.py Outdated
from easybuild.tools.loose_version import LooseVersion # noqa(F401)


def dump_toml(o: dict) -> str:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to easybuild.tools.filetools, I strongly prefer keeping easybuild.tools largely empty as it is now

Comment thread easybuild/tools/_toml_writer/README.md Outdated
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@boegel boegel merged commit 709ff38 into easybuilders:develop Dec 13, 2025
40 checks passed
@boegel boegel changed the title Vendor copy of tomli-w 1.2.0 Vendor copy of tomli-w 1.2.0, use it to implement dump_toml function in easybuild.tools.filetools Dec 13, 2025
@Flamefire Flamefire deleted the toml-writer branch December 13, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants