From d9ae70211a33c5d78dbca6d4c9b0aa6e92562bf6 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Mon, 10 Oct 2022 17:39:14 +0200 Subject: [PATCH 1/4] also run unit tests with Python 3.11 --- .github/workflows/eb_command.yml | 2 +- .github/workflows/linting.yml | 2 +- .github/workflows/unit_tests.yml | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eb_command.yml b/.github/workflows/eb_command.yml index c50e3079fe..771f844913 100644 --- a/.github/workflows/eb_command.yml +++ b/.github/workflows/eb_command.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10'] + python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index ec9b075960..a3eec86823 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -5,7 +5,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10'] + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11'] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index 494bb55efa..b0c3ae95b5 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -68,6 +68,12 @@ jobs: - python: '3.10' modules_tool: ${{needs.setup.outputs.lmod8}} module_syntax: Tcl + - python: '3.11' + modules_tool: ${{needs.setup.outputs.lmod8}} + module_syntax: Lua + - python: '3.11' + modules_tool: ${{needs.setup.outputs.lmod8}} + module_syntax: Tcl # There may be encoding errors in Python 3 which are hidden when an UTF-8 encoding is set # Hence run the tests (again) with LC_ALL=C and Python 3.6 (or any < 3.7) - python: 3.6 From 7121d5edbdc2e1c760e55b64c00317748c8975cb Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 1 Nov 2022 16:20:07 +0100 Subject: [PATCH 2/4] don't explicitly install cryptography since it's only an indirect dependency --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4a7c734e58..bc06aae03b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,7 +31,7 @@ archspec # cryptography 3.4.0 no longer supports Python 2.7 cryptography==3.3.2; python_version == '2.7' -cryptography; python_version >= '3.5' +# cryptography; python_version >= '3.5' # rich is only supported for Python 3.6+ rich; python_version >= '3.6' From 9b3ced9219d10d93200267fd5c3c9b9960dd2f45 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Tue, 6 Dec 2022 22:10:40 +0100 Subject: [PATCH 3/4] don't install GC3Pie/cryptography when testing with Python 3.11 --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index bc06aae03b..85a9df78e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ flake8 # 2.6.7 uses invalid Python 2 syntax GC3Pie!=2.6.7; python_version < '3.0' -GC3Pie; python_version >= '3.0' +GC3Pie; python_version >= '3.0' and python_version < '3.11' python-graph-dot python-hglib requests @@ -31,7 +31,7 @@ archspec # cryptography 3.4.0 no longer supports Python 2.7 cryptography==3.3.2; python_version == '2.7' -# cryptography; python_version >= '3.5' +cryptography; python_version >= '3.5' and python_version < '3.11' # rich is only supported for Python 3.6+ rich; python_version >= '3.6' From 1c760fe84cfabaf00d43ee6048b8873facbbf7c4 Mon Sep 17 00:00:00 2001 From: Kenneth Hoste Date: Fri, 9 Dec 2022 13:55:40 +0100 Subject: [PATCH 4/4] ignore message in test suite output about GC3Pie not being available --- .github/workflows/unit_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index b0c3ae95b5..40126af4ca 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -206,7 +206,7 @@ jobs: # run test suite python -O -m test.framework.suite 2>&1 | tee test_framework_suite.log # try and make sure output of running tests is clean (no printed messages/warnings) - IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device|CryptographyDeprecationWarning: Python 3.[56]|from cryptography.*default_backend|CryptographyDeprecationWarning: Python 2|from cryptography.utils import int_from_bytes|Blowfish" + IGNORE_PATTERNS="no GitHub token available|skipping SvnRepository test|requires Lmod as modules tool|stty: 'standard input': Inappropriate ioctl for device|CryptographyDeprecationWarning: Python 3.[56]|from cryptography.*default_backend|CryptographyDeprecationWarning: Python 2|from cryptography.utils import int_from_bytes|Blowfish|GC3Pie not available, skipping test" # '|| true' is needed to avoid that Travis stops the job on non-zero exit of grep (i.e. when there are no matches) PRINTED_MSG=$(egrep -v "${IGNORE_PATTERNS}" test_framework_suite.log | grep '\.\n*[A-Za-z]' || true) test "x$PRINTED_MSG" = "x" || (echo "ERROR: Found printed messages in output of test suite\n${PRINTED_MSG}" && exit 1)