pkgcore.bugzilla.bug module¶
Immutable value objects for what bugs.gentoo.org hands back.
Each Bug field carries the wire name it came from and how to decode
it, so INCLUDE_FIELDS and parse_bug() are both derived from the
one declaration and can’t drift apart.
- class pkgcore.bugzilla.bug.Bug(*, id: BugId = 0, summary: str = '', product: str = '', component: str = '', version: str = '', status: str = '', resolution: str = '', severity: str = '', priority: str = '', assigned_to: str = '', creator: str = '', cc: tuple[str, ...]=(), keywords: tuple[str, ...]=(), whiteboard: str = '', alias: tuple[str, ...]=(), tags: tuple[str, ...]=(), depends_on: tuple[~pkgcore.bugzilla.wire.BugId, ...]=(), blocks: tuple[~pkgcore.bugzilla.wire.BugId, ...]=(), see_also: tuple[str, ...]=(), groups: tuple[str, ...]=(), flags: tuple[~pkgcore.bugzilla.bug.Flag, ...]=(), deadline: date | None = None, creation_time: datetime = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), last_change_time: datetime = datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc), package_list: PackageList = <PackageList ''>, runtime_testing_required: RuntimeTesting = RuntimeTesting.UNSET)[source]¶
Bases:
objectAn immutable snapshot of a bug.
Anonymous requests get every email address truncated at the
@, soassigned_to,creatorandcconly hold full addresses when the client was given an api key.- arches(known_arches: Container[str]) tuple[str, ...][source]¶
Arch names found in CC, tolerating truncated anonymous addresses
- property category: BugCategory | None¶
- id: BugId¶
- match_packages(repo: Any, *, only_new: bool = False, filter_arch: Iterable[str] = (), permit_allarches: bool = False) Iterator[KeywordRequest][source]¶
Resolve this bug’s package list against
repo.Bug’s category decides stabilizing from keywording and CC decides which arches the request is addressed to; see
pkgcore.ebuild.keywording.match_packages()for the rest.- Parameters:
repo – repo to resolve the package list against
only_new – drop the arches the package already carries
filter_arch – keep only the arches listed
permit_allarches – honour the ALLARCHES keyword when the bug carries it
- Returns:
the matched packages, each with the arches to request for it
- Raises:
PackageInvalid – if the package list can’t be parsed
- package_list: PackageList¶
- runtime_testing_required: RuntimeTesting¶
- class pkgcore.bugzilla.bug.BugChanges(id: BugId, last_change_time: datetime, changes: dict[str, ~pkgcore.bugzilla.bug.FieldChange]=<factory>, alias: tuple[str, ...]=())[source]¶
Bases:
objectThe result of updating a bug
- changes: dict[str, FieldChange]¶
- id: BugId¶
- class pkgcore.bugzilla.bug.Comment(id: CommentId, bug_id: BugId, count: int, text: str, creator: str, creation_time: datetime, is_private: bool = False, tags: tuple[str, ...] = ())[source]¶
Bases:
objectA single comment on a bug
- bug_id: BugId¶
- id: CommentId¶
- class pkgcore.bugzilla.bug.FieldChange(added: tuple[str, ...] = (), removed: tuple[str, ...] = ())[source]¶
Bases:
objectWhat one field gained and lost in an update
- class pkgcore.bugzilla.bug.Flag(name: str, status: FlagStatus, id: FlagId = 0, type_id: FlagTypeId = 0, setter: str = '', requestee: str = '')[source]¶
Bases:
objectA flag set on a bug
- id: FlagId¶
- status: FlagStatus¶
- type_id: FlagTypeId¶
- class pkgcore.bugzilla.bug.User(id: int, name: str, real_name: str = '')[source]¶
Bases:
objectThe account an api key belongs to
- pkgcore.bugzilla.bug.parse_bug(raw: RawBug) Bug[source]¶
Build a
Bugfrom a raw response, skipping absent fields
- pkgcore.bugzilla.bug.parse_changes(raw: RawChanges) BugChanges[source]¶
- pkgcore.bugzilla.bug.parse_comment(raw: RawComment) Comment[source]¶