outset icon indicating copy to clipboard operation
outset copied to clipboard

"Distutils is deprecated"

Open LouisDchrfP opened this issue 2 years ago • 5 comments

Hi !

This appear when running the outset command (cleanup or loading a script folder)

./outset --boot /usr/local/outset/./outset:38: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.version import StrictVersion as version Boot processing complete

LouisDchrfP avatar Nov 17 '21 09:11 LouisDchrfP

Hey @LouisDchrfP what python did you install? What OS are you running? Please include information otherwise we can't tell what's going on.

arubdesu avatar Nov 17 '21 10:11 arubdesu

Hi, Running Big Sur 11.6.1 on a M1 MacBook Pro

python --version Python 2.7.16

python3 --version Python 3.10.0

LouisDchrfP avatar Nov 17 '21 10:11 LouisDchrfP

I reproduced this with current python.org 3.10, although it's just log noise and doesn't functionally stop outset from working. This DeprecationWarning is explained in the listed PEP, which doesn't have a proposed alternative in stdlib, so I'm inclined to say we should ignore it on purpose (a la this SO post) until they kill distutils altogether 🙄

arubdesu avatar Nov 17 '21 12:11 arubdesu

There's another alternative, which is copying the .version module code local to outset and then the import goes away, which may be less work and stop the worry about total removal from python3.

arubdesu avatar Nov 18 '21 15:11 arubdesu

There is a pkg_resources module which has some version utilities in it per https://stackoverflow.com/a/57634066. The usual catches about making sure it works appropriately apply.

carlashley avatar Dec 20 '21 23:12 carlashley