From 2e20d17e0926f9b80cd4f39fe02b731417d67e73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20=C5=A0imko?= Date: Mon, 4 Sep 2023 22:31:16 +0200 Subject: [PATCH] installation: support for Python 3.12 --- .github/workflows/ci.yml | 4 ++-- CHANGES.rst | 1 + setup.py | 15 ++++++++------- tests/test_snakemake.py | 4 ++-- tox.ini | 4 ++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 878d0df6..cc4beb0f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ # This file is part of REANA. -# Copyright (C) 2020, 2021, 2022 CERN. +# Copyright (C) 2020, 2021, 2022, 2023 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -117,7 +117,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] + python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev'] steps: - name: Checkout diff --git a/CHANGES.rst b/CHANGES.rst index 3c0e5d53..32204aea 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,7 @@ Changes Version 0.9.3 (UNRELEASED) -------------------------- +- Adds support for Python 3.12. - Adds OpenAPI specification support for ``prune_workspace`` endpoint that allows to delete files that are neither inputs nor outputs from the workspace. - Adds support for ``tests.files`` in ``reana.yaml`` allowing to specify Gherking feature files for testing. - Changes the OpenAPI specification to include the ``run_stopped_at`` property in the workflow progress information returned by the workflow list and workflow status endpoints. diff --git a/setup.py b/setup.py index 3e77e109..f69a363f 100755 --- a/setup.py +++ b/setup.py @@ -23,11 +23,6 @@ ] -def get_snakemake_pkg(extras=""): - """Get Snakemake dependency string, adding appropiate extras.""" - return f"snakemake{extras}==6.8.0" - - extras_require = { "docs": [ "Sphinx>=1.5.1", @@ -39,9 +34,14 @@ def get_snakemake_pkg(extras=""): ], "yadage": ["adage~=0.10.1", "yadage~=0.20.1", "yadage-schemas~=0.10.6"], "cwl": ["cwltool==3.1.20210628163208"], - "snakemake": [get_snakemake_pkg(), "tabulate<0.9"], + "snakemake": [ + "snakemake==6.8.0 ; python_version<'3.12'", + "snakemake==7.9.0 ; python_version>='3.12'", + "tabulate<0.9", + ], "snakemake_reports": [ - get_snakemake_pkg("[reports]"), + "snakemake[reports]==6.8.0 ; python_version<'3.12'", + "snakemake[reports]==7.9.0 ; python_version>='3.12'", "pygraphviz<1.8", "tabulate<0.9", # tabulate 0.9 crashes snakemake, more info: https://github.com/snakemake/snakemake/issues/1899 ], @@ -110,6 +110,7 @@ def get_snakemake_pkg(extras=""): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", diff --git a/tests/test_snakemake.py b/tests/test_snakemake.py index b8112a26..314b8a59 100644 --- a/tests/test_snakemake.py +++ b/tests/test_snakemake.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # # This file is part of REANA. -# Copyright (C) 2021, 2022 CERN. +# Copyright (C) 2021, 2022, 2023 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -17,7 +17,7 @@ def test_snakemake_load(tmpdir, dummy_snakefile): """Test that Snakemake metadata is loaded properly.""" - if sys.version_info.major == 3 and sys.version_info.minor == 11: + if sys.version_info.major == 3 and sys.version_info.minor in (11, 12): pytest.xfail( "Snakemake features of reana-client are not supported on Python 3.11" ) diff --git a/tox.ini b/tox.ini index dab98b54..9904a694 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,11 @@ # This file is part of REANA. -# Copyright (C) 2022 CERN. +# Copyright (C) 2022, 2023 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. [tox] -envlist = py36, py37, py38, py39, py310, py311 +envlist = py36, py37, py38, py39, py310, py311, py312 [testenv] deps = pytest