Lock datum¶
- wreck.lock_datum.DC_SLOTS: dict[str, bool]¶
Allows dataclasses.dataclass __slots__ support from py310
- class wreck.lock_datum.DATUM¶
- wreck.lock_datum.DATUM: TypeVar
Class Pins is a Generic container. Allow changing which items the container can hold
- class wreck.lock_datum.DatumByPkg¶
- wreck.lock_datum.DatumByPkg: dict[str, set[wreck.lock_datum.PinDatum]]
Store by pkg_name. Either all or notable (has specifiers or qualifiers)
- wreck.lock_datum.__all__: tuple[str, str, str, str, str, str, str, str, str] = ("DATUM", "DatumByPkg", "InFileType", "OutLastSuffix", "PinDatum", "in_generic", "is_pin", "has_qualifiers", "pprint_pins")¶
Module exports
- class wreck.lock_datum.InFileType(*values)¶
Each .in files constraints and requirements have to be resolved. This occurs recursively. Once resolved, InFile is moved from FILES –> ZEROES set
- FILES = "_files"¶
.in file that has unresolved -c (constraints) and -r (requirements)
- ZEROES = "_zeroes"¶
.in file that have all -c (constraints) and -r (requirements) resolved
- class wreck.lock_datum.OutLastSuffix(*values)¶
Output file last suffix. File name may have other encoded properties like
.shared- LOCK = ".lock"¶
A lock file
- UNLOCK = ".unlock"¶
An unlock file
- class wreck.lock_datum.PinDatum(file_abspath: Path, pkg_name: str, line: str, specifiers: list[str], qualifiers: list[str])¶
Qualifiers aware Pin. Use
FilePinsto instantiate.Hashable and Comparable
- wreck.lock_datum.has_qualifiers(qualifiers)¶
From
.infile, identify as a pin only if has qualifiers.
- wreck.lock_datum.in_generic(inst, val, field_name='file_abspath', set_name=InFileType.FILES, is_abspath_ok=False)¶
A generic __contains__
Comparing instances attribute path was removed
- Parameters:
field_name¶ (str) – class instances attribute name which holds the relative or absolute path
set_name¶ (wreck.lock_datum.InFileType | None) – Default
wreck.lock_datum.InFileType.FILES. Which set to search thru. zeroes or filesis_abspath_ok¶ (bool) – Default False. True if class instance field is an absolute path. False if relative path
- Returns:
True if InFile contained within zeroes otherwise False
- Return type:
- wreck.lock_datum.is_pin(specifiers)¶
From
.infile, identify as a pin only if has specifiers.
- wreck.lock_datum.pprint_pins(pins)¶
Capture pprint and return it.
- Parameters:
pins¶ (collections.abc.Iterable[wreck.lock_datum.DATUM]) – set of Pins
- Returns:
pretty printed representation of the pins
- Return type: