From 2f2e3bcf35179c5799d43077f689b6211fdfb4bf Mon Sep 17 00:00:00 2001 From: Gavin Huttley Date: Tue, 8 Oct 2024 09:43:51 +1100 Subject: [PATCH 1/2] BUG: address failure on python 3.13, fixes #21 [CHANGED] hookup 3.13 in github actions --- .github/workflows/testing_develop.yml | 2 +- noxfile.py | 2 +- src/scitrack/__init__.py | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/testing_develop.yml b/.github/workflows/testing_develop.yml index 0aeb22b..2edf6ff 100644 --- a/.github/workflows/testing_develop.yml +++ b/.github/workflows/testing_develop.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: "actions/checkout@v4" diff --git a/noxfile.py b/noxfile.py index 76cbfae..e19f2cc 100644 --- a/noxfile.py +++ b/noxfile.py @@ -1,7 +1,7 @@ import nox -@nox.session(python=[f"3.{v}" for v in range(9, 13)]) +@nox.session(python=[f"3.{v}" for v in range(9, 14)]) def test(session): session.install(".[test]") session.chdir("tests") diff --git a/src/scitrack/__init__.py b/src/scitrack/__init__.py index 9d5244f..0d8b124 100644 --- a/src/scitrack/__init__.py +++ b/src/scitrack/__init__.py @@ -194,11 +194,12 @@ def log_args(self, args=None): parent = inspect.currentframe().f_back args = inspect.getargvalues(parent).locals - for k in list(args): - if type(args[k]) == self.__class__ or type(args[k]).__name__ == "module": - del args[k] - - self.log_message(str(args), label="params") + result = { + k: args[k] + for k in list(args) + if type(args[k]) != self.__class__ and type(args[k]).__name__ != "module" + } + self.log_message(str(result), label="params") def shutdown(self): """safely shutdown the logger""" From 2b4ad518a169bacc3672db791d72a5578b9013cc Mon Sep 17 00:00:00 2001 From: Gavin Huttley Date: Tue, 8 Oct 2024 09:45:20 +1100 Subject: [PATCH 2/2] DEV: revert 3.13, github actions does not yet support --- .github/workflows/testing_develop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing_develop.yml b/.github/workflows/testing_develop.yml index 2edf6ff..0aeb22b 100644 --- a/.github/workflows/testing_develop.yml +++ b/.github/workflows/testing_develop.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: "actions/checkout@v4"