From d5dfbe672cf38c8e58680855ef70a7dfa1109a12 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 10:17:02 -0500 Subject: [PATCH 01/12] Test minimum dependency bounds --- .github/workflows/build.yml | 12 +++++++++--- Makefile | 6 +++++- pyproject.toml | 20 ++++++++++---------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4538e90..17b6401 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,12 +12,16 @@ on: jobs: build: - name: ${{ matrix.os }} py${{ matrix.python-version }} + name: ${{ matrix.os }} py${{ matrix.python-version }}${{ matrix.resolution && format(' ({0})', matrix.resolution) || '' }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ['3.10', '3.14'] + include: + - os: ubuntu-latest + python-version: '3.10' + resolution: lowest steps: - uses: actions/checkout@v4 @@ -55,9 +59,9 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/uv - key: ${{ runner.os }}-py${{ matrix.python-version }}-uv-${{ hashFiles('**/pyproject.toml') }} + key: ${{ runner.os }}-py${{ matrix.python-version }}-uv-${{ matrix.resolution }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | - ${{ runner.os }}-py${{ matrix.python-version }}-uv- + ${{ runner.os }}-py${{ matrix.python-version }}-uv-${{ matrix.resolution }}- - name: Set up uv run: | @@ -74,6 +78,8 @@ jobs: - name: Run tests shell: bash + env: + UV_RESOLUTION: ${{ matrix.resolution }} run: | bin/test.sh diff --git a/Makefile b/Makefile index ed6f369..865976c 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ help: docs - build documentation site locally\n\ lint - run code formatters and linters\n\ test - run automated test suite\n\ + test-lowest - run tests with lowest dependency resolution\n\ dist - generate release archives\n\ " @@ -22,7 +23,10 @@ lint: check test: check bin/test.sh +test-lowest: check + UV_RESOLUTION=lowest bin/test.sh + dist: check clean bin/dist.sh -.PHONY: help clean docs check lint test dist +.PHONY: help clean docs check lint test test-lowest dist diff --git a/pyproject.toml b/pyproject.toml index 2820d8e..f83522b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ classifiers = [ requires-python = ">=3.10" dependencies = [ "cjdk>=0.4.0", - "psutil", + "psutil>=1", "requests", "semver>=3.0.0", "tomli>=2.0.0; python_version<'3.11'", @@ -56,15 +56,15 @@ cli = [ "rich-click>=1.9.5", ] dev = [ - "build", - "mypy", - "pytest", - "ruff", - "types-Pygments", - "types-colorama", - "types-psutil", - "types-requests", - "validate-pyproject[all]", + "build>=1.2.2", + "mypy>=1.20.2", + "pytest>=9.0.3", + "ruff>=0.15.12", + "types-Pygments>=2.20.0", + "types-colorama>=0.4.15", + "types-psutil>=7.2.2", + "types-requests>=2.33.0", + "validate-pyproject[all]>=0.25", {include-group = "cli"}, ] From 5f2c98137a18ac9757dab31f53840a27668fe74f Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 10:34:43 -0500 Subject: [PATCH 02/12] Fix environment variable --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17b6401..4329503 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -79,7 +79,7 @@ jobs: - name: Run tests shell: bash env: - UV_RESOLUTION: ${{ matrix.resolution }} + UV_RESOLUTION: ${{ matrix.resolution || 'highest'}} run: | bin/test.sh From a0d2a5f9e17a204796fd1816a5ecf5b5d37a4445 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 10:44:33 -0500 Subject: [PATCH 03/12] Just use a matrix --- .github/workflows/build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4329503..155f6f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,16 +12,13 @@ on: jobs: build: - name: ${{ matrix.os }} py${{ matrix.python-version }}${{ matrix.resolution && format(' ({0})', matrix.resolution) || '' }} + name: ${{ matrix.os }} py${{ matrix.python-version }}${{ format(' ({0})', matrix.resolution)}} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] python-version: ['3.10', '3.14'] - include: - - os: ubuntu-latest - python-version: '3.10' - resolution: lowest + resolution: ['lowest', 'highest'] steps: - uses: actions/checkout@v4 @@ -79,7 +76,7 @@ jobs: - name: Run tests shell: bash env: - UV_RESOLUTION: ${{ matrix.resolution || 'highest'}} + UV_RESOLUTION: ${{ matrix.resolution }} run: | bin/test.sh From 1fc9d3990f1c2c2227b75ff9f3f520fa004cbfc4 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 11:20:00 -0500 Subject: [PATCH 04/12] Use resolution strategy at tool install isntead Didn't realize that all of the dependency installation is actually happening here --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 155f6f1..ee1a913 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -70,13 +70,16 @@ jobs: uv tool install prysk - name: Set up jgo + shell: bash + env: + UV_RESOLUTION: ${{ matrix.resolution }} run: | uv tool install --with-editable ".[cli]" jgo - name: Run tests shell: bash env: - UV_RESOLUTION: ${{ matrix.resolution }} + UV_NO_SYNC: True run: | bin/test.sh From 9bc8c8897c65727e5d5435677dc1e8df73099839 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 11:50:02 -0500 Subject: [PATCH 05/12] Try skipping installation within CI Theoretically, everything we should need for the later steps should be handled within the shell scripts --- .github/workflows/build.yml | 9 +-------- bin/test.sh | 3 +++ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee1a913..018f221 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -69,17 +69,10 @@ jobs: run: | uv tool install prysk - - name: Set up jgo - shell: bash - env: - UV_RESOLUTION: ${{ matrix.resolution }} - run: | - uv tool install --with-editable ".[cli]" jgo - - name: Run tests shell: bash env: - UV_NO_SYNC: True + UV_RESOLUTION: ${{ matrix.resolution }} run: | bin/test.sh diff --git a/bin/test.sh b/bin/test.sh index 940ceb5..c4a6a46 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -43,6 +43,9 @@ fi # Run prysk if we have args and prysk is installed if [ ${#prysk_args[@]} -gt 0 ] && command -v prysk; then + # Ensure jgo CLI is available for prysk tests + command -v jgo > /dev/null 2>&1 || uv tool install --with-editable ".[cli]" jgo + # NB: We cannot add prysk to pyproject.toml because # prysk depends on an incompatible version of rich. # Use `uv tool install prysk` instead. From c89bdb87707edc204a5ad35eaaf92c4ffd90a435 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 11:56:00 -0500 Subject: [PATCH 06/12] Pin minimum requests version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f83522b..90a178f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ requires-python = ">=3.10" dependencies = [ "cjdk>=0.4.0", "psutil>=1", - "requests", + "requests>=2", "semver>=3.0.0", "tomli>=2.0.0; python_version<'3.11'", "tomli-w>=1.0.0", From 21d6a74039df9136aada95fdd21d3bf05c4ea6d2 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Wed, 6 May 2026 12:49:10 -0500 Subject: [PATCH 07/12] Pin requests to 2.16.0 minimum Versions before 2.16.0 vendored `packages/urllib3/packages/six.py`, resulting in widespread failures of the form: ModuleNotFoundError: No module named 'urllib3.packages.six.moves' --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 90a178f..2d1b72d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ requires-python = ">=3.10" dependencies = [ "cjdk>=0.4.0", "psutil>=1", - "requests>=2", + "requests>=2.16.0", "semver>=3.0.0", "tomli>=2.0.0; python_version<'3.11'", "tomli-w>=1.0.0", From 278e7e58cd9f14ec69b6bdcdc47f1d7f1ae24a40 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 15:58:47 -0500 Subject: [PATCH 08/12] Try urllib3>=2 --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2d1b72d..3dbc735 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dependencies = [ "semver>=3.0.0", "tomli>=2.0.0; python_version<'3.11'", "tomli-w>=1.0.0", + "urllib3>=2", ] [project.optional-dependencies] From 9fde4719ea80f9e72929abc29116fcc85393fb16 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Wed, 6 May 2026 16:02:56 -0500 Subject: [PATCH 09/12] Bump psutil We may have to binarysearch this :) --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3dbc735..f795953 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ classifiers = [ requires-python = ">=3.10" dependencies = [ "cjdk>=0.4.0", - "psutil>=1", + "psutil>=7", "requests>=2.16.0", "semver>=3.0.0", "tomli>=2.0.0; python_version<'3.11'", From b49d22de30cb725692d259e517d1228f40b1f9e3 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Tue, 19 May 2026 11:37:12 -0500 Subject: [PATCH 10/12] Add in a note about requests minimum pin --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f795953..c54d114 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ requires-python = ">=3.10" dependencies = [ "cjdk>=0.4.0", "psutil>=7", + # Previous versions vendored urllib3/packages/six.py, resulting in failures "requests>=2.16.0", "semver>=3.0.0", "tomli>=2.0.0; python_version<'3.11'", From 28cbac974a6a05f6e5b3dc7c763eed2668e90cd5 Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Tue, 19 May 2026 14:05:14 -0500 Subject: [PATCH 11/12] Try out pytest-prysk --- bin/test.sh | 21 --------------------- pyproject.toml | 10 +++------- 2 files changed, 3 insertions(+), 28 deletions(-) diff --git a/bin/test.sh b/bin/test.sh index c4a6a46..d426b2d 100755 --- a/bin/test.sh +++ b/bin/test.sh @@ -41,26 +41,5 @@ if [ ${#pytest_args[@]} -gt 0 ]; then fi fi -# Run prysk if we have args and prysk is installed -if [ ${#prysk_args[@]} -gt 0 ] && command -v prysk; then - # Ensure jgo CLI is available for prysk tests - command -v jgo > /dev/null 2>&1 || uv tool install --with-editable ".[cli]" jgo - - # NB: We cannot add prysk to pyproject.toml because - # prysk depends on an incompatible version of rich. - # Use `uv tool install prysk` instead. - # - # We set COLOR=never by default to avoid ANSI codes in test output. - # We set NO_PROGRESS=1 to disable progress bars in test output. - # This is especially important for CI, which may or may not detect - # as ANSI-color-compatible compared to local usage of prysk. - # Tests can override this (e.g., color.t does). - COLOR="${COLOR:-never}" NO_PROGRESS="${NO_PROGRESS:-1}" prysk -v "${prysk_args[@]}" - prysk_status=$? - if [ $prysk_status -ne 0 ]; then - exit_status=$prysk_status - fi -fi - # Exit with appropriate status exit $exit_status diff --git a/pyproject.toml b/pyproject.toml index c54d114..d3a8872 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,21 +46,17 @@ dependencies = [ "urllib3>=2", ] -[project.optional-dependencies] -cli = [ - "rich>=14.2.0", - "rich-click>=1.9.5", -] - [dependency-groups] cli = [ - "rich>=14.2.0", + "rich>=13.3.1", "rich-click>=1.9.5", ] dev = [ "build>=1.2.2", "mypy>=1.20.2", + "prysk>=0.20.0", "pytest>=9.0.3", + "pytest-prysk>=0.4.0", "ruff>=0.15.12", "types-Pygments>=2.20.0", "types-colorama>=0.4.15", From 59fad2ed0845c64be0679e07c5093d507b362e2e Mon Sep 17 00:00:00 2001 From: Gabriel Selzer Date: Tue, 19 May 2026 14:18:07 -0500 Subject: [PATCH 12/12] Try adding prysk config back via conftest --- tests/conftest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 93838ad..f8df3df 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,6 @@ """Pytest configuration and shared fixtures.""" +import os import shutil import subprocess from pathlib import Path @@ -12,6 +13,20 @@ _BOOTSTRAP_SENTINEL = Path(".cache/m2_repo/.bootstrapped") +@pytest.fixture(scope="session", autouse=True) +def prysk_env(): + """Set default env vars for prysk tests, matching the old shell script invocation.""" + old = {k: os.environ.get(k) for k in ("COLOR", "NO_PROGRESS")} + os.environ.setdefault("COLOR", "never") + os.environ.setdefault("NO_PROGRESS", "1") + yield + for k, v in old.items(): + if v is None: + os.environ.pop(k, None) + else: + os.environ[k] = v + + @pytest.fixture(scope="session") def thicket_poms(tmp_path_factory): """