Skip to content
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

Switch to tomli/tomllib for parsing TOML #123

Merged
merged 3 commits into from
Sep 22, 2022

Conversation

mkniewallner
Copy link
Collaborator

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Replace the library used for parsing pyproject.toml by tomli on Python < 3.11 and tomllib on Python 3.11+.

tomli provides the same API as tomllib, which will be included in Python 3.11, so it is more future-proof.
Besides, toml is mostly unmaintained.

@mkniewallner mkniewallner marked this pull request as ready for review September 21, 2022 23:02
@fpgmaas
Copy link
Owner

fpgmaas commented Sep 22, 2022

Thanks for your contribution, much appreciated! This makes a lot of sense.

@codecov-commenter
Copy link

Codecov Report

Merging #123 (775156a) into main (44ea3d6) will increase coverage by 0.0%.
The diff coverage is 100.0%.

@@          Coverage Diff          @@
##            main    #123   +/-   ##
=====================================
  Coverage   94.9%   95.0%           
=====================================
  Files         31      32    +1     
  Lines       1257    1260    +3     
=====================================
+ Hits        1194    1197    +3     
  Misses        63      63           
Impacted Files Coverage Δ
tests/test_utils.py 100.0% <100.0%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@fpgmaas fpgmaas merged commit abf4874 into fpgmaas:main Sep 22, 2022
@mkniewallner mkniewallner deleted the switch-to-tomli branch September 22, 2022 06:33
fpgmaas pushed a commit that referenced this pull request Oct 2, 2022
* refactor(utils): make `pyproject.toml` path dynamic
* test(utils): add test for `load_pyproject_toml`
* feat: replace `toml` with `tomli`/`tomllib`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants