Skip to content

Commit

Permalink
fix #585: switch to tomli
Browse files Browse the repository at this point in the history
Merge pull request #586 from RonnyPfannschmidt/fix-585/switch-to-tomli
  • Loading branch information
RonnyPfannschmidt committed Jun 25, 2021
2 parents ece87b2 + 0b2b66f commit 3b5c099
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
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
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
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
@@ -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

0 comments on commit 3b5c099

Please sign in to comment.