Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ dependencies = [
"psutil==7.2.2",
"psycopg[binary]>=3.2,<4.0",
"pyarrow==25.0.0",
"sqlalchemy>=2.0,<3.0",
# Capped below the next minor, not the next major: SQLAlchemy 2.1 retyped `Result`,
# which failed the type gate, so moving past 2.1 is a deliberate bump.
"sqlalchemy>=2.0,<2.2",
"tzdata==2026.3",
"uvicorn==0.52.1",
]
Expand All @@ -38,6 +40,7 @@ test = [
]
dev = [
"idea2strategy-backtest-engine[test]",
# The same release data-pipeline pins, so the two type gates agree. Bump both together.
"mypy==2.3.0",
"mutmut==3.3.1",
"ruff==0.16.1",
Expand Down
2 changes: 1 addition & 1 deletion src/backtest_engine/backtest_request_intake.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def claim(
)
return RequestClaim(RequestClaimDisposition.CLAIMED)

latest = connection.execute(
latest: int = connection.execute(
text(
"""
SELECT COALESCE(MAX(o.aggregate_sequence), 0)
Expand Down
2 changes: 1 addition & 1 deletion tests/persistence/test_money_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_numeric_24_8_round_trips_without_precision_loss(persistence: BacktestPe
with persistence.unit_of_work() as uow:
stored = uow.runs.get(row.id).initial_cash_amount
# `==` on Decimal ignores trailing zeros, so read the stored digits as text too.
stored_text = uow.connection.execute(
stored_text: str = uow.connection.execute(
text("SELECT initial_cash_amount::text FROM backtest.runs WHERE id = :id"),
{"id": str(row.id)},
).scalar_one()
Expand Down
2 changes: 1 addition & 1 deletion tests/persistence/test_runtime_no_ddl.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,6 @@ def test_ddl_really_did_not_happen(persistence: BacktestPersistence, admin_engin
uow.connection.execute(text("CREATE TABLE backtest.sneaky (id uuid PRIMARY KEY)"))

with admin_engine.connect() as connection:
exists = connection.execute(text("SELECT to_regclass('backtest.sneaky') IS NOT NULL")).scalar_one()
exists: bool = connection.execute(text("SELECT to_regclass('backtest.sneaky') IS NOT NULL")).scalar_one()

assert exists is False
Loading