A Python port of the popular `node-semver` library, which provides semantic versioning utilities as used by npm. The library helps in parsing, comparing, and ranging semantic versions (MAJOR.MINOR.PATCH) according to the SemVer 2.0.0 specification. The current stable version is 0.9.0, released on February 23, 2023. This library is maintained on an as-needed basis.
pip install node-semverVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to find the maximum version that satisfies a given semantic version range, with options for strict or loose matching and including pre-release versions.
Update import statements to `from nodesemver import ...`.
Ensure only one semantic versioning library is actively used, and update imports to `nodesemver` for this library. Consider uninstalling `python-semver` if not explicitly needed alongside `node-semver`.
Catch `ValueError` when parsing potentially non-strict versions or set `loose=True` if more permissive parsing is desired.
Always review release notes or `CHANGELOG.md` for any version update, especially when dealing with pre-1.0.0 releases where API stability guarantees are typically weaker.
If you intend to use `node-semver` (version 0.9.0 or newer), update your imports from `from semver import ...` to `from nodesemver import ...`. If you intended to use the `python-semver` library (pypi.org/project/semver), ensure `node-semver` is uninstalled or upgrade `node-semver` to 0.9.0+ to prevent the module name clash. Consider using separate virtual environments if both libraries are needed in their pre-0.9.0 conflicting states.
Upgrade `node-semver` to version 0.9.0 or later to resolve the module name clash, and then update your imports to use `nodesemver`. Alternatively, uninstall `node-semver` if you specifically need the `python-semver` library and its `parse_version_info` function.
When using functions like `semver.valid()` or `semver.parse()`, provide a strict semantic version string (e.g., '1.2.3'). For evaluating against ranges, use appropriate functions like `semver.satisfies(version, range_expression)` or `semver.max_satisfying(versions, range_expression)`.
No dependency data recorded yet.