From b9d5569a3859b846aa596f1191a2bcd3f0d7203c Mon Sep 17 00:00:00 2001 From: Rahul Krishna Date: Sat, 5 Sep 2026 20:52:25 -0400 Subject: [PATCH] fix(neo4j): dump the entrypoint report through the pydantic compat shim `:PyApplication.entrypoint_report_json` called `model_dump()` on the report, a pydantic v2 method. The Python 3.10 leg of the release gate resolves pydantic 1.x, where every `--emit neo4j` run raised. Route it through `codeanalyzer.schema.model_dump`, which maps to `.dict()`/`.json()` on v1. Verified under pydantic 1.10.26 and 2.x. --- codeanalyzer/neo4j/project.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/codeanalyzer/neo4j/project.py b/codeanalyzer/neo4j/project.py index 087d74d..cbfc50c 100644 --- a/codeanalyzer/neo4j/project.py +++ b/codeanalyzer/neo4j/project.py @@ -48,6 +48,7 @@ PyModule, PyVariableDeclaration, ) +from codeanalyzer.schema import model_dump from codeanalyzer.schema.ids import application_id, global_ordinal, purl_pypi from codeanalyzer.schema.py_schema import PyDecorator @@ -76,7 +77,7 @@ def project(app: PyApplication, app_name: str, sig_to_id: dict, # pass found nothing". Always present, even when empty. "entrypoint_frameworks": list(app.entrypoint_report.frameworks_detected), "entrypoint_report_json": json.dumps( - app.entrypoint_report.model_dump(), sort_keys=True + model_dump(app.entrypoint_report, mode="json"), sort_keys=True ), } ),