From b349be01e65025c1dba42e80910d3109b0f5f521 Mon Sep 17 00:00:00 2001 From: Marcel R Date: Mon, 4 Sep 2023 17:33:05 +0200 Subject: [PATCH] Fix deprecated import. --- .github/workflows/lint_and_test.yml | 15 ++++++++------- cmsml/util.py | 2 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index fd11367..8b5f6cd 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -22,15 +22,16 @@ jobs: test: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: versions: # scan python versions - - {tag: "3.6", tf: ""} - - {tag: "3.7", tf: ""} - - {tag: "3.8", tf: ""} - - {tag: "3.9", tf: ""} - - {tag: "3.10", tf: ""} - - {tag: "3.11", tf: ""} + - {tag: "3.6", tf: "default"} + - {tag: "3.7", tf: "default"} + - {tag: "3.8", tf: "default"} + - {tag: "3.9", tf: "default"} + - {tag: "3.10", tf: "default"} + - {tag: "3.11", tf: "default"} # scan tf versions - {tag: "3.9_base", tf: "2.5.3"} - {tag: "3.9_base", tf: "2.6.5"} @@ -48,4 +49,4 @@ jobs: run: docker pull cmsml/cmsml:${{ matrix.versions.tag }} - name: Test 🎰 - run: bash tests/docker.sh cmsml/cmsml:${{ matrix.versions.tag }} "[ -z '${{ matrix.versions.tf }}' ] || pip install -U tensorflow=='${{ matrix.versions.tf }}'; python -m unittest tests" + run: bash tests/docker.sh cmsml/cmsml:${{ matrix.versions.tag }} "[ '${{ matrix.versions.tf }}' = 'default' ] || pip install -U tensorflow=='${{ matrix.versions.tf }}'; python -m unittest tests" diff --git a/cmsml/util.py b/cmsml/util.py index 6093a8e..a430892 100644 --- a/cmsml/util.py +++ b/cmsml/util.py @@ -15,7 +15,7 @@ import tempfile import contextlib import importlib -from collections import MappingView +from collections.abc import MappingView from types import GeneratorType, ModuleType from typing import Any