--- id: looseversion version: "1.3.0" license: PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -------------------------------------------- 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or… (full text in the JSON record) license_treatment: permissive maintenance: active --- # looseversion — Version numbering for anarchists and software realists License: permissive · Maintenance: active · Downloads: 1.8M/mo ## What it is and what it does looseversion is a standalone implementation of the version comparison logic from Python's deprecated `distutils.version.LooseVersion`. It handles version strings that don't conform to PEP-440, such as those with arbitrary separators, mixed alphanumeric components, or non-standard ordering schemes. The package is designed as a drop-in replacement, maintaining identical comparison semantics and even allowing direct comparison between looseversion and distutils LooseVersion instances, so tools don't need to coordinate migrations across their dependency tree. You would use this when you need to parse and compare version numbers from external systems, legacy software, or heterogeneous sources that predate or ignore PEP-440. It's explicitly not recommended for comparing Python package versions—the description points to `packaging.version.Version` for that use case—but it's the right tool when you're working with version schemes outside your control. Use it for: - Compare versions from external APIs or systems that use non-standard version numbering schemes - Migrate away from distutils.version.LooseVersion without rewriting version comparison logic - Handle version strings from legacy software or heterogeneous sources in a single codebase - Maintain compatibility across dependencies that may still use the original distutils LooseVersion ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a drop-in replacement for the deprecated `distutils.version.LooseVersion` class, enabling flexible version comparison for non-PEP-440 version schemes. Yes, if you need to compare non-PEP-440 version strings and want to avoid the deprecated distutils module. It has no dependencies, is actively maintained, and carries a permissive license. Skip it if you're only comparing Python package versions—use packaging.version.Version instead. ## Install pip install looseversion uv add looseversion poetry add looseversion ## Installing looseversion Before you install: Installs with no dependencies and has been actively maintained since its initial release. The repository shows recent activity, making it a low-friction choice for projects that need LooseVersion functionality. License in practice: Licensed under the Python Software Foundation License, a permissive license that allows reproduction, modification, and distribution with minimal restrictions—suitable for most commercial and open-source projects. Quickstart: pip install looseversion from looseversion import LooseVersion LooseVersion("1.0.0") < LooseVersion("2.0.0") # Returns True Verify before relying: - Whether this package is maintained as a long-term replacement or a temporary bridge during distutils deprecation - Performance characteristics when comparing very large numbers of version strings ## Package facts - License: PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -------------------------------------------- 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or… (full text in the JSON record) (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags loose version comparison, distutils looseversion replacement, non-pep440 version parsing, flexible version numbering, version string comparison, legacy version schemes, heterogeneous version formats, version-comparison, distutils-replacement [View on SkillFed](https://skillfed.io/packages/looseversion) · [View on PyPI](https://pypi.org/project/looseversion/)