Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move from toml Python module to tomli #968

Closed
dimakuv opened this issue Oct 11, 2022 · 2 comments · Fixed by #995
Closed

Move from toml Python module to tomli #968

dimakuv opened this issue Oct 11, 2022 · 2 comments · Fixed by #995
Assignees

Comments

@dimakuv
Copy link

dimakuv commented Oct 11, 2022

Description of the feature

Gramine and GSC use the toml Python package to parse and save TOML files.

This package is unfortunately buggy. One particularly nasty bug that GSC hit: gramineproject/gsc#101. This corresponds to this bug in the TOML repo: uiri/toml#404.

So Gramine and GSC should move to the tomli package (https://pypi.org/project/tomli/ and https://github.com/hukkin/tomli). It is newer, with better code quality, and seems to become a standard codebase for TOML parsing in Python:

A version of Tomli, the new tomllib module, will be added to the standard library in Python 3.11 via PEP 680. Tomli continues to provide a backport on PyPI for Python versions where the standard library module is not available and that have not yet reached their end-of-life.

(See https://github.com/hukkin/tomli#intro)

Why Gramine should implement it?

Because the old toml Python package is buggy. For example, we have to introduce this work around: gramineproject/gsc#101

@dimakuv
Copy link
Author

dimakuv commented Oct 20, 2022

Another bug in toml package: #990

@dimakuv dimakuv self-assigned this Oct 20, 2022
@dimakuv
Copy link
Author

dimakuv commented Oct 20, 2022

I will work on moving to tomli Python package. As soon as this migration is done, I should:

  1. Revert Work around TOML Python parser bug of parsing \x gsc#101 and check it still works.
  2. Check that bug toml Python package v0.10.0 is buggy; need v0.10.2 #990 disappears and [LibOS,PAL] Add flexible device-specific IOCTL support #671 works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant