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 library to tomli + tomli-w #106

Merged
merged 1 commit into from
Nov 27, 2022
Merged

Conversation

dimakuv
Copy link

@dimakuv dimakuv commented Oct 20, 2022

Description of the changes

toml Python library (for parsing and dumping TOML files) is buggy and doesn't support the full spec of TOML 1.0.0. This commit replaces it with more robust tomli (for parsing) and tomli-w (for dumping).

Note that GSC supports both newer versions of Gramine (that also use tomli) and older versions of Gramine (that use toml).

This PR is a counterpart to gramineproject/gramine#995, but is independent from it: GSC can work with new and old Gramine anyway.

How to test this PR?

Try e.g. Python example. Both Branch: "v1.3.1" and Branch: "dimakuv/python-tomli" (from gramineproject/gramine#995) in config.yaml should work.


This change is Reviewable

mkow
mkow previously approved these changes Nov 26, 2022
Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dimakuv)


-- commits line 2 at r1:

Suggestion:

`toml` library to `tomli` + `tomli-w`

`toml` Python library (for parsing and generating TOML files) is buggy
and doesn't support the full spec of TOML 1.0.0. This commit replaces it
with more robust `tomli` (for parsing) and `tomli-w` (for generating).

Note that GSC supports both newer versions of Gramine (that also use
`tomli`) and older versions of Gramine (that use `toml`).

Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
Copy link
Author

@dimakuv dimakuv left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion, not enough approvals from maintainers (1 more required), not enough approvals from different teams (1 more required, approved so far: Intel) (waiting on @mkow)


-- commits line 2 at r1:
Done. Also changed dumping -> generating, similar to other PR (in core Gramine)

Copy link
Member

@mkow mkow left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@mkow mkow merged commit dbc17b6 into master Nov 27, 2022
@mkow mkow deleted the dimakuv/python-tomli branch November 27, 2022 16:36
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 this pull request may close these issues.

2 participants