-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replace toml with tomllib #10
base: main
Are you sure you want to change the base?
Conversation
The Python 3.11 standard library provides tomllib for parsing TOML files. As even Debian stable ships Python 3.11, we should be fine with using it instead of the third-party toml dependency.
{ name = "host_cryptogram", type = "[u8; 8]" } | ||
{ name = "host_cryptogram", type = "[u8; 8]" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait does that mean that the previous toml libraries accepted invalid input?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least the generated file did not change. I haven’t looked into the details yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don’t see a good reason why toml
would have accepted that. But it also looks like the package is not maintained anymore. So if we ever need toml support before Python 3.11 in the future, we should prefer tomli
over toml
.
Nevermind, Ubuntu 22.04 LTS is still on 3.10. :( |
Debian 12 has python 3.11: https://packages.debian.org/bookworm/python3.11 |
Sorry, I don’t get it. Isn’t that what I wrote above? |
This means we could use a debian-based image no? |
For pynitrokey, we always try to support the latest Ubuntu LTS. Arguably, this is mostly relevant for end-user applications, but for me it is easier to only keep track of one minimum Python version for all projects. But if you’d like to migrate |
The next ubuntu LTS is 2 weeks away so I would just keep this as draft and keep a reminder to update then |
The Python 3.11 standard library provides tomllib for parsing TOML files. As even Debian stable ships Python 3.11, we should be fine with using it instead of the third-party toml dependency.