- close() sets self._pool = None (in a finally, even on driver-error close) so a closed instance reports not-connected instead of masquerading as still-connected against a dead pool (the pool property now raises RuntimeError post-close as intended). - connect() is now guarded by an internal asyncio.Lock: concurrent connect() calls serialize instead of each racing to build + orphan its own live pool. Twin fix with mysql at the same Layer-1 signature level. - docstrings tightened (module header lifecycle/dsn notes, __init__ dsn note) with zero behavior change; re-verified against a real embedded postgres. verified against pixeltable-pgserver (test-only): 8 concurrent connect() calls now leave 0 orphaned pools + exactly 1 live pool (old: 7 orphaned, 8 live simultaneously); close() now flips the connected-check to False (old: stayed True against a dead pool). full layer-1/layer-2/transaction/concurrency regression suite still green. fresh-venv install confirms runtime purity (asyncpg only, no pixeltable-pgserver). bump v0.1.4 -> v0.1.5 Signed-off-by: disqualifier <dev@disqualifier.me>
16 lines
369 B
TOML
16 lines
369 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "psql"
|
|
version = "0.1.5"
|
|
description = "async postgres wrapper over asyncpg: two-layer API (friendly verbs + raw escape hatch), fail-loud, config-free"
|
|
requires-python = ">=3.10"
|
|
dependencies = [
|
|
"asyncpg>=0.29",
|
|
]
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/psql"]
|