Skip to content

refactor(contracts): PoolDriver ABC, acquire contexts, balancer refactoring - #37

Merged
mosquito merged 7 commits into
refactor/1-foundationsfrom
refactor/2-contracts
Sep 4, 2026
Merged

mosquito merged 7 commits into
refactor/1-foundationsfrom
refactor/2-contracts

Conversation

@Pavkazzz

@Pavkazzz Pavkazzz commented Apr 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Stack 2/7 — driver and acquire contracts.

  • Add the generic PoolDriver interface.
  • Extract AcquireContext, TimeoutAcquireContext, and PoolAcquireContext.
  • Make balancer policies depend on a PoolStateProvider protocol instead of the concrete manager.
  • Keep runtime behavior compatible at this layer; the full PoolState implementation arrives in refactor(core): split base.py into pool_state, pool_manager, health #38.

Stack

Base: #36 (refactor/1-foundations)
Next: #38

Verification

  • Contract, acquire, policy, and balancer regressions passed in the affected local matrix.
  • Ruff and mypy passed.
  • Required GitHub CI: lint, mypy, and Python 3.10–3.14 PostgreSQL test matrix.

@Pavkazzz
Pavkazzz force-pushed the refactor/2-contracts branch 3 times, most recently from 726bd15 to d4a4c9c Compare April 16, 2026 07:25
Pavkazzz and others added 6 commits September 4, 2026 10:52
refactor(compat): preserve legacy import paths
refactor(drivers): extract drivers into hasql/driver/ package
refactor(core): split base.py into pool_state, pool_manager, health
@mosquito
mosquito merged commit 8e2639d into refactor/1-foundations Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants