ofek / hatch-vcs

Hatch plugin for versioning with your preferred VCS
MIT License
104 stars 15 forks source link

Don’t use deprecated shutil.rmtree(onerror=…) in Python 3.12+ (alternative approach) #53

Closed musicinmybrain closed 1 year ago

musicinmybrain commented 1 year ago

The replacement is shutil.rmtree(onexc=…), which receives the exception instead of the sys.exc_info() tuple as the third argument.

Unfortunately, explicitly testing the Python version number seems to be required. See also https://github.com/pypa/pip/pull/12137.

This accomplishes the same goal as https://github.com/ofek/hatch-vcs/pull/52, but approaches it very differently.

ofek commented 1 year ago

Thanks!