From b9e995ee86df57b62a92a0fde8a5d2c08eee0c3d Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 17 Mar 2026 07:36:48 +0100 Subject: [PATCH 01/11] Bump jsonschema to 4.18.5 minimum for python3.12 support --- .../tests/unit/specs/native/test_workflow_spec_validate.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/orquesta/tests/unit/specs/native/test_workflow_spec_validate.py b/orquesta/tests/unit/specs/native/test_workflow_spec_validate.py index 3da1ce47..727f545a 100644 --- a/orquesta/tests/unit/specs/native/test_workflow_spec_validate.py +++ b/orquesta/tests/unit/specs/native/test_workflow_spec_validate.py @@ -1,4 +1,4 @@ -# Copyright 2021 The StackStorm Authors. +# Copyright 2021-2026 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -234,7 +234,7 @@ def test_empty_task_list(self): expected_errors = { "syntax": [ { - "message": "{} does not have enough properties", + "message": "{} should be non-empty", "schema_path": "properties.tasks.minProperties", "spec_path": "tasks", } diff --git a/requirements.txt b/requirements.txt index 310de986..85c79565 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ chardet>=3.0.2 eventlet jinja2>=2.11 # BSD License (3 clause) -jsonschema>=3,<4 # MIT +jsonschema>=4.18.5 # MIT # networkx v3.2 and greater does not support Python3.8. networkx>=2.6,<3.2 python-dateutil From ef7f6973609d2fcb029deccf32e61386f35c1a23 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 04:20:49 +0000 Subject: [PATCH 02/11] Pin jsonschema to 4.26.0 to align with st2 repo and pin networkx<3.4 to maintain py3.10 support. --- requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 85c79565..13589921 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,9 @@ chardet>=3.0.2 eventlet jinja2>=2.11 # BSD License (3 clause) -jsonschema>=4.18.5 # MIT -# networkx v3.2 and greater does not support Python3.8. -networkx>=2.6,<3.2 +jsonschema==4.26.0 +# networkx v3.5 and greater does not support Python3.10. +networkx>=2.6,<3.4 python-dateutil pyyaml>=5.3.1 # MIT six>=1.14.0 From 918456b56656e777af20ab0865e961f7002fc5ba Mon Sep 17 00:00:00 2001 From: Carlos Date: Tue, 17 Mar 2026 08:08:53 +0100 Subject: [PATCH 03/11] Bump YAQL version to 3.2.0 for security fix and consistent functionality across python versions. --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 13589921..04100a18 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,4 @@ pyyaml>=5.3.1 # MIT six>=1.14.0 stevedore>=1.3.0 # Apache-2.0 ujson>=1.35 # BSD License -yaql>=1.1.0 # Apache-2.0 +yaql>=3.2.0 # Apache-2.0 From f5827e68c9ef2a589de35e4e229c8cf7c8a25738 Mon Sep 17 00:00:00 2001 From: Carlos Date: Wed, 25 Mar 2026 08:16:48 +0100 Subject: [PATCH 04/11] Update tox to use py3.10 to py3.12 --- tox.ini | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index bd6ee1b4..ff770be3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,13 @@ [tox] -envlist = py38,py39,py310,py311,pep8,docs +envlist = py310,py311,py312,pep8,docs minversion = 1.6 skipsdist = True [gh-actions] python = - 3.8: py38,pep8,docs - 3.9: py39 - 3.10: py310 + 3.10: py310,pep8,docs 3.11: py311 + 3.12: py312 [testenv] usedevelop = True From 4d555348b0570f8bfe62c0b5d482212efa048548 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 06:11:29 +0200 Subject: [PATCH 05/11] Support py3.11 for rocky9 --- Makefile | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7e0bbbe1..ef9640cc 100644 --- a/Makefile +++ b/Makefile @@ -12,8 +12,19 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +SHELL = /bin/bash +OS_ID := $(shell source /etc/os-release; echo $ID) +# Major OS version is sufficient. +OS_VERSION := $(shell source /etc/os-release; echo ${VERSION_ID%.*}) PY3 := python3 +# Rocky9 requires a newer python version that the default py3.9 +ifeq ($(OS_ID),rocky) + ifeq ($(OS_VERSION),9) + PY3 := python3.11 + endif +endif + SYS_PY3 := $(shell which $(PY3)) PIP_VERSION = 24.0 @@ -56,12 +67,12 @@ venv: .PHONY: reqs reqs: venv check_virtualenv echo Install pip version $(PIP_VERSION) to match st2 core. - $(VENV_DIR)/bin/pip install --upgrade "pip==$(PIP_VERSION)" - $(VENV_DIR)/bin/pip install -r requirements.txt - $(VENV_DIR)/bin/pip install -r requirements-test.txt - $(VENV_DIR)/bin/pip install -r requirements-docs.txt - $(VENV_DIR)/bin/pip install -r requirements-ci.txt - $(VENV_DIR)/bin/python setup.py develop + $(VENV_DIR)/bin/$(PY3) -m pip install --upgrade "pip==$(PIP_VERSION)" + $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements.txt + $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements-test.txt + $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements-docs.txt + $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements-ci.txt + $(VENV_DIR)/bin/$(PY3) -m pip install --editable . echo .PHONY: check_virtualenv From 6e18162dbdb13138c1eed392b457aa37de9503f6 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 07:36:43 +0200 Subject: [PATCH 06/11] Replace imp module usage by importlib. Add build module to test-requirements. Update changelog. --- CHANGELOG.rst | 6 +++++- orquesta/tests/hacking/import_modules_rule.py | 6 +++--- requirements-test.txt | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1e46f2c4..7400b278 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,12 +6,16 @@ Unreleased Changed ~~~~~~~ -* Dropped python3.6 support. +* Dropped support for python3.6 to 3.9. Contributed by @nzlosh * Use pip 24.0 in virtualenv Contributed by @nzlosh * Aligned pinned dependencies with St2 core. Contributed by @nzlosh +* Replaced usage of imp module by importlib + Contributed by @nzlosh +* Added support for python3.10 to 3.12. + Contributed by @nzlosh Fixed ~~~~~ diff --git a/orquesta/tests/hacking/import_modules_rule.py b/orquesta/tests/hacking/import_modules_rule.py index e4c31132..c1ab189f 100644 --- a/orquesta/tests/hacking/import_modules_rule.py +++ b/orquesta/tests/hacking/import_modules_rule.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import imp +import importlib import inspect import sys import traceback @@ -54,10 +54,10 @@ def check_is_module(mod, search_path=sys.path): while "." in mod_name: pack_name, _sep, mod_name = mod_name.partition(".") - f, p, d = imp.find_module(pack_name, search_path) + f, p, d = importlib.util.find_spec(pack_name, search_path) search_path = [p] - imp.find_module(mod_name, search_path) + importlib.util.find_spec(mod_name, search_path) except ImportError: try: # Handle namespace modules diff --git a/requirements-test.txt b/requirements-test.txt index 7c109be0..419c54ba 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -8,5 +8,6 @@ pytest-cov==4.1.0 pep8==1.7.1 pylint==3.1.0 twine +build # 202404: Use forked version for flake8 v7.0.0 to align requirements with st2 test-requirements hacking @ git+https://github.com/nzlosh/hacking@flake8v7 From 26b3415acdb1d458c8189c135cf427ff25ff1fd7 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 07:48:17 +0200 Subject: [PATCH 07/11] Update pip and setuptools version to align with st2 repo --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ef9640cc..49294581 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,8 @@ ifeq ($(OS_ID),rocky) endif SYS_PY3 := $(shell which $(PY3)) -PIP_VERSION = 24.0 +PIP_VERSION ?= 26.1.2 +SETUPTOOLS_VERSION ?= 82.0.1 # Virtual Environment VENV_DIR ?= .venv From dfb69114265d46f9b32864e1325efca2b708db5b Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 13:30:29 +0200 Subject: [PATCH 08/11] Use the same setuptools version as st2 core --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 49294581..38abad65 100644 --- a/Makefile +++ b/Makefile @@ -67,8 +67,9 @@ venv: .PHONY: reqs reqs: venv check_virtualenv - echo Install pip version $(PIP_VERSION) to match st2 core. + echo Install pip $(PIP_VERSION) and setuptools $(SETUPTOOLS_VERSION) to match st2 core. $(VENV_DIR)/bin/$(PY3) -m pip install --upgrade "pip==$(PIP_VERSION)" + $(VENV_DIR)/bin/$(PY3) -m pip install --upgrade "setuptools==$(SETUPTOOLS_VERSION)" $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements.txt $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements-test.txt $(VENV_DIR)/bin/$(PY3) -m pip install -r requirements-docs.txt From e50a5eab1cbbaf6d07abdfd5a8e13bb173ea6abf Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 18:20:24 +0200 Subject: [PATCH 09/11] Update python version in metadata --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index ecc611dd..f8aa84c1 100644 --- a/setup.py +++ b/setup.py @@ -62,10 +62,9 @@ def get_requirements(): "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], entry_points={ "orquesta.composers": [ From 6f6bc393698b49236205005f0585a71149f90c52 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 18:22:12 +0200 Subject: [PATCH 10/11] Quote variables in Makefile. --- Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 38abad65..bda46601 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ OS_ID := $(shell source /etc/os-release; echo $ID) OS_VERSION := $(shell source /etc/os-release; echo ${VERSION_ID%.*}) PY3 := python3 -# Rocky9 requires a newer python version that the default py3.9 +# Rocky9 requires a newer python version than the default py3.9 ifeq ($(OS_ID),rocky) ifeq ($(OS_VERSION),9) PY3 := python3.11 @@ -79,37 +79,37 @@ reqs: venv check_virtualenv .PHONY: check_virtualenv check_virtualenv: - test -d $(VENV_DIR) || exit 1 + test -d "$(VENV_DIR)" || exit 1 .PHONY: schemas schemas: check_virtualenv - $(VENV_DIR)/bin/$(PY3) bin/orquesta-generate-schemas + "$(VENV_DIR)/bin/$(PY3)" bin/orquesta-generate-schemas .PHONY: format format: check_virtualenv - $(VENV_DIR)/bin/black orquesta bin setup.py -l 100 + "$(VENV_DIR)/bin/black" orquesta bin setup.py -l 100 .PHONY: check check: check_virtualenv - $(VENV_DIR)/bin/tox + "$(VENV_DIR)/bin/tox" .PHONY: docs docs: reqs - rm -rf $(BUILDDIR) - . $(VENV_DIR)/bin/activate; $(SPHINXBUILD) -W -b html $(SOURCEDIR) $(BUILDDIR)/html + rm -rf "$(BUILDDIR)" + . "$(VENV_DIR)/bin/activate"; "$(SPHINXBUILD)" -W -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" .PHONY: livedocs livedocs: reqs - rm -rf $(BUILDDIR) - . $(VENV_DIR)/bin/activate; $(SPHINXAUTO) -H 0.0.0.0 -b html $(SOURCEDIR) $(BUILDDIR)/html + rm -rf "$(BUILDDIR)" + . "$(VENV_DIR)/bin/activate"; "$(SPHINXAUTO)" -H 0.0.0.0 -b html "$(SOURCEDIR)" "$(BUILDDIR)/html" .PHONY: package -package: check_virtualenv - rm -rf $(PKGDISTDIR) - rm -rf $(PKGBUILDDIR) - $(VENV_DIR)/bin/$(PY3) setup.py sdist bdist_wheel +package: reqs + rm -rf "$(PKGDISTDIR)" + rm -rf "$(PKGBUILDDIR)" + "$(VENV_DIR)/bin/$(PY3)" -m build --outdir "${PKGDISTDIR}" .PHONY: publish publish: package - $(VENV_DIR)/bin/$(PY3) -m twine upload dist/* + "$(VENV_DIR)/bin/$(PY3)" -m twine upload dist/* From ac94c15390a8ff611aa3c5b16a0e5e481501a651 Mon Sep 17 00:00:00 2001 From: Carlos Date: Thu, 9 Jul 2026 18:39:25 +0200 Subject: [PATCH 11/11] Update CI check to use py3.10 to py3.12. Add package build and publish worlflow to CI. --- .github/workflows/build.yml | 31 ++++++++++++++++++++++++ .github/workflows/{tox.yml => check.yml} | 5 ++-- .github/workflows/publish.yml | 20 +++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yml rename .github/workflows/{tox.yml => check.yml} (89%) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..2ad04616 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,31 @@ +name: Build + +on: + push: + branches: ['*'] + pull_request: + branches: + - master + schedule: + # run every Monday at 6am + - cron: '0 6 * * 1' + +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: ["3.10"] + needs: + - tests + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: "Set up Python ${{ matrix.python-version }}" + uses: actions/setup-python@v4 + with: + python-version: "${{ matrix.python-version }}" + - name: Build wheel + run: | + make clean + make package diff --git a/.github/workflows/tox.yml b/.github/workflows/check.yml similarity index 89% rename from .github/workflows/tox.yml rename to .github/workflows/check.yml index 3dab1cd4..12ed69cf 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/check.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -29,4 +29,5 @@ jobs: pip install -r requirements-ci.txt make clean reqs schemas - name: "Run tox for ${{ matrix.python-version }}" - run: make check + run: | + make check diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..e8c144a0 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,20 @@ +name: Publish + +jobs: + publish: + runs-on: ubuntu-22.04 + strategy: + matrix: + python-version: ["3.10"] + needs: + - build + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: "Set up Python ${{ matrix.python-version }}" + uses: actions/setup-python@v4 + with: + python-version: "${{ matrix.python-version }}" + - name: Publish wheel + run: | + echo "TODO: make publish"