-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the modern tomli/tomllib to parse TOML files
Replace the unmaintained `toml` package with the modern combination of built-in `tomllib` in Python 3.11+, and its drop-in replacement `tomli` for older Python versions. This provides full and correct support for TOML 1.0 that `toml` does not provide. Unfortunately, they do not support overriding dict class but that does not seem to be a major problem, given that TOML tables are not ordered according to the specification.
- Loading branch information
Showing
4 changed files
with
19 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
requirements = [ | ||
"packaging", | ||
"toml", | ||
"tomli; python_version < '3.11'", | ||
] | ||
|
||
setup( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ pyyaml | |
pytest | ||
pytest-cov | ||
codecov | ||
toml | ||
tomli; python_version < "3.11" | ||
packaging |