Skip to content

Releases: modern-python/db-retry

0.5.1

Choose a tag to compare

@github-actions github-actions released this 01 Jul 20:44
9b7c836

db-retry 0.5.1 — release pipeline on PyPI Trusted Publishing

No library changes. The package is identical to 0.5.0; this release exercises the new publish path end-to-end.

CI

  • Releases now authenticate to PyPI via Trusted Publishing (OIDC) instead of a long-lived PYPI_TOKEN secret. uv publish auto-detects the GitHub Actions id-token; the release job runs under a pypi environment that scopes the trusted publisher (#29).

Downstream

No action required. Nothing about the installed package changes.

0.5.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 12:39
ab72b64

db-retry 0.5.0 — Python 3.11 and 3.12 support

The supported Python floor drops from 3.13 to 3.11. db-retry now runs on
Python 3.11, 3.12, 3.13, and 3.14. There are no behavior or public-API
changes
— the five public symbols (postgres_retry,
build_connection_factory, build_db_dsn, is_dsn_multihost, Transaction)
and their signatures are unchanged.

What changed

  • requires-python is now >=3.11,<4 (was >=3.13), with matching PyPI
    classifiers for 3.11 and 3.12.
  • postgres_retry's generics were rewritten off PEP 695. The type alias
    statements and def postgres_retry[**P, T] syntax (3.12+ only) became
    module-level typing.ParamSpec/TypeVar with TypeAlias aliases. No new
    dependency — those are stdlib since 3.10. The decorator's behavior and the
    two call forms (@postgres_retry / @postgres_retry(retries=N)) are
    identical.

Downstream

No action needed beyond the wider version support — no API or behavior change.
A drop-in upgrade from 0.4.3 for projects already on 3.13+, and now installable
on 3.11 and 3.12.

Internals

  • The refactor landed test-first with 100% coverage maintained.
  • CI now runs the suite on a Python 3.11/3.12/3.13/3.14 matrix, with each leg
    pinned to its target interpreter so every version is genuinely exercised.

0.4.3

Choose a tag to compare

@github-actions github-actions released this 26 Jun 21:22
2780205

db-retry 0.4.3 — internal architecture refactors, no API change

A maintenance release. Two capabilities were restructured for testability and
navigability; there are no behavior or public-API changes — the five public
symbols (postgres_retry, build_connection_factory, build_db_dsn,
is_dsn_multihost, Transaction) and their signatures are unchanged.

Internal refactors

  • Retriable-error predicate seam. The retry decision (cause-chain walk +
    asyncpg/SQLSTATE classification) moved out of postgres_retry's internals into
    a pure is_retriable(exc) -> bool (new internal db_retry/retriable.py), with
    the retry-loop logging kept in a thin wrapper. The classification is now
    unit-tested in memory instead of through a live-Postgres round-trip. Same
    retriable classes (40001, class 08), same logs, same surfaced exception.
  • Connection factory split. build_connection_factory was split into a pure
    build_connection_plan(url) -> ConnectionPlan (URL parse, host/port pairing,
    shuffle, multi/single-host branch) and a thin failover loop with a single
    asyncpg.connect call site. Host-plan parsing is now testable without mocking
    asyncpg.connect. Same two-stage primary→failover strategy, same exceptions,
    same load-balancing behavior.

Downstream

No action needed — no API or behavior change. A drop-in upgrade from 0.4.2.

Internals

  • Both refactors landed test-first with 100% coverage maintained.
  • Planning convention upgraded to 1.1.0 (adds the architecture/glossary.md
    ubiquitous-language page).

0.4.2

Choose a tag to compare

@lesnik512 lesnik512 released this 30 May 12:01
d00e7ed

What's Changed

  • Retry on advanced-alchemy wrapped exceptions by @lesnik512 in #12

Full Changelog: 0.4.1...0.4.2

0.4.1

Choose a tag to compare

@lesnik512 lesnik512 released this 11 Apr 15:50
327f845

What's Changed

Full Changelog: 0.4.0...0.4.1

0.4.0

Choose a tag to compare

@lesnik512 lesnik512 released this 11 Apr 10:51
c134ba1

What's Changed

Full Changelog: 0.3.0...0.4.0

0.3.0

Choose a tag to compare

@lesnik512 lesnik512 released this 21 Dec 06:25
a4b9a86

What's Changed

Full Changelog: 0.2.2...0.3.0

0.2.2

Choose a tag to compare

@lesnik512 lesnik512 released this 14 Nov 10:44
bec48ed

What's Changed

Full Changelog: 0.2.1...0.2.2

0.2.1

Choose a tag to compare

@lesnik512 lesnik512 released this 09 Nov 05:53
1fb1b8d

What's Changed

Full Changelog: 0.2.0...0.2.1

0.2.0

Choose a tag to compare

@lesnik512 lesnik512 released this 08 Nov 16:37
2d14632

What's Changed

  • rename to db-try, sync with internal version by @lesnik512 in #3

Full Changelog: 0.1.1...0.2.0