Skip to main content

Module lifecycle

Module lifecycle 

Source
Expand description

Lifecycle status of one version, derived from CLE (ECMA-428) events.

Experimental: may change in a 0.x minor release.

Cle::status_for_semver applies the events of a Cle to one SemVer version, and Cle::status_for_pypi to one PEP 440 version, as docs/design/cle.md describes:

  1. A withdrawn event cancels the older event its eventId names, unless it is itself withdrawn: ECMA-428 7.9 ignores a withdrawn event “as if it never existed”.
  2. An event with no versions (and, for released, no version) applies to the component as a whole. Otherwise it applies when one of its specifiers matches: { version } by equality under the scheme, { range }, parsed by VersRange::parse_cle (ECMA-428 Annex A.4), by VersRange::contains_semver or VersRange::contains_pypi.
  3. Of the applying events of one type, the highest id wins.

An event that cannot be evaluated (a vers type the scheme does not evaluate, a malformed specifier, an unknown event type) is never treated as “does not apply”: it is listed in LifecycleStatus::unevaluated. So “no end of life recorded” and “end of life could not be evaluated” stay distinct.

Dates are reported, never compared with the clock: whether a date is in the past is for the caller to decide.

Structs§

LifecycleStatus
The lifecycle state of one version.

Enums§

Unevaluated
Why an event could not be evaluated.