tools: debug_stream: set explicit ctypes layout - #11188
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The invalid ctypes layout prevents the module from importing in Python 3.14.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This pull request updates packed ctypes structures for Python 3.14 compatibility.
Changes:
- Adds explicit layouts to
CPUInfo,ThreadInfo, andTextMsg. - The configured
"gcc"layout is invalid and causes import-time failure.
File summaries
| File | Summary |
|---|---|
tools/debug_stream/debug_stream.py |
Adds layout declarations to packed debug-stream structures. |
Review details
Suppressed comments (2)
tools/debug_stream/debug_stream.py:69
"gcc"is not a valid ctypes layout name in Python 3.14 (the accepted names are"ms"and"gcc-sysv"), so importing this module raisesValueErrorwhile definingThreadInfo. Since this structure already uses_pack_, select the compatible MS layout explicitly.
_layout_ = "gcc"
tools/debug_stream/debug_stream.py:83
"gcc"is not a valid ctypes layout name in Python 3.14 (the accepted names are"ms"and"gcc-sysv"), so importing this module raisesValueErrorwhile definingTextMsg. Since this structure already uses_pack_, select the compatible MS layout explicitly.
_layout_ = "gcc"
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| """ | ||
|
|
||
| _pack_ = 1 | ||
| _layout_ = "gcc" |
There was a problem hiding this comment.
Obviously gcc-sysv is the correct choice. Github reviewer does not appear to have too much context about this project.
eb1004a to
a3fdd1d
Compare
The packed structs need extra definitions in python 3.14. Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
a3fdd1d to
8e4dcb5
Compare
|
This PR silences a warning on python-3.14, but unfortunately it did not help to get debug_stream working on NVL. Anyway I have tested that this still works on PTL and python-3.12. |
PR 11188: test resultsRun date: 2026-09-11 14:18 UTC Tested commit: 8e4dcb5862a38606bd15a5918135a795acd6f24b |
The packed structs need extra definitions in python 3.14.