-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add builtin.PythonFinalizationError
#7966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1474,6 +1474,7 @@ pub fn init_module(vm: &VirtualMachine, module: &Py<PyModule>) { | |
| "TimeoutError" => ctx.exceptions.timeout_error.to_owned(), | ||
| "ReferenceError" => ctx.exceptions.reference_error.to_owned(), | ||
| "RuntimeError" => ctx.exceptions.runtime_error.to_owned(), | ||
| "PythonFinalizationError" => ctx.exceptions.python_finalization_error.to_owned(), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Check if exception_hierarchy.txt exists and verify PythonFinalizationError placement
echo "=== Checking exception_hierarchy.txt ==="
fd -t f 'exception_hierarchy' --exec cat {}
# Verify python_finalization_error field exists in the exceptions context
echo -e "\n=== Verifying python_finalization_error field exists ==="
rg -n 'python_finalization_error' --type rust
# Check for any related tests or documentation
echo -e "\n=== Checking for related tests ==="
rg -n 'PythonFinalizationError' --type rust -g '!builtins.rs'Repository: RustPython/RustPython Length of output: 14832 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "=== exception_hierarchy* files ==="
fd -t f 'exception_hierarchy' .
echo
echo "=== exception_hierarchy* occurrences of PythonFinalizationError ==="
for f in $(fd -t f 'exception_hierarchy' .); do
if rg -n 'PythonFinalizationError' "$f" >/dev/null; then
echo "-- $f"
rg -n 'PythonFinalizationError' "$f"
fi
done
echo
echo "=== builtins.rs context around line 1477 ==="
nl -ba crates/vm/src/stdlib/builtins.rs | sed -n '1455,1505p'
echo
echo "=== builtins.rs comment about exception_hierarchy.txt ==="
nl -ba crates/vm/src/stdlib/builtins.rs | sed -n '1405,1445p'
echo
echo "=== exceptions.rs definition of PyPythonFinalizationError base ==="
nl -ba crates/vm/src/exceptions.rs | sed -n '2425,2475p'Repository: RustPython/RustPython Length of output: 1964 Confirm
🤖 Prompt for AI Agents |
||
| "NotImplementedError" => ctx.exceptions.not_implemented_error.to_owned(), | ||
| "RecursionError" => ctx.exceptions.recursion_error.to_owned(), | ||
| "SyntaxError" => ctx.exceptions.syntax_error.to_owned(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are unrelated, but failed on my machine. I guess that they are skipped on thr CI