Skip to content

Commit

Permalink
Update gh action and dependencies for Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfokkema committed Feb 27, 2024
1 parent 97b81e7 commit 56a5536
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-and-upload-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- run: python -m pip install briefcase==0.3.14
python-version: "3.11"
- run: python -m pip install briefcase==0.3.17
- run: briefcase create
- run: python -m pip install tomli
- run: python pruner.py
- run: briefcase build
- run: briefcase package
Expand Down
5 changes: 2 additions & 3 deletions pruner.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import os
import shutil
import sys
import tomllib
from glob import glob
from pathlib import Path

import tomli


def prune(base_dir, exclude, include):
excludes = set()
Expand Down Expand Up @@ -34,7 +33,7 @@ def prune(base_dir, exclude, include):

def main():
with open("pyproject.toml", "rb") as f:
config = tomli.load(f)
config = tomllib.load(f)
pruner_config = config["tool"]["pruner"][sys.platform]
prune(pruner_config["base_dir"], pruner_config["exclude"], pruner_config["include"])

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ test_sources = ["tests"]
requires = [
'std-nslog',
'appdirs>=1.4.4,<2.0.0',
'tomli>=2.0.1,<3.0.0',
'tomli_w>=1.0.0,<2.0.0',
'numpy>=1.22.1,<2.0.0',
'pandas>=2.0.0,<3.0.0',
Expand Down
6 changes: 3 additions & 3 deletions src/tailor/config.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import importlib.metadata
import pathlib
import tomllib

import appdirs
import tomli
import tomli_w

metadata = importlib.metadata.metadata("tailor")
Expand All @@ -16,8 +16,8 @@ def read_config():
if config_path.is_file():
try:
with open(config_path, "rb") as f:
return tomli.load(f)
except (tomli.TOMLDecodeError, UnicodeDecodeError):
return tomllib.load(f)
except (tomllib.TOMLDecodeError, UnicodeDecodeError):
# error parsing TOML
return {}
else:
Expand Down

0 comments on commit 56a5536

Please sign in to comment.