Releases: ArchiveBox/abxpkg
v1.9.21
v1.9.21
- 🛠️ Fixed
NpmProviderto pass--min-release-agein npm's expected day-based format instead of converting it to seconds, so installs and updates now preserve values like7and1.5correctly.
min_release_age_days = f"{min_release_age:g}"
...
f"--min-release-age={min_release_age_days}"- ✅ Expanded npm coverage in the test suite to verify install/update flag generation, preserve fractional day values, and exercise a live install path with
min_release_age=7.
self.assertEqual(release_age_flags[0], "--min-release-age=7")
self.assertEqual(release_age_flags[0], "--min-release-age=1.5")- 🚦 Refreshed GitHub Actions workflows to current action versions and opted the workflows into the Node 24 runtime path ahead of the runner deprecation window.
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'- 📦 Bumped the package version to
1.9.21and refresheduv.lockto keep the editable package metadata aligned with the release.
v1.9.20
abx-pkg v1.9.20
Changes since v1.9.18:
- 🔒 Added Binary-level supply-chain controls and threaded them through every lifecycle path.
Binarynow carriespostinstall_scriptsandmin_release_age, defaults them fromABX_PKG_POSTINSTALL_SCRIPTS/ABX_PKG_MIN_RELEASE_AGE, and passes them throughinstall(),update(),load_or_install(), anduninstall()instead of leaving each provider to guess.
from abx_pkg import Binary, pip
binary = Binary(
name="cowsay",
binproviders=[pip],
postinstall_scripts=False,
min_release_age=7,
)
binary.load_or_install()- 🛡️ Hardened Python package installs.
PipProvidernow injects no-build / age-gating controls for installs, prefersuv pipwhen available, and falls back to plainpipwith binary-only installs and--uploaded-prior-towhen supported by pip 26+.
uv pip install --no-build --exclude-newer=<cutoff> cowsay
pip install --only-binary :all: --uploaded-prior-to=<cutoff> cowsay- 📦 Tightened npm/pnpm behavior and made the backend choice more predictable.
NpmProvidernow prefers a realnpmbinary when bothnpmandpnpmexist, rewrites commands whenpnpmis the backend, applies--ignore-scripts/--min-release-agefor npm installs, and writespnpm-workspace.yamlwithminimumReleaseAgeso pnpm gets the same age gate without leaking npm-only flags into pnpm commands.
npm install --ignore-scripts --min-release-age=604800 --global cowsay
# pnpm-workspace.yaml
minimumReleaseAge: 10080- ✅ Made
min_versionenforcement consistent and less surprising.Binary.min_version=Nonenow clearly means "no version floor", loaded binaries are validated in one shared path after provider resolution, and provider-level install/update commands now thread version constraints forpip,npm,cargo, andgem.
from abx_pkg import Binary, env, brew
java = Binary(
name="java",
min_version="11.0.0",
binproviders=[env, brew],
).load_or_install()- 🍺 Improved provider resolution and version detection in the places that were tripping real installs. Brew lookups now search
libexec/binpaths in bothoptandCellar, brew install/update can skip post-install hooks by default, and the shared version parser now reads fromstderras well asstdout, which fixes tools likejava -version.
brew install --skip-post-install openjdk
java -version- 🧰 Fixed a few runtime sharp edges outside the installers. Lazy provider singletons and provider-name exports now read
model_fieldsfrom the class rather than assuming an instance shape, debug logging now falls back toClassName(...)whenrepr()is broken or expensive, and Ansible/Pyinfra provider imports are delayed throughimportlibso optional integrations fail later and more cleanly.
from abx_pkg import ALL_PROVIDER_NAMES, apt, pip
print(ALL_PROVIDER_NAMES)
print(apt, pip)- 🧪 Expanded coverage and release tooling substantially. The test suite gained focused checks for
min_version,stderrversion parsing, pip/npm security flags, pnpm workspace config updates, and logging safety, while CI now syncs all extras/groups and normalizesPNPM_HOMEhandling across Linux/macOS. The release script was also hardened so reruns can publish an already-bumped unreleased version, skip duplicate PyPI uploads, and avoid recreating an existing GitHub release.
uv sync --all-extras --all-groups
python -m unittest tests.TestSecurityControls
./bin/release.sh- 🔧 Refreshed
uv.lockmetadata to keep the lockfile aligned with the currentexclude-newerwindow used for reproducible installs.
v1.9.18
Highlights
This release tightens provider and release automation around real package lifecycle behavior.
- Simplifies release publishing by removing the separate publish workflow and having the release path publish artifacts directly before creating the GitHub release.
- Improves CI coverage for provider lifecycle tests, including the environment setup needed for pnpm-backed npm provider flows.
- Makes
NpmProviderset upPNPM_HOMEandPATHcorrectly whenpnpmis the resolved installer.
Included Changes
- removed
.github/workflows/publish.yml - passed
PYPI_PAT_SECRETthrough the release workflow intobin/release.sh - updated
bin/release.shto publish distributions before cutting the release - tightened provider tests around update, uninstall, and bootstrap behavior
Artifacts
Attached to this release:
- source distribution (
.tar.gz) - universal wheel (
.whl)
v1.9.15
Highlights
PipProvidernow prefersuv pipfor install/show/uninstall operations and falls back to plainpipwhenuvis unavailable.- New
pip_venvenvironments bootstrapuvlazily alongsidepipandsetuptools. - Absolute
PIP_BINARYoverrides are now respected, including duringpip_venvsetup.
npm / pnpm
NpmProvidernow preferspnpmwhen available and falls back tonpmotherwise.pnpmis bootstrapped lazily on the first install instead of requiring preinstallation.npm_prefix=...is preserved forpnpmoperations using prefix-scoped commands.- Absolute
NPM_BINARYoverrides still win overpnpmauto-selection.
Other Changes
- Added
DRY_RUN=1environment support on top of provider-level dry-run mode. - Lowered the default package logging level to
WARNING. - Added
bin/release.sh, updatedbin/publish.sh, and added GitHub Actions workflows for release-state validation and PyPI publishing. - Expanded unit and live coverage for the new pip/npm execution paths.
Validation
uv run prek run --all-files- Focused pip/npm unit tests via
uv run python -m unittest ... - Live npm and pip lifecycle tests via
uv run python -m unittest tests.LiveUpdateAndUninstallTest... uv build
v1.9.14: Provider lifecycle fixes and full type-checking coverage
- Added
prek-driven quality gates withruff,ty, andpyright, and expanded static type coverage acrossabx_pkg,tests.py, and the Django example project - Fixed provider lifecycle regressions, including canonical brew formula binary resolution, stale-path uninstall handling, and a shared install-cache bug that broke real
uninstall -> installverification flows across multiple providers - Hardened optional integrations and runtime checks for
rich,ansible, andpyinfra, including accurate optional-dependency detection and safer installer import/dispatch behavior - Cleaned up runtime typing edges in settings, admin, views, logging, semver, and provider overrides without papering over errors with
Any,cast, ortype: ignore - Verified the release against live package-manager lifecycle tests and a fully clean
prek run --all-files
Full Changelog: v1.9.5...v1.9.14
v1.9.5: Logging overhaul with opt-in Rich output and cleaner fallback traces
Highlights
- Added package-wide, idiomatic Python logging with opt-in configuration via
configure_logging(...)and optional Rich support viaconfigure_rich_logging(...)andabx-pkg[rich]. - Cleaned up debug traces so they focus on the useful flow: internal underscore helpers and provider-selection noise are omitted, lifecycle logs read more naturally, and return logs mirror the original call shape.
- Improved failure logging for multi-provider fallback paths so intermediate provider failures stay at
DEBUG, while only the final all-providers-failed result emits a single call-shapedERROR ... raised ...line. - Updated
Binary(...)andShallowBinary(...)rendering to includeabspath,version, and a shortened trailing SHA suffix for easier trace inspection. - Expanded logging and provider regression coverage, including single-provider fallback, multi-provider fallback success, and full failure cases.
Notes
- Rich output remains opt-in and does not change default stdlib logging behavior.
- README logging docs were already in good shape and remain concise.
- Verification on the release commit:
uv run pytest tests.py -q->62 passed, 11 skipped.
v0.7.1: Added lazy provider singletons, rich logging, and stronger CI coverage
Highlights
- Added lazy provider singleton imports such as
from abx_pkg import apt, brew, pip, npm, env, instantiated on first access and cached for reuse. - Added package-level logging helpers with opt-in Rich support via
configure_logging(...),configure_rich_logging(...), and theabx-pkg[rich]extra. - Strengthened live lifecycle coverage and CI reliability across macOS and Linux, including better Nix/Docker setup and clearer live-test diagnostics.
- Refreshed the README and examples around the simplified provider API and new logging configuration options.
Lazy Provider Singletons
Built-in providers are now available as explicit lazy imports:
from abx_pkg import apt, brew, pip, npm, envThis keeps common usage concise without eagerly instantiating every provider at import time. To preserve that laziness, provider singleton names are intentionally excluded from from abx_pkg import *; use explicit imports when you want the cached singleton instances.
Logging
This release adds a dedicated abx_pkg.logging module and re-exports the main helpers from abx_pkg:
loggerandget_logger(...)for standard package-scoped loggingconfigure_logging(...)for stdlib handler setupconfigure_rich_logging(...)for colorized terminal output whenrichis installed
abx-pkg still stays quiet by default unless your application configures logging explicitly.
Validation
uv run pytest tests.py -q(57 passed, 11 skipped)
Full Changelog: v0.7.0...v0.7.1
v0.7.0: Added cargo/gem/go_get/nix/docker providers and install_args overrides
Highlights
- Added built-in
CargoProvider,GemProvider,GoGetProvider,NixProvider, andDockerProvidersupport out of the box. - Expanded destructive end-to-end lifecycle coverage and CI for package-manager workflows across macOS and Linux.
- Renamed binary override key
overrides.packagestooverrides.install_argsthroughout the provider API.
New BinProviders
This release adds first-class support for:
cargogemgo get/go installviaGoGetProvidernixdocker
DockerProvider uses image refs as install args, writes local wrapper shims that execute via docker run, and reports the image tag as the loaded version.
Override API Change
Binary.overrides[provider_name]['packages'] has been renamed to Binary.overrides[provider_name]['install_args'].
If you were customizing install targets before, update code like this:
# before
overrides = {
'pip': {'packages': ['yt-dlp[default,curl-cffi]']},
'docker': {'packages': ['koalaman/shellcheck:v0.10.0']},
}
# after
overrides = {
'pip': {'install_args': ['yt-dlp[default,curl-cffi]']},
'docker': {'install_args': ['koalaman/shellcheck:v0.10.0']},
}The compatibility work in this release keeps the provider internals aligned around install_args, including install/update/uninstall flows and provider override resolution.
Validation
- Standard test suite passes locally.
- Live destructive lifecycle tests were exercised locally for the new providers (
cargo,gem,go_get,nix,docker).
v0.6.5: Added update/uninstall APIs with live CI coverage across providers
- ✨ Added first-class
update()anduninstall()APIs to bothBinaryandBinProvider, with built-in implementations forbrew,npm,pip,apt,pyinfra, andansible - ✅ Added rigorous live end-to-end lifecycle tests that run real
install -> update -> uninstallflows in isolatednpm/pipenvironments and real host package managers where available - 🤖 Fixed
AnsibleProviderso thecommunity.general.homebrewmodule works correctly on Apple Silicon by resolving the realbrewpath and forcingansible-runnerto use the active venv toolchain - 🧪 Expanded CI to run the destructive package-manager tests on both
ubuntu-latestandmacOS-latest, with Python3.11,3.12,3.13, and3.14 - 📝 Updated the README to document the new lifecycle methods and removed the completed TODO for update/remove actions
Full Changelog: v0.6.4...v0.6.5
v0.6.4: Consistent euid handling across providers with safer Docker/root installs
- 🦸 Unified
euiddetection inBinProviderso providers share the same UID-selection rules - 🐳 Kept global
npmandpipinstalls running as real root in Docker/container environments while still respecting owned prefixes / venvs for local installs - 🙋 Added fallbacks for current UIDs that do not exist in
/etc/passwd, preventing provider exec from crashing in containerized environments - 🧪 Added regression tests for unmapped installer-owner UIDs, root/global install behavior, and prefix-owner precedence
- 📦 Bumped packaging metadata and refreshed dependencies for the
0.6.4release line
Full Changelog: v0.6.1...v0.6.4