[llvm] [CI][ScriptedBuilder] Avoid python 3.12-only option (PR #181746)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 16 13:17:38 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-infrastructure

Author: Michael Kruse (Meinersbur)

<details>
<summary>Changes</summary>

The shutil.rmtree(onexc=) parameter was only added in Python 3.12. Use onerror= instead whose callback signature takes a different third parameter which is ignored anyway.

---
Full diff: https://github.com/llvm/llvm-project/pull/181746.diff


1 Files Affected:

- (modified) .ci/buildbot/worker.py (+1-1) 


``````````diff
diff --git a/.ci/buildbot/worker.py b/.ci/buildbot/worker.py
index 09a6d0cb0d6c2..cbdc34a38ed1b 100644
--- a/.ci/buildbot/worker.py
+++ b/.ci/buildbot/worker.py
@@ -148,7 +148,7 @@ def rmtree(path):
     Taken from official Python docs
     https://docs.python.org/3/library/shutil.html#rmtree-example
     """
-    shutil.rmtree(path, onexc=_remove_readonly)
+    shutil.rmtree(path, onerror=_remove_readonly)
 
 
 def try_delete(path):

``````````

</details>


https://github.com/llvm/llvm-project/pull/181746


More information about the llvm-commits mailing list