You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
python: a partial saved mesh raises no RuntimeWarning, exports hold the GIL, and the stub forbids kinds the binding returns #1884
Batch 5's audit of the Python surface (main at e57db42), each finding confirmed by a second reader. The docs row that still called a work-budget stop a ValueError is fixed in #1880.
A partial saved mesh warns nowhere. When an element's saved graphics decode only in part, the export keeps its box and counts it (saved_meshes.rs:634, export_pipeline.rs:703-709), but no RuntimeWarning is raised, though docs/python.md:436-437, __init__.pyi:355-356 and rvt-py/src/lib.rs:146-149 all promise one. Fix: warn from ExportNote::SavedMeshes { partial > 0 } the way work-budget stops warn.
Every export runs with the GIL held. There is no py.allow_threads in rvt-py/src/lib.rs: write_ifc (:208-263), rvt_to_ifc (:1139-1151), schedule_csv, export_diagnostics_json, decoded_elements and element_counts block every other Python thread for the whole decode. Fix: release the GIL around the Rust work, after checking what the handle shares across threads.
The stub forbids kinds the binding returns.python/rvt/__init__.pyi:34's TypedField union lists four kinds; the emitter also returns float, guid and string. A type-checked consumer is told those cannot happen.
A broken extension surfaces as a missing attribute.python/rvt/__init__.py:25 catches ImportError and passes, so a failed load of _rvt (a missing symbol, a wrong ABI) becomes AttributeError: module 'rvt' has no attribute 'RevitFile'. The comment there describes a layout pyproject.toml no longer builds. Fix: re-raise unless the module really is the flat layout.
A stream name from the file is interpolated bare into an error message (lib.rs:245), so a name with a newline or control characters forges lines in a log; the phase error quotes its input with {:?} (reader.rs:1503). Fix: quote it the same way.
Rows for the change (PR to follow, branch fix/1884-python-bindings at ab93cc57), registered before the run that reads them. The change: export_run warns on ExportNote::SavedMeshes { partial > 0 }; the decode, the STEP writer, the diagnostics serialisation and opening a file release the GIL; the stub lists the eleven field kinds and float; rvt/__init__.py no longer catches the extension's ImportError; and the unread-stream sentence quotes the name in one place, UnreadStream's Display (src/reader.rs), which rvt-ifc, rvt-gltf, rvt-rs-mcp, the diagnostics' warnings and Python all print.
No export moves: all 146 export hashes of an unfiltered run (samples nordic r2025 racadv holdout bimcollab families) equal main's.
diagnostics.json equal to main's on all 121, except a file that has an unread stream, whose Not read whole: warning now quotes the name; I expect none in Measure's models, none of which meets a default stream limit. If one differs, the only text that differs is the quotes.
The same-project gates check run passes (the change touches src/).
CI's Python job passes tests/python/test_package_import.py (a stand-in extension that is missing, raises ImportError, or loads) and, where Core Interior is present, tests/python/test_gil_released.py (a thread that ticks each millisecond waits less than a quarter of an export's time, for write_ifc and export_diagnostics_json).
Not measured by any row: the RuntimeWarning for a partial saved mesh on a real file (no sample in the corpus decodes in part; the code path is the same as the other notes').
Activity
DrunkOnJava commentedon Nov 13, 2026
Rows for the change (PR to follow, branch
fix/1884-python-bindingsatab93cc57), registered before the run that reads them. The change:export_runwarns onExportNote::SavedMeshes { partial > 0 }; the decode, the STEP writer, the diagnostics serialisation and opening a file release the GIL; the stub lists the eleven field kinds andfloat;rvt/__init__.pyno longer catches the extension'sImportError; and the unread-stream sentence quotes the name in one place,UnreadStream'sDisplay(src/reader.rs), whichrvt-ifc,rvt-gltf,rvt-rs-mcp, the diagnostics' warnings and Python all print.samples nordic r2025 racadv holdout bimcollab families) equalmain's.diagnostics.jsonequal tomain's on all 121, except a file that has an unread stream, whoseNot read whole:warning now quotes the name; I expect none in Measure's models, none of which meets a default stream limit. If one differs, the only text that differs is the quotes.same-project gatescheck run passes (the change touchessrc/).tests/python/test_package_import.py(a stand-in extension that is missing, raisesImportError, or loads) and, where Core Interior is present,tests/python/test_gil_released.py(a thread that ticks each millisecond waits less than a quarter of an export's time, forwrite_ifcandexport_diagnostics_json).Not measured by any row: the
RuntimeWarningfor a partial saved mesh on a real file (no sample in the corpus decodes in part; the code path is the same as the other notes').docs(python): a handle is used by one thread at a time, and a second …
test(viewer): the large-model retry test expects the unread stream's …
fix(python): a saved mesh that decodes in part warns, the decode rele…