retry(fn, attempts=0) (or negative) silently returned None without ever calling fn, looking like success. floor attempts at max(1, attempts) so the callable always runs at least once; a failing call now fails loud after one try instead of no-op None. verified: attempts=0/-5 -> 1 call (sync + async); failing fn raises after 1 try; 31/31 retry regression intact. Signed-off-by: disqualifier <dev@disqualifier.me>
17 lines
433 B
TOML
17 lines
433 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "commons"
|
|
version = "0.2.1"
|
|
description = "small stdlib-only sync helpers: time/timezone deltas, dotted-path dict access, display masking, ip/address tooling, and retry/backoff"
|
|
requires-python = ">=3.10"
|
|
dependencies = []
|
|
|
|
[project.optional-dependencies]
|
|
addr = ["aiohttp>=3.9"]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/commons"]
|