From bf8e71288d00df769b0cbad859635f2b5deba358 Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Sun, 22 Nov 2026 21:56:32 -0800 Subject: [PATCH] Keep the vacuum fixture's plaintext on any SQLite build, and lift anyio What was broken: CI has failed every pull request since 2026-11-04. test_the_fixture_really_does_leave_the_plaintext_behind found no "hunter2" in the file, and test_running_the_suite_does_not_modify_ stonksmith_state failed with it, because it runs the suite in a subprocess. Separately, the minor-and-patch group's pytest 9.2.0 could not start: anyio 4.14.2's plugin imports _pytest.python.CallSpec2, which 9.2 deprecates, and filterwarnings = ["error"] makes that fatal at plugin load. Why it was invisible: nothing here changed. ubuntu-latest moved from 24.04 to 26.04, which ships /usr/bin/python3.14, and uv took that over a managed interpreter. Its libsqlite3 is Debian's, built with SQLITE_SECURE_DELETE, so the UPDATE that nulls the password zeroes the old cell, and the fixture's premise stopped holding. Only Dependabot PRs have run CI since, so it read as six bad bumps rather than one changed runner. A managed interpreter (every local run) passes. The fix: the fixture sets PRAGMA secure_delete = OFF on its own connection, so it builds the database the command is for whatever SQLite runs it. uv.lock moves anyio to 4.16.0, which reads CallSpec when pytest has it, and typing-extensions to 4.16.0, which that anyio requires. Why not the obvious alternative: pinning runs-on to ubuntu-24.04, or UV_PYTHON_PREFERENCE=only-managed, would make CI green by keeping it off the SQLite build a Debian or Ubuntu operator actually has. The test should not depend on the build; the field databases never got that guarantee either. Ignoring the deprecation in filterwarnings would leave the CallSpec2 import to break outright in pytest 10. What test makes the claim real: test_vacuum_command.py. With the pragma set to ON instead, the premise test fails with the same assertion CI printed; with OFF, all seven pass. Under `uv run --with pytest==9.2.0`, the file passes with anyio 4.16.0 and fails at plugin load with 4.14.2. Co-Authored-By: Claude Opus 5.5 --- tests/test_vacuum_command.py | 7 +++++++ uv.lock | 13 +++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/test_vacuum_command.py b/tests/test_vacuum_command.py index 442798d..752d873 100644 --- a/tests/test_vacuum_command.py +++ b/tests/test_vacuum_command.py @@ -57,6 +57,13 @@ def leave_plaintext(self, name: str = "broker.db") -> Path: path: Path = self.workspace / name con = sqlite3.connect(path) try: + # Off explicitly: Debian and Ubuntu build SQLite with + # SQLITE_SECURE_DELETE, which zeroes a freed cell and so would clear + # the plaintext this fixture exists to leave behind. CI met that + # when ubuntu-latest became 26.04 and uv took its system Python + # (and so its libsqlite3) over a managed one. The databases the + # command meets in the field were written under no such guarantee. + con.execute("PRAGMA secure_delete = OFF") con.executescript(PRE_KEYRING) con.executemany( "INSERT INTO credentials (username, password, type, pillaged_from)" diff --git a/uv.lock b/uv.lock index 5b714e3..5b610da 100644 --- a/uv.lock +++ b/uv.lock @@ -125,14 +125,15 @@ wheels = [ [[package]] name = "anyio" -version = "4.14.2" +version = "4.16.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.15'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/61/cc/a381afa6efea9f496eff839d4a6a1aed3bfafc7b3ab4b0d1b243a12573dd/anyio-4.14.2.tar.gz", hash = "sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f", size = 260176, upload-time = "2026-07-12T20:29:07.082Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a1/98/7e457a3b014976887a050561955c0b76e1e7e2d6e27b78ecef2ef80518f2/anyio-4.16.0.tar.gz", hash = "sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb", size = 310971, upload-time = "2026-11-01T11:20:07.282Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/da/35/f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc/anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", size = 125813, upload-time = "2026-07-12T20:29:05.763Z" }, + { url = "https://files.pythonhosted.org/packages/a9/16/7757fb84c819accc7d7e9af5291b261e4abb8627ee040f99e7d35ef2457a/anyio-4.16.0-py3-none-any.whl", hash = "sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026", size = 134521, upload-time = "2026-11-01T11:20:05.59Z" }, ] [[package]] @@ -1359,11 +1360,11 @@ wheels = [ [[package]] name = "typing-extensions" -version = "4.15.0" +version = "4.16.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" }, + { url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" }, ] [[package]]