From 751170b7d4458e3262361744a1a5ad976985f470 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 14 Sep 2026 10:53:36 +0200 Subject: [PATCH 1/4] Remove matrix:all, matrix:exasol, and matrix:python --- exasol/toolbox/nox/_matrix.py | 73 ----------------------------------- exasol/toolbox/nox/tasks.py | 7 +--- 2 files changed, 1 insertion(+), 79 deletions(-) diff --git a/exasol/toolbox/nox/_matrix.py b/exasol/toolbox/nox/_matrix.py index ee5b14e5d..d661013a2 100644 --- a/exasol/toolbox/nox/_matrix.py +++ b/exasol/toolbox/nox/_matrix.py @@ -11,10 +11,6 @@ PROJECT_CONFIG, ) -# The relevant nox sessions will be removed in: -# https://github.com/exasol/python-toolbox/issues/859 -MATRIX_DEPRECATION_DATE = "2026-09-15" - def _matrix_keys(config: BaseConfig) -> tuple[str, ...]: """ @@ -62,78 +58,9 @@ def _generate_matrix(config: BaseConfig, keys: Iterable[str]) -> dict[str, Any]: } -def _deprecated_generate_matrix( - session: Session, - config: BaseConfig, - workflow_key_map: dict[str, str], - session_name: str, - replacement_args: str, -) -> None: - """ - Generate a JSON-serializable matrix subset from the project's config for a - deprecated workflow output. - - ``workflow_key_map`` maps the deprecated workflow-facing matrix keys to the - newer ``BaseConfig`` attribute names. The deprecated workflow keys keep - their existing dash-separated names because they are part of the external - CLI / GitHub Actions contract. The config keys use underscores because they - are Python identifiers and match the fields defined on ``BaseConfig``. - """ - matrix = _generate_matrix(config, workflow_key_map.values()) - renamed_matrix: dict[str, Any] = {} - for output_key, config_key in workflow_key_map.items(): - renamed_matrix[output_key] = matrix[config_key] - print(json.dumps(renamed_matrix)) - - session.warn( - f"Warning: `nox -s {session_name}` is deprecated and will be removed on " - f"{MATRIX_DEPRECATION_DATE}. Use `nox -s matrix:generate -- {replacement_args}` " - "instead." - ) - - @nox.session(name="matrix:generate", python=False) def generate_matrix(session: Session) -> None: """Output selected BaseConfig values as JSON.""" keys = _matrix_args(session, PROJECT_CONFIG) matrix = _generate_matrix(PROJECT_CONFIG, keys) print(json.dumps(matrix)) - - -@nox.session(name="matrix:python", python=False) -def python_matrix(session: Session) -> None: - """Output the build matrix for Python versions as JSON.""" - _deprecated_generate_matrix( - session=session, - config=PROJECT_CONFIG, - workflow_key_map={"python-version": "python_versions"}, - session_name="matrix:python", - replacement_args="python_versions", - ) - - -@nox.session(name="matrix:exasol", python=False) -def exasol_matrix(session: Session) -> None: - """Output the build matrix for Exasol versions as JSON.""" - _deprecated_generate_matrix( - session=session, - config=PROJECT_CONFIG, - workflow_key_map={"exasol-version": "exasol_versions"}, - session_name="matrix:exasol", - replacement_args="exasol_versions", - ) - - -@nox.session(name="matrix:all", python=False) -def full_matrix(session: Session) -> None: - """Output the full build matrix for Python & Exasol versions as JSON.""" - _deprecated_generate_matrix( - session=session, - config=PROJECT_CONFIG, - workflow_key_map={ - "python-version": "python_versions", - "exasol-version": "exasol_versions", - }, - session_name="matrix:all", - replacement_args="python_versions exasol_versions", - ) diff --git a/exasol/toolbox/nox/tasks.py b/exasol/toolbox/nox/tasks.py index 6be048000..cd1b3f97d 100644 --- a/exasol/toolbox/nox/tasks.py +++ b/exasol/toolbox/nox/tasks.py @@ -65,12 +65,7 @@ def check(session: Session) -> None: get_filtered_python_files, ) -from exasol.toolbox.nox._matrix import ( - generate_matrix, - python_matrix, - exasol_matrix, - full_matrix, -) +from exasol.toolbox.nox._matrix import generate_matrix from exasol.toolbox.nox._release import prepare_release From 47ff75d0c2a92daf7cc6d118f36e4ff8f8030b35 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 14 Sep 2026 10:54:25 +0200 Subject: [PATCH 2/4] Remove tests for removed functions --- test/unit/nox/_matrix_test.py | 41 ----------------------------------- 1 file changed, 41 deletions(-) diff --git a/test/unit/nox/_matrix_test.py b/test/unit/nox/_matrix_test.py index 0671d5d9b..1241841df 100644 --- a/test/unit/nox/_matrix_test.py +++ b/test/unit/nox/_matrix_test.py @@ -9,10 +9,7 @@ from exasol.toolbox.config import BaseConfig from exasol.toolbox.nox._matrix import ( _generate_matrix, - exasol_matrix, - full_matrix, generate_matrix, - python_matrix, ) @@ -94,41 +91,3 @@ class TestGenerateMatrixHelper: ) def test_returns_requested_keys(config, requested_keys, expected): assert _generate_matrix(config, requested_keys) == expected - - -class TestDeprecatedMatrixSessions: - @staticmethod - def test_exasol_session_still_emits_field_names( - nox_session, config, caplog, capsys - ): - with patch("exasol.toolbox.nox._matrix.PROJECT_CONFIG", new=config): - exasol_matrix(nox_session) - - captured = capsys.readouterr() - assert json.loads(captured.out) == {"exasol-version": ["8.29.13", "2025.1.8"]} - assert len(caplog.messages) == 1 - - @staticmethod - def test_python_session_still_emits_field_names( - nox_session, config, caplog, capsys - ): - with patch("exasol.toolbox.nox._matrix.PROJECT_CONFIG", new=config): - python_matrix(nox_session) - - captured = capsys.readouterr() - assert json.loads(captured.out) == { - "python-version": ["3.10", "3.11", "3.12", "3.13", "3.14"] - } - assert len(caplog.messages) == 1 - - @staticmethod - def test_full_session_still_emits_field_names(nox_session, config, caplog, capsys): - with patch("exasol.toolbox.nox._matrix.PROJECT_CONFIG", new=config): - full_matrix(nox_session) - - captured = capsys.readouterr() - assert json.loads(captured.out) == { - "python-version": ["3.10", "3.11", "3.12", "3.13", "3.14"], - "exasol-version": ["8.29.13", "2025.1.8"], - } - assert len(caplog.messages) == 1 From 332c57d12a06dcd9ec652c68964677543d1c7627 Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 14 Sep 2026 10:55:15 +0200 Subject: [PATCH 3/4] Remove references from index.rst --- doc/user_guide/features/github_workflows/index.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/user_guide/features/github_workflows/index.rst b/doc/user_guide/features/github_workflows/index.rst index 4c7296be4..b385d78a4 100644 --- a/doc/user_guide/features/github_workflows/index.rst +++ b/doc/user_guide/features/github_workflows/index.rst @@ -49,12 +49,6 @@ Besides that, you can also create individual workflow files which are ignored by Maintained by the PTB ^^^^^^^^^^^^^^^^^^^^^ -.. note:: - The ``matrix.yml`` workflow replaces the older ``matrix-all.yml``, ``matrix-exasol.yml``, - and ``matrix-python.yml`` workflows. The associated nox sessions (``matrix:all``, - ``matrix:exasol``, and ``matrix:python``) are deprecated and will be removed - 2026-09-15. - .. list-table:: :widths: 25 25 50 :header-rows: 1 From 34c0cffa41809736b9797d7057e57360f4409dff Mon Sep 17 00:00:00 2001 From: Ariel Schulz Date: Mon, 14 Sep 2026 10:59:10 +0200 Subject: [PATCH 4/4] Add changelog entry --- doc/changes/unreleased.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/changes/unreleased.md b/doc/changes/unreleased.md index fb4737052..4260834a3 100644 --- a/doc/changes/unreleased.md +++ b/doc/changes/unreleased.md @@ -1,3 +1,12 @@ # Unreleased ## Summary + +This major release removes the deprecated matrix sessions ``matrix:all``, +``matrix:exasol``, and ``matrix:python``. Projects should use ``matrix.yml`` together +with the ``matrix:generate`` Nox session instead. + +## Refactoring + +* #859: Removed the deprecated ``matrix:all``, ``matrix:exasol``, and ``matrix:python`` + Nox sessions.