Skip to content

Commit 80ecb03

Browse files
committed
Use tomli rather than toml
The toml library has been unmaintained for years and is no longer packaged by some distributions.
1 parent 3ebe8a9 commit 80ecb03

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/scc-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
python-version: '3.13'
2424

2525
- name: Install dependencies
26-
run: pip install build setuptools ioctl-opt libusb1 toml vdf pytest
26+
run: pip install build setuptools ioctl-opt libusb1 tomli vdf pytest
2727

2828
- name: Build SCC
2929
run: python -m build

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ RUN <<EOR
4343
python -m build --wheel
4444
python -m venv .env
4545
. .env/bin/activate
46-
pip install libusb1 pytest toml vdf
46+
pip install libusb1 pytest tomli vdf
4747
python -m pytest tests
4848
pip install --prefix "${TARGET}/usr" --no-warn-script-location dist/*.whl
4949

tests/test_setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import pkgutil
22

3-
import toml
3+
import tomli
44

55
import scc
66

@@ -19,7 +19,8 @@ def test_packages(self):
1919
pass
2020

2121
# Load the packages from pyproject.toml
22-
pyproject = toml.load("pyproject.toml")
22+
with open("pyproject.toml", "rb") as file:
23+
pyproject = tomli.load(file)
2324
packages = pyproject["tool"]["setuptools"]["packages"]
2425

2526
for importer, modname, ispkg in pkgutil.walk_packages(path=scc.__path__, prefix="scc.", onerror=lambda x: None):

0 commit comments

Comments
 (0)