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

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


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

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.

>From 270147113a3e75dc62ddb66420813f1d82ffd26a Mon Sep 17 00:00:00 2001
From: Michael Kruse <michael.kruse at amd.com>
Date: Mon, 16 Feb 2026 15:07:53 -0600
Subject: [PATCH] [CI][ScriptedBuilder] Avoid python 3.12-only option

The shutil.rmtree(onexc=) parameter was only added in Python 3.12. Use onerror= instead whose callback signature takes a different third parameter which we ignore anyway.
---
 .ci/buildbot/worker.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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):



More information about the llvm-commits mailing list