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

refactor: replace deprecated package distutils #118

Conversation

PauloASilva
Copy link
Contributor

distutils was deprecated and removed in Python 3.12 1.

distutils.dir_util.copy_tree function can be replaced by the shutil.copytree counterpart.

`distutils` was deprecated and removed in Python 3.12 [1].

`distutils.dir_util.copy_tree` function can be replaced by the `shutil.copytree`
counterpart.

[1]: https://docs.python.org/3.10/whatsnew/3.10.html#distutils-deprecated
@bih
Copy link
Collaborator

bih commented Jan 3, 2024

Fixes #117

@bih bih added the bug Something isn't working label Jan 3, 2024
@bih
Copy link
Collaborator

bih commented Jan 3, 2024

@PauloASilva Looks like we'll need to either drop support for Python 3.7, or there is an issue being raised regarding the copytree method: TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'

@bih
Copy link
Collaborator

bih commented Jan 3, 2024

I have added dropping Python 3.7 in the discussion in #119

@PauloASilva
Copy link
Contributor Author

Hi @bih,

@PauloASilva Looks like we'll need to either drop support for Python 3.7, or there is an issue being raised regarding the copytree method: TypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'

Indeed, the dirs_exist_ok argument does not exist on Python 3.7.

To be honest I didn't consider supporting earlier Python versions. Since this is a breaking change, including it on a major release should be OK. In case you think otherwise I believe we can workaround it this easily.

Cheers,
Paulo A. Silva

@bih
Copy link
Collaborator

bih commented Jan 4, 2024

I think it's fine to not include it for now. If this is an issue that arises later, I'm happy to address that in a separate PR. I'll go ahead and include this as part of the #120 PR (and it should include the correct attribution) so I can close this.

Thank you so much again for this PR!

@bih bih closed this Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants