From f8b7dad645466afd45d25fe63437aae04a0b164e Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Wed, 29 Jul 2026 13:29:37 -0700 Subject: [PATCH] Reuse abxpkg installs across ArchiveBox tests --- archivebox/tests/conftest.py | 16 ++++++++++++---- etc/package.json | 2 +- pyproject.toml | 4 ++-- uv.lock | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/archivebox/tests/conftest.py b/archivebox/tests/conftest.py index 42241e93..48351570 100644 --- a/archivebox/tests/conftest.py +++ b/archivebox/tests/conftest.py @@ -414,10 +414,18 @@ def hermetic_lib_dir(tmp_path): @pytest.fixture def cached_abxpkg_lib_dir(): - """Reuse the configured abxpkg cache when a test is not validating LIB_DIR isolation.""" - from archivebox.config.common import get_config - - return get_config().ABXPKG_LIB_DIR + """Reuse one real abxpkg installation cache for the current pytest session.""" + lib_dir = SESSION_DATA_DIR / "lib" + lib_dir.mkdir(parents=True, exist_ok=True) + original_lib_dir = os.environ.get("ABXPKG_LIB_DIR") + os.environ["ABXPKG_LIB_DIR"] = str(lib_dir) + try: + yield lib_dir + finally: + if original_lib_dir is None: + os.environ.pop("ABXPKG_LIB_DIR", None) + else: + os.environ["ABXPKG_LIB_DIR"] = original_lib_dir @pytest.fixture diff --git a/etc/package.json b/etc/package.json index 0eed2f6d..9cf06d44 100644 --- a/etc/package.json +++ b/etc/package.json @@ -1,6 +1,6 @@ { "name": "archivebox", - "version": "0.9.35rc179", + "version": "0.9.35rc180", "repository": "github:ArchiveBox/ArchiveBox", "license": "MIT", "dependencies": { diff --git a/pyproject.toml b/pyproject.toml index 7154552d..9e759db9 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "archivebox" -version = "0.9.35rc179" +version = "0.9.35rc180" requires-python = ">=3.13" description = "Self-hosted internet archiving solution." authors = [{name = "Nick Sweeting", email = "pyproject.toml@archivebox.io"}] @@ -344,7 +344,7 @@ Donate = "https://github.com/ArchiveBox/ArchiveBox/wiki/Donations" [tool.bumpver] -current_version = "v0.9.35rc179" +current_version = "v0.9.35rc180" version_pattern = "vMAJOR.MINOR.PATCH[PYTAGNUM]" commit_message = "bump version {old_version} -> {new_version}" tag_message = "{new_version}" diff --git a/uv.lock b/uv.lock index 33f84843..79e2e028 100644 --- a/uv.lock +++ b/uv.lock @@ -123,7 +123,7 @@ wheels = [ [[package]] name = "archivebox" -version = "0.9.35rc179" +version = "0.9.35rc180" source = { editable = "." } dependencies = [ { name = "abx-dl", marker = "sys_platform == 'darwin' or sys_platform == 'linux'" },