Skip to content
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

replace deprecated/removed distutils copy_tree with shutil copytree #10734

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jordivandooren
Copy link

Resolves #

There is no suitable issue template for external contributors, please create one if this seems useful.

Problem

The deprecated (and in Python 3.12, removed) distutils is still referred to in happy_path_fixture.py. This could lead to problems in integration test runs.

Solution

Replace distutils.dir_util.copy_tree with shutil.copytree, which has very similar behavior.

For reference, see distutils docs:

Copy an entire directory tree src to a new location dst. Both src and dst must be directory names. If src is not a directory, raise DistutilsFileError. If dst does not exist, it is created with mkpath().

and shutil docs:

Recursively copy an entire directory tree rooted at src to a directory named dst and return the destination directory. All intermediate directories needed to contain dst will also be created by default.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@jordivandooren jordivandooren requested a review from a team as a code owner September 18, 2024 09:35
@cla-bot cla-bot bot added the cla:yes label Sep 18, 2024
@github-actions github-actions bot added the community This PR is from a community member label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes community This PR is from a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant