With distutils being removed, the one thing that I couldn’t find a suitable replacement for was distutils.version.LooseVersion, as packaging.version.LegacyVersion was being deprecated and in any event didn’t have quite the same semantics.
100% of the goal is to allow people to keep their existing code working by changing an import line and adding a dependency, not to “improve” it in any way. I have made only two changes to the code:
Added compatibility with distutils.version.LooseVersion so that they can be freely compared if they somehow end up in the same scope.
Added type annotations.
I guess a couple big projects started to depend on it, as I got an email from PyPI indicating that it’s a “critical project”. It seems I need to attract an additional maintainer to make me less of a single point of failure.
I was wondering if it would be appropriate to move it under an organization with wider visibility like PyPA, which might make it easier to attract another maintainer and give others the authority to assign new maintainers if I fall off the internet.
Ou of curiosity, how does LooseVersion manage versions? The README didn’t make that clear and I’ve never heard of that module before. The only point of comparison I have is SemVer (not any package in particular but the concept) and I’m wondering how you get “looser” than SemVer while somehow (afaict) still get som structure in your version management.
Personally, I’m inclined to say it shouldn’t go under the PyPA banner, as it’s explicitly intended to allow people to not follow the accepted standard for versions. We’ve just removed “legacy version” support from packaging, so adding it back in a different project seems to send mixed messages.
Having said that, I can see the value of this as a transitional mechanism, so it’s not that I don’t see value in having the library.
FWIW I don’t think it’s transitional. If someone is working with Python packages, they should use packaging.version. The main use case I have is for managing non-Python resources where raising exceptions because they don’t follow PEP440 is counterproductive.
I do see your point that we shouldn’t imply that it’s for use in Python packaging by putting it under PyPA. Thanks for the feedback.
For that use case, I don’t think the class should be called a loose version. It’s not loose, it’s conforming to a different standard than PEP 440. Or call it something like GenericVersion with documentation explicitly noting that it’s for parsing versions of non-Python projects.
If the use case you’re targetting isn’t parsing old, pre-PEP440 Python package versions (the transitional case I assumed was the intention) then the fact that it’s historically from distutils is basically irrelevant at this point, and the current documentation needs updating to note that Python packages are not the intended use for this.