Skip to content

test: read the db clock with scalar_one so ty accepts it under sqlalchemy 2.1 - #193

Merged
lesnik512 merged 1 commit into
mainfrom
test/sqlalchemy-2.1-scalar-typing
Sep 25, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
test/sqlalchemy-2.1-scalar-typing

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Fixes the red lint leg of the scheduled dependency check (run 36128642533).

SQLAlchemy 2.1.0 retyped Result.scalar() from Any to Optional[_T], so ty 0.0.84 reports Any | None + timedelta in test_mark_pending_with_lease_uses_db_clock. SELECT clock_timestamp() always returns exactly one row, so scalar_one() states the real contract and is what the next_at read two lines below already uses.

Test-only; no floor or cap change. Verified: just lint-ci green on sqlalchemy 2.0.54 and 2.1.0; tests/test_integration.py 89 passed against Postgres.

@github-actions

Copy link
Copy Markdown

Benchmark gate

✅ gate passed

scenario msg/s delete/msg WALrec/msg WALB/msg fpi upd del dead_tup
consumer/w1/b10 980 1.000 6.79 919 242 5000 5000 10000
consumer/w1/b100 965 1.000 6.83 918 243 5000 5000 10000
consumer/w2/b10 1138 1.000 6.78 950 242 5000 5000 10000
consumer/w2/b100 1333 1.000 6.73 957 243 5000 5000 10000
consumer/w4/b10 1015 1.000 6.82 995 261 5000 5000 10000
consumer/w4/b100 1502 1.000 6.86 1036 244 5000 5000 10000
consumer/w1/b100/tfbs100 5257 0.010 6.07 1116 243 5000 5000 10000
producer/w1/b100 2203 0.000 3.04 584 0 0 0 0

Gated (fails the build): delete_calls + tuple counters (upd/del/ins) + the producer's insert_calls, exact; select_calls within +2; wal_records within a 10% band. msg/s, WAL bytes and total calls are informational (timing/FPI noise).

@lesnik512
lesnik512 merged commit f4d7888 into main Sep 25, 2026
13 checks passed
@lesnik512
lesnik512 deleted the test/sqlalchemy-2.1-scalar-typing branch September 25, 2026 13:23
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.

1 participant