tvm icon indicating copy to clipboard operation
tvm copied to clipboard

fix: use shutil instead of disutils and fix template syntax

Open Alec4r opened this issue 1 year ago • 3 comments

Description

This PR is for:

  1. fix the error that is appearing with the new python versions: I have changed the code to use shutil instead of distutils and I have refactored it.

File "/home/edunext/.local/share/pipx/venvs/tutor-version-manager/lib/python3.12/site-packages/tvm/environment_manager/infrastructure/environment_manager_git_repository.py", line 7, in <module> from distutils.dir_util import copy_tree # pylint: disable=W0402 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'distutils'

  1. Fix the SyntaxWarning message: /home/edunext/Documents/eduNEXT/tvm/tvm/templates/tvm_activate.py:4: SyntaxWarning: invalid escape sequence '\$' TEMPLATE = '''

Alec4r avatar Jul 07 '24 22:07 Alec4r

@Alec4r, From what I've been seeing distutils was removed in Python3.12. I think it's perfect to use shutil instead.

BryanttV avatar Jul 22 '24 17:07 BryanttV

Hey @Alec4r, can we merge this PR since we have two approves already? Although there's a comment that needs to be addressed: https://github.com/eduNEXT/tvm/pull/75#discussion_r1686944177

mariajgrimaldi avatar Jul 31 '24 23:07 mariajgrimaldi

Can we also add a test to python3.12 here: https://github.com/eduNEXT/tvm/blob/main/.github/workflows/tests.yml#L19 and improve the PR/commit message to show that we are supporting python3.12?

MaferMazu avatar Sep 27 '24 20:09 MaferMazu