diff --git a/python/scripts/update_stub_docstrings.py b/python/scripts/update_stub_docstrings.py index 44bd19bfdc8c..5ac424f138a0 100644 --- a/python/scripts/update_stub_docstrings.py +++ b/python/scripts/update_stub_docstrings.py @@ -264,7 +264,7 @@ def _create_importable_pyarrow(pyarrow_pkg, source_dir, install_pyarrow_dir): print("No .pyi files found in install tree, skipping docstring injection") sys.exit(0) - with tempfile.TemporaryDirectory() as tmpdir: + with tempfile.TemporaryDirectory(ignore_cleanup_errors=True) as tmpdir: pyarrow_pkg = Path(tmpdir) / "pyarrow" pyarrow_pkg.mkdir() _create_importable_pyarrow(pyarrow_pkg, source_dir, install_pyarrow_dir)