digikey-api
digikey-api copied to clipboard
Remove distutils
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.