Drop toml dependency
#43
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
While the TOML spec is alive and well, the
tomlpackage that was used in this project is dead (uiri/toml#267).There are several alternatives:
rtomlis the fastest, but does not provide "round trip" guarantees (meaning that it can't load, then dump, and get an identical result). However, for simple loading and parsing it's fine. It also requires a Rust environment to compile from source, which may be a consideration on distributions like Alpine Linux.tomliis another alternative, but it is read-only (writing requires a separatetomli-wpackage), and requires files to be opened in binary mode to parse TOML.tomlkitis used by Poetry (and is written by the original author of Poetry), but is currently 70x slower thanrtoml.This PR will remove
tomlfrom thefastapiPoetry extras group, and make the necessary source code changes.Rather than installing an alternative TOML package, the TOML logic will simply be removed from inboard, because the TOML parsing and settings loading was somewhat tangential to the focus of the project. A separate project, fastenv, is more focused on settings management, and may feature TOML support in the future.
Note that
tomlis still a sub-dependency of somedev-dependencies, including pre-commit and pytest.Changes
tomldependency (619f63c)Related
uiri/toml#267
uiri/toml#279 (comment)