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

swap toml with tomli #354

Merged
merged 13 commits into from Jul 7, 2021
6 changes: 0 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -67,9 +67,6 @@ jobs:
- name: Windows
runs-on: windows-latest
python:
- name: CPython 2.7
tox: py27
action: 2.7
- name: CPython 3.5
tox: py35
action: 3.5
Expand All @@ -85,9 +82,6 @@ jobs:
- name: CPython 3.9
tox: py39
action: 3.9
- name: PyPy 2.7
tox: pypy27
action: pypy-2.7
- name: PyPy 3.6
tox: pypy36
action: pypy-3.6
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Expand Up @@ -29,8 +29,7 @@
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
Expand All @@ -41,8 +40,9 @@
"Programming Language :: Python :: Implementation :: PyPy",
],
use_incremental=True,
install_requires=["click", "click-default-group", "incremental", "jinja2", "setuptools", "toml"],
install_requires=["click", "click-default-group", "incremental", "jinja2", "setuptools", "tomli"],
extras_require={"dev": ["packaging"]},
requires_python=">=3.5",
graingert marked this conversation as resolved.
Show resolved Hide resolved
package_dir={"": "src"},
packages=find_packages("src"),
license="MIT",
Expand Down
6 changes: 3 additions & 3 deletions src/towncrier/_settings.py
Expand Up @@ -3,7 +3,7 @@

import os
import pkg_resources
import toml
import tomli

from collections import OrderedDict

Expand Down Expand Up @@ -69,8 +69,8 @@ def load_config(directory):

def load_config_from_file(directory, config_file):

with open(config_file, "r") as conffile:
config = toml.load(conffile)
with open(config_file, "r", encoding="utf8") as conffile:
graingert marked this conversation as resolved.
Show resolved Hide resolved
config = tomli.load(conffile)

return parse_toml(directory, config)

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
@@ -1,5 +1,5 @@
[tox]
envlist = cov-erase, flake8, {pypy27,pypy36,pypy37,py27,py35,py36,py37,py38,py39}-{tests,flake8,check-manifest,check-newsfragment}, cov-report
envlist = cov-erase, flake8, {pypy36,pypy37,py35,py36,py37,py38,py39}-{tests,flake8,check-manifest,check-newsfragment}, cov-report
isolated_build=true
skip_missing_envs = true

Expand Down