Skip to content

Commit

Permalink
chore(python): Add support for python 3.13 (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab authored Nov 29, 2024
1 parent b4f4d94 commit 7545209
Show file tree
Hide file tree
Showing 7 changed files with 1,445 additions and 1,372 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
# - "3.13"
- "3.13"
os:
- "ubuntu"
- "macos"
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_stages:
- commit
- pre-commit

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
2,793 changes: 1,433 additions & 1,360 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/makim/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def _run_command(self, args: dict[str, Any]) -> None:
env, variables = self._load_scoped_data('task')
self.env_scoped = deepcopy(env)

args_input = {'file': self.file}
args_input: dict[str, str | bool | float | int] = {'file': self.file}
for k, v in self.task_data.get('args', {}).items():
if not isinstance(v, dict):
raise Exception('`args` attribute should be a dictionary.')
Expand Down
10 changes: 5 additions & 5 deletions tests/smoke/.makim-sugar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ groups:
help: build necessary docker image
run: |
pwd
sugar pull --all
sugar build --all
sugar ext restart --all --options -d
sugar compose pull --all
sugar compose build --all
sugar compose-ext restart --all --options "-d"
run:
help: test running a docker service using containers-sugar
hooks:
pre-run:
- task: containers.setup
backend: bash
run: |
sugar exec --service service1 --options -T --cmd python -c "print(1)"
sugar stop --all
sugar compose exec --service service1 --options "-T" --cmd "python -c 'print(1)'"
sugar compose stop --all
6 changes: 3 additions & 3 deletions tests/smoke/.sugar.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
compose-app: docker-compose
backend: compose
env-file: .env
services:
project-name: makim-tests
compose-path: containers/compose.yaml
env-file: .env
config-path: containers/compose.yaml
default: service1
available:
- name: service1
2 changes: 1 addition & 1 deletion tests/test_failure.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ def test_failure(task, args, error_code):
os._exit = sys.exit
with pytest.raises(SystemExit) as pytest_wrapped_e:
m.run(args)
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.type is SystemExit
assert pytest_wrapped_e.value.code == error_code

0 comments on commit 7545209

Please sign in to comment.