- Add optional conversion to version-ranges.
- Make rkyv optional
- Sync from uv vendored version
- Remove pyo3 bindings
- Update rkyv to 0.8
- Add
VersionSpecifiers::empty()
, which is present in the uv version of this crate but missing here.
- CI fixes
- Update pyo3 to 0.22
- Update pyo3 to 0.21 and a minimum of python 3.8
The crate has been completely rewritten by burntsushi.
- Faster version parsing.
- Faster version comparisons.
Version
field accessors are now methods.Version
is anArc
of its internal representation, so cloning is cheap.- The internal representation of a version is split into a full representation and an optimized small variant that can handle 75% of the versions on pypi.
- Parse errors are now opaque.
- rkyv support.
- segments are now
u64
instead ofusize
. This ensures consistency between platforms andu64
are required when timestamps are used as patch versions (e.g.,20230628214621
, the ISO 8601 "basic format") - Faster version comparison
- Added
VersionSpecifier::equals_version
constructor for==<version>
- Added
VersionSpecifier::any_prerelease
: Whether the version marker includes a prerelease - Updated to pyo3 0.20
- once_cell instead of lazy_static
- Implement
FromPyObject
forVersion
- CI fix
- Update pyo3 to 0.19 and maturin to 1.0
-
Add
major()
,minor()
andmicro()
toVersion
by ischaojie (#9) -
Fix Readme display
- Make string serialization look more like poetry's
- Implement
__hash__
forVersionSpecifier
- Python bindings for
VersionSpecifiers
- Implement
Display
forVersionSpecifiers
- Expose
VersionSpecifier().operator
andVersionSpecifier().version
to Python
- Expose
Version
fromPyVersion
- Introduced a
PyVersion
wrapper specifically for the Python bindings to work around PyO3/pyo3#2786 - Added
VersionSpecifiers::contains
- Added
Version::from_release
, a constructor for a version that is just a release such as3.8
.
- Added
VersionSpecifiers
, a thin wrapper aroundVec<VersionSpecifier>
with a serde implementation.VersionSpecifiers::from_str
is now preferred overparse_version_specifiers
. - Reexport rust function for python module