Skip to content

Commit 341de48

Browse files
olivermeyerclaude
andcommitted
fix(test): fix lowest-direct test suite failures
- Use getattr for LogRecord.taskName which was added in Python 3.12; on Python 3.11 it raises AttributeError - Bump SQLAlchemy lower bound to >=2.0.31, the first version with the postgresql-psycopgbinary extra; older versions lack it so psycopg-binary is never installed, breaking chancy imports at lowest-direct resolution Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f3e8f14 commit 341de48

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dependencies = [
6161
"python-dotenv>=1,<2",
6262
"rich>=15,<16",
6363
"sentry-sdk>=2,<3",
64-
"sqlalchemy[postgresql-psycopgbinary,asyncio]>=2,<3",
64+
"sqlalchemy[postgresql-psycopgbinary,asyncio]>=2.0.31,<3", # >=2.0.31: first version with postgresql-psycopgbinary extra
6565
"chancy[cron]>=0.25.1,<1",
6666
"nicegui>=3,<4",
6767
"truststore>=0.9,<1",

src/aignostics_foundry_core/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def patcher(record_dict: "Record") -> None:
101101
if record.threadName and record.thread:
102102
record_dict["thread"].id = record.thread
103103
record_dict["thread"].name = record.threadName
104-
if record.taskName:
104+
if getattr(record, "taskName", None): # taskName added in Python 3.12
105105
record_dict["extra"]["logging.taskName"] = record.taskName
106106
record_dict["name"] = record.name
107107
record_dict["function"] = record.funcName

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)