chilcote/outset

"Distutils is deprecated"

LouisDchrfP opened this issue · 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

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

Hi,
Running Big Sur 11.6.1 on a M1 MacBook Pro

python --version Python 2.7.16

python3 --version Python 3.10.0

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 🙄

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.

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.