You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace usage of deprecated distutils.(file|dir)_util (#10530)
Summary:
X-link: facebook/FAI-PEP#543
`distutils` has been deprecated since Python 3.10, and [removed in Python 3.12](https://docs.python.org/3/whatsnew/3.12.html#distutils).
Existing usage will now raise the following error under Python 3.12+:
```
ModuleNotFoundError: No module named 'distutils'
```
This diff replaces `distutils` usage according to [PEP-632 migration advice](https://peps.python.org/pep-0632/#migration-advice).
---
I generated this diff by looking for all usages of `distutils.*copy_(tree|file)` and replaced them with `shutil.copy(tree|file)`. These should be close to drop-in replacements!
Reviewed By: itamaro, mergennachin
Differential Revision: D73804939
0 commit comments