3.13.132
fix(firebird): close the adapter's connection on GC (no unraisable warning)
Dropping a Database backed by Firebird WITHOUT calling close() let
firebird-driver's OWN Connection finalizer run a rollback on a stale/aborted
transaction handle at GC time -- "invalid transaction handle (expecting
explicit transaction start)" -- which the interpreter reports via
sys.unraisablehook and pytest surfaces as a PytestUnraisableExceptionWarning.
Multiple cross-engine contract tests (write_path, adapter_conformance, etc.)
build a Firebird Database per engine and drop it without close(), so this was
teardown noise across the whole suite.
Give FirebirdAdapter a del that resolves any open transaction and detaches
first, so the driver's finalizer finds an already-closed connection and stays
silent (FB-DEL-CLOSE). It swallows everything: del can run during
interpreter shutdown and on an already-dead connection.
Named lock-in tests/test_firebird_adapter_gc.py captures sys.unraisablehook,
aborts a transaction (duplicate-key insert), drops the only reference and forces
gc: it FAILS on the unraisable before the fix, passes after. Verified on the lab
as root -- the reproducing 469-test cross-engine subset is clean under
-W error::pytest.PytestUnraisableExceptionWarning.
Python-driver-specific (firebird-driver's Connection finalizer); parity checked
against the PHP/Ruby/Node Firebird adapters.