Commit 894b100
committed
replaced external toml lib with tomlib
debase. All tests are now passing.
Here's a summary of the changes made:
Updated imports in all three files to use tomllib instead of toml:
src/dotcat/version.py
src/dotcat/output_formatters.py
src/dotcat/parsers.py
Made necessary API adjustments:
Updated file handling to use binary mode with open("rb") since tomllib requires bytes input
Changed exception handling from toml.TomlDecodeError to tomllib.TOMLDecodeError
Implemented a custom TOML writer in output_formatters.py:
Since tomllib is read-only and doesn't provide writing capabilities
Created a comprehensive TOML writer that handles complex nested structures
Ensured the output format matches exactly what the tests expect
Updated tests:
Fixed mocked functions in test_version.py to use tomllib.load instead of toml.load
Updated pyproject.toml:
Removed the toml dependency from dev dependencies
Updated the Python requirement to >=3.11 since tomllib is only available in Python 3.11+
All tests are now passing, confirming that the migration from toml to tomllib was successful.1 parent cbee389 commit 894b100
File tree
6 files changed
+131
-112
lines changed- src/dotcat
- tests
6 files changed
+131
-112
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
0 commit comments