backstage / mkdocs-monorepo-plugin

✚ Build multiple documentation folders in a single Mkdocs. Designed for large codebases.
https://backstage.github.io/mkdocs-monorepo-plugin/
Apache License 2.0
329 stars 74 forks source link

refactor: replace deprecated package `distutils` #118

Closed PauloASilva closed 10 months ago

PauloASilva commented 11 months ago

distutils was deprecated and removed in Python 3.12 1.

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

bih commented 10 months ago

Fixes #117

bih commented 10 months ago

@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 commented 10 months ago

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

PauloASilva commented 10 months ago

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 commented 10 months ago

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!