Skip to content

remove_dir_tree parameters fix for python 3.10#4310

Merged
porlows1 merged 1 commit into
mainfrom
porlows1_rmtree_fix
Jun 22, 2026
Merged

remove_dir_tree parameters fix for python 3.10#4310
porlows1 merged 1 commit into
mainfrom
porlows1_rmtree_fix

Conversation

@porlows1

Copy link
Copy Markdown
Collaborator

🛠 Summary

Fix remove_dir_tree shutil.rmtree parameters for python older than 3.12

🧪 Checklist

  • [-] Unit tests added.
  • [-] The documentation updated.
  • [+] Change follows security best practices.
    ``

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the functional test utility remove_dir_tree() to be compatible with Python versions older than 3.12 by selecting the correct shutil.rmtree callback parameter (onerror vs onexc).

Changes:

  • Added a Python version check to pass onexc on Python 3.12+ and onerror on older versions.
  • Added the required sys import to support the runtime version check.

@porlows1 porlows1 requested a review from pgladkows June 22, 2026 12:43
@porlows1 porlows1 merged commit 9bbe9df into main Jun 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants