digikey-api icon indicating copy to clipboard operation
digikey-api copied to clipboard

Remove distutils

Open xlxs4 opened this issue 6 months ago • 0 comments

distutils is deprecated and removed since python 3.12. This means that the package can not be used as a dependency in packages that aim to be compatible with python >3.11. To replace distutils, you can take a look at this SO thread and the referenced Migration Advice. The only use of distutils in your package is in https://github.com/peeter123/digikey-api/blob/bf24772fa55d6ed457bc5c862a9165985cff10a8/digikey/v3/api.py#L3. Specifically, you're using strtobool. As per the migration advice, strtobool doesn't come with a drop-in replacement and you'll have to reimplement it yourself accordingly. This PR from a different package (I'm sure there's more, that was the first result in my search) does exactly that, so you can get inspired or copy the definition. The specification for strtobool can be found here.

xlxs4 avatar Feb 06 '24 15:02 xlxs4