v1.9.22
✨ Highlights
-
🔒 Security defaults now propagate consistently across binaries and providers.
BinProvidernow owns defaultpostinstall_scriptsandmin_release_agevalues, andBinaryinherits them automatically when you don't override them explicitly.- Unsupported providers now fail closed instead of silently ignoring security constraints.
provider = EnvProvider(postinstall_scripts=True, min_release_age=4) binary = Binary(name="python", binproviders=[provider]) assert binary.postinstall_scripts is True assert binary.min_release_age == 4
-
⬆️
min_versionis enforced end-to-end instead of only being advisory.install()andupdate()now validate the resolved version after the package manager runs.load_or_install()will upgrade an already-installed binary when it exists but does not satisfy the requested minimum version.
binary = provider.load_or_install("black", min_version=SemVer("24.0.0"))
-
📦 Provider install/update plumbing is more explicit and consistent.
- Core handler signatures now thread
postinstall_scripts,min_release_age, andmin_versionthrough setup/install/update paths. pipandnpmexplicitly declare support for release-age and postinstall controls.brewonly uses Pyinfra/Ansible helper paths when postinstall scripts are allowed, and otherwise falls back to direct CLI invocations with the right flags.- Timeout settings are preserved through provider copies via model fields instead of hidden underscored state.
- Core handler signatures now thread
-
🧪 Tests were expanded around the new behavior and cleaned up for strict type-checking.
- Added fail-closed coverage for providers that cannot honor
min_release_ageor disabled postinstall scripts. - Added live tests for
pipminimum-version upgrades andnpmpostinstall-script overrides. - Tightened the test helper typing so
ty-checkandpyrightpass withoutcast,Any, ortype: ignoreshortcuts.
def is_install_args_sequence(value: object) -> TypeGuard[InstallArgs]: return isinstance(value, (tuple, list)) and all(isinstance(item, str) for item in value)
- Added fail-closed coverage for providers that cannot honor
-
🏷️ Release metadata
- Version bumped to
1.9.22. uv.lockrefreshed to match the new package version.
- Version bumped to