The `looseversion` package is a backwards/forwards-compatible fork of `distutils.version.LooseVersion`, designed for comparing heterogeneous version schemes that do not strictly follow PEP 440. It offers an identical interface and comparison logic to the original, with the main enhancement being comparability between `looseversion.LooseVersion` and `distutils.version.LooseVersion` instances. The current version is 1.3.0, released on July 5, 2023, and it aims to be a stable replacement for the deprecated `distutils` version class, with a relatively low release cadence focused on compatibility and maintenance.
pip install looseversionVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic version object creation and comparison, including comparison with a string literal.
Change import statements from `from distutils.version import LooseVersion` to `from looseversion import LooseVersion`.
Evaluate whether your version comparison needs align with PEP 440 (use `packaging.version.Version`) or if you require the more flexible, `distutils`-style 'loose' comparison (use `looseversion.LooseVersion`).
Test `looseversion` behavior with your specific, non-standard version string formats to ensure it meets expectations, especially for complex or highly unconventional patterns.
Update your import statement from `from distutils.version import LooseVersion` to `from looseversion import LooseVersion`.
Change the import statement to `from looseversion import LooseVersion`.
Ensure that a valid version string is always passed to the `LooseVersion()` constructor, and that comparisons are made between properly initialized `LooseVersion` objects or compatible types.
While `looseversion` is designed for flexible versioning, review the version strings for highly heterogeneous segments that might not have a clear comparative order. Consider normalizing such segments or ensuring consistency in type for comparable parts.
No dependency data recorded yet.