Make list-all script non-dependent on python to avoid library/versioning issues #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change was done because the
list-all
script (used byasdf list all pipenv
command) is curerntly failing for modern python versions (tested on 3.12+, not sure about earlier ones). This happens because thepkg_resources
library that's referenced in the inline python script previously used inlist-all
has been deprecated andpackaging.version
replaced it for newer python versions.But
packaging.version
is now a non-core library, so using it entails adding a required package dependency in order for the plugin to work effectively on newer python versions. To avoid this, I've removed the python logic altogether and replaced it by plain bash + common utils.It's a bit messy and likely vulnerable to changes in PyPi's json format/structure changes, but I figure that's a lesser problem than having to deal with python versioning + library dependencies.