-
Notifications
You must be signed in to change notification settings - Fork 196
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
toml
Python package v0.10.0 is buggy; need v0.10.2
#990
Comments
Let's just move to tomli instead of adding another hacks. The current toml library seems to be of really bad quality (see gramineproject/gsc#101). |
Ok, I will create a PR to move to |
This was referenced Oct 20, 2022
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the problem
While testing #671, I encountered this bug.
#671 introduces a rather complex format for IOCTL data structures. Example from
device_ioctl.manifest.template
from #671:Gramine uses the
toml
Python package, including for manifest.template rendering:gramine/python/gramine-manifest
Line 29 in db86ad2
gramine/python/graminelibos/manifest.py
Line 84 in db86ad2
The
toml
Python package on Ubuntu 20.04 is taken fromapt install
:gramine/.ci/ubuntu20.04.dockerfile
Line 67 in db86ad2
On Ubuntu 18.04, it is taken from
pip3 install
:gramine/.ci/ubuntu18.04.dockerfile
Line 89 in db86ad2
So on Ubuntu 18.04, we get v0.10.2. But on Ubuntu 20.04, we get v0.10.0.
Unfortunately, v0.10.0 had a bug that directly affects my TOML snippet above: "Parsing fails on inline array of tables containing a nested table". This bug was fixed in v0.10.2 though.
So on Ubuntu 20.04, if the
toml
Python package is installed asapt install python3-toml
(from Ubuntu repos), then such TOML manifests fail.Proposed solutions:
tomli
.toml
Python package v0.10.2. For this:pip3 install toml
.python3-toml
package with v0.10.2 -- this can be taken from e.g. Ubuntu 22.04.@dimakuv and @woju are fine with solution 2, at least in the short-term. But we should discuss it during the Gramine meeting.
Steps to reproduce
Try #671 on Ubuntu 20.04 with
toml
Python package installed viaapt install python3-toml
.Expected results
device_ioctl.manifest.template
from #671 is rendered correctly bytoml
Python package.Actual results
This is what I observed in #671 in Ubuntu 20.04 Jenkins jobs:
Gramine commit hash
d3b65ab (in #671)
The text was updated successfully, but these errors were encountered: