From e2238fa4393075418e41110b4299b0d2bafb9c8c Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 31 Jan 2026 12:53:25 +0000 Subject: [PATCH 1/4] try outcome v2 --- ci.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/ci.sh b/ci.sh index 9362dbc72..4dfb2b086 100755 --- a/ci.sh +++ b/ci.sh @@ -55,6 +55,7 @@ if [ "${NO_TEST_REQUIREMENTS-0}" == 1 ]; then flags="--skip-optional-imports" else python -m uv pip install -r test-requirements.txt --no-deps + python -m uv pip install https://github.com/graingert/outcome/archive/refs/heads/invalid-objects-on-unwrap.zip flags="" fi From 498be9a6e763c8f4ac4ab78a6bd6ea2962abcd49 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 31 Jan 2026 12:56:09 +0000 Subject: [PATCH 2/4] check we are running on outcome v2 --- src/trio/_tests/test_trio.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/trio/_tests/test_trio.py b/src/trio/_tests/test_trio.py index 65d4ce34f..c038a2088 100644 --- a/src/trio/_tests/test_trio.py +++ b/src/trio/_tests/test_trio.py @@ -6,3 +6,15 @@ def test_trio_import() -> None: del sys.modules[module] import trio # noqa: F401 + + +def test_we_have_peek() -> None: + """ + temporary test to see if we are running on outcome v2 + """ + import outcome + + def fn() -> int: + return 1 + + assert outcome.capture(fn).peek() == 1 From ca97a91a83fdc1f22f84809a205918b99f17d3b8 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 31 Jan 2026 12:59:51 +0000 Subject: [PATCH 3/4] always install outcome v2 --- ci.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci.sh b/ci.sh index 4dfb2b086..cd1ce42e8 100755 --- a/ci.sh +++ b/ci.sh @@ -55,10 +55,11 @@ if [ "${NO_TEST_REQUIREMENTS-0}" == 1 ]; then flags="--skip-optional-imports" else python -m uv pip install -r test-requirements.txt --no-deps - python -m uv pip install https://github.com/graingert/outcome/archive/refs/heads/invalid-objects-on-unwrap.zip flags="" fi +python -m uv pip install https://github.com/graingert/outcome/archive/refs/heads/invalid-objects-on-unwrap.zip + # If we're testing with a LSP installed, then it might break network # stuff, so wait until after we've finished setting everything else # up. From 59d6b5ffcf94e9199836f019f1a89962e39177d6 Mon Sep 17 00:00:00 2001 From: Thomas Grainger Date: Sat, 31 Jan 2026 13:09:49 +0000 Subject: [PATCH 4/4] install outcome v2 in tox's check stage --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 11bd09d0c..825e52f06 100644 --- a/tox.ini +++ b/tox.ini @@ -102,6 +102,7 @@ description = "Run type checks: mypy on all platforms, and pyright on `src/trio[ deps = -r test-requirements.txt exceptiongroup + https://github.com/graingert/outcome/archive/refs/heads/invalid-objects-on-unwrap.zip base_python = 3.10 set_env = PYRIGHT_PYTHON_IGNORE_WARNINGS=1