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

fix #585: switch to tomli #586

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ In progress
===========

* fix #524: new parameters ``normalize`` and ``version_cls`` to customize the version normalization class.
* fix #585: switch from toml to tomli

v6.0.1
=======
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ setuptools_scm.version_scheme =

[options.extras_require]
toml =
toml
tomli~=1.0.0
3 changes: 2 additions & 1 deletion src/setuptools_scm/integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ def find_files(path=""):
def _args_from_toml(name="pyproject.toml"):
# todo: more sensible config initialization
# move this helper back to config and unify it with the code from get_config
import tomli

with open(name) as strm:
defn = __import__("toml").load(strm)
defn = tomli.load(strm)
return defn.get("tool", {})["setuptools_scm"]


Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py{27,34,35,36,37,38,39}-test,flake8,check_readme,check-dist,py{27,37}-selfcheck,docs
envlist=py{36,37,38,39,310}-test,flake8,check_readme,check-dist,py{37}-selfcheck,docs

[pytest]
testpaths=testing
Expand Down Expand Up @@ -30,7 +30,6 @@ skip_install=
deps=
pytest
setuptools >= 42
toml
commands=
test: pytest []
selfcheck: python setup.py --version
Expand Down