pyflightstream.versions (stable)¶
Generated from the docstrings at build time: every one of the 7 names in the __all__ of pyflightstream.versions has an entry below. The names a guide or an example uses come first; the others follow under Advanced.
Canonical FlightStream version identifiers and their ordering.
Pipeline role: the bottom of the pipeline proper, above only
_errors, the base-exception module that imports nothing. Everything
else asks this module which FlightStream versions exist and how they are
ordered.
Canonical identifiers use the YY.XXX three-digit scheme (for example
26.120 for the vendor release named 26.12); the last digit indexes
vendor builds within one minor release. It is an ORDERING position and
not a claim of descent: 26.101 sits behind 26.100 and is an independent
release, so whether a build inherits its base release's command
evidence is stated per build (FsVersion.inherits_base) rather than
read off the digit. Neither string nor float comparison orders vendor
names correctly ("26.1" versus "26.12"), so the ordered list in
commands/_meta.yaml is the only ordering authority.
Used in the guides¶
pyflightstream.versions.AmbiguousVersionAliasError
¶
AmbiguousVersionAliasError(
message: str,
*,
alias: str,
candidates: tuple[str, ...] = (),
)
Bases: PyflightstreamError, ValueError
A vendor release name identifies more than one registered build.
The vendor reuses a release name across builds, and not only across the hotfixes of one release: the 26.1 family is the February and May 2026 releases sharing a name rather than a release and its hotfix. Which builds sit in either family is not written here, because the message this class raises enumerates them from the registry and a second copy in prose has gone stale on every registration. A display alias therefore cannot select a build, and returning either one would hand the caller a silently wrong solver. The refusal names each candidate by its vendor BUILD NUMBER, which is what the solver prints and the only thing a reader holding two installs can match. The registry records the vendor's own name (that name is a fact about the world) and refuses it at resolution time, so the caller sees the choice instead of inheriting it.
Attributes:
| Name | Type | Description |
|---|---|---|
alias |
str
|
The vendor release name that matched more than one entry. |
candidates |
tuple of str
|
Canonical identifiers sharing that name, in release order, so callers can offer the choice without parsing the message. |
pyflightstream.versions.resolve
¶
resolve(version: str | FsVersion) -> FsVersion
Resolve a canonical identifier or display alias to a registered version.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
version
|
str or FsVersion
|
Canonical identifier ( |
required |
Returns:
| Type | Description |
|---|---|
FsVersion
|
The registered version. |
Raises:
| Type | Description |
|---|---|
AmbiguousVersionAliasError
|
If the string is a display alias that more than one registered version carries. The vendor reuses one release name across the hotfix builds of a minor release, so the alias names no single build; the message names every candidate. |
UnknownVersionError
|
If the identifier matches no registered version. The message
lists the known versions; new versions are only added through
the ordered list in |
Notes
Canonical identifiers are matched across the whole registry before any alias is considered, so a canonical never loses to an earlier entry that happens to carry it as an alias. Aliases are then matched exhaustively rather than first-wins, which is what turns a duplicate into a refusal instead of into whichever build the ordered list happens to reach first.
Examples:
>>> version = resolve("26.124")
>>> str(version), version.build
('26.124', '8172026')
Advanced¶
pyflightstream.versions.FsVersion
dataclass
¶
FsVersion(
canonical: str,
alias: str,
index: int,
build: str | None = None,
prints: str | None = None,
inherits_base: bool | None = None,
)
One registered FlightStream version.
Value object wrapping a canonical YY.XXX identifier. Instances
are obtained through :func:resolve or :func:known_versions;
constructing one by hand bypasses the registry and is reserved to
this module.
Attributes:
| Name | Type | Description |
|---|---|---|
canonical |
str
|
Canonical identifier in the three-fractional-digit scheme, for
example |
alias |
str
|
Vendor-facing release name, for example |
index |
int
|
Position in the ordered list of |
build |
str or None
|
Vendor build number this version's solver prints in its output
footer, without the leading |
prints |
str or None
|
Release name this version's solver PRINTS, which is not the
same fact as :attr: |
inherits_base |
bool
|
Whether this build's command evidence falls back to the record of the base release when it has none of its own. True for a genuine hotfix. The identifier does not establish inheritance: independent vendor releases can occupy adjacent indices. Their manuals are different documents (396 pages against 409) describing different command sets, so inheriting one from the other can expose commands the target solver refuses. The registry states this per build rather than deriving it, and a hotfix index that does not state it is refused BY THIS CLASS, not only by the registry loader, so caller-built objects must also state their inheritance. A base release needs no flag: it has nothing to inherit from, so the field settles to True and is inert there. |
pyflightstream.versions.SETUP_RESET_LOG_PREFIXES
module-attribute
¶
SETUP_RESET_LOG_PREFIXES: Mapping[str, tuple[str, str]] = (
MappingProxyType(
{"26.124": ("Solver mode:", "Symmetry is ")}
)
)
pyflightstream.versions.UnknownVersionError
¶
UnknownVersionError(
message: str,
*,
version: str | None = None,
known: tuple[str, ...] = (),
)
Bases: PyflightstreamError, ValueError
A FlightStream version identifier is not in the ordered registry.
Raised when a canonical identifier or display alias does not match
any entry of the ordered list in commands/_meta.yaml. The message
lists every known version so the caller can correct the input or
register the new version first.
Attributes:
| Name | Type | Description |
|---|---|---|
version |
str or None
|
The identifier that failed to resolve or validate; |
known |
tuple of str
|
Canonical identifiers of every registered version, in release
order, so callers can react without parsing the message; the
word is |
pyflightstream.versions.known_versions
cached
¶
known_versions() -> tuple[FsVersion, ...]
Return every registered FlightStream version, in release order.
The list is read from commands/_meta.yaml inside the installed
package, so it is available from the wheel without repository access.
Returns:
| Type | Description |
|---|---|
tuple of FsVersion
|
Registered versions, ordered oldest first. The tuple position is the ordering authority (CONTRIBUTING.md invariant 4). |
pyflightstream.versions.manual_editions
cached
¶
manual_editions() -> Mapping[str, str]
Return the registered manual edition per canonical version.
The mapping is read from commands/_meta.yaml and names the
manual edition (with its source id) that backs the documented
statuses of each version. Versions without a registered edition are
absent; their commands await release-notes review or backfill
probing.
Returns:
| Type | Description |
|---|---|
Mapping of str to str
|
Read-only manual edition descriptions keyed by canonical identifier. |