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¶
- 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]¶