pkgcore.bugzilla.wire module

Literal mirrors of the bugs.gentoo.org REST JSON payloads.

Nothing here has behaviour; it exists so the rest of pkgcore.bugzilla can be checked against the actual wire format. Note that RawBugUpdate has no cc_add key and RawNewBug has no ids key, so the shapes that Bugzilla silently ignores can’t be constructed.

type pkgcore.bugzilla.wire.JSONValue = None | bool | int | float | str | list[JSONValue] | dict[str, JSONValue]
class pkgcore.bugzilla.wire.RawBug[source]

Bases: TypedDict

A bug as returned by Bugzilla.

Every key is optional because Bugzilla omits whatever isn’t named in include_fields; presence is guaranteed by bug.INCLUDE_FIELDS instead.

alias: list[str]
assigned_to: str
blocks: list[BugId]
cc: list[str]
cf_runtime_testing_required: str
cf_stabilisation_atoms: str
component: str
creation_time: str
creator: str
deadline: str | None
depends_on: list[BugId]
flags: list[RawFlag]
groups: list[str]
id: BugId
keywords: list[str]
last_change_time: str
priority: str
product: str
resolution: str
see_also: list[str]
severity: str
status: str
summary: str
tags: list[str]
version: str
whiteboard: str
class pkgcore.bugzilla.wire.RawBugUpdate[source]

Bases: TypedDict

assigned_to: str
blocks: RawListChange
cc: RawListChange
cf_runtime_testing_required: str
cf_stabilisation_atoms: str
comment: RawNewComment
deadline: str
depends_on: RawListChange
dupe_of: BugId
flags: list[RawFlagChange]
groups: RawListChange
ids: list[BugId]
keywords: RawListChange
resolution: str
see_also: RawListChange
status: str
summary: str
whiteboard: str
class pkgcore.bugzilla.wire.RawChanges[source]

Bases: TypedDict

alias: list[str]
changes: dict[str, RawFieldChange]
id: BugId
last_change_time: str
class pkgcore.bugzilla.wire.RawComment[source]

Bases: TypedDict

attachment_id: NotRequired[int | None]
bug_id: BugId
count: int
creation_time: str
creator: str
id: CommentId
is_private: bool
raw_text: NotRequired[str]
tags: list[str]
text: str
time: str
class pkgcore.bugzilla.wire.RawComments[source]

Bases: TypedDict

comments: list[RawComment]
class pkgcore.bugzilla.wire.RawCommentsResponse[source]

Bases: TypedDict

Note that the keys of bugs are stringified bug ids

bugs: dict[str, RawComments]
comments: dict[str, RawComment]
class pkgcore.bugzilla.wire.RawCreateResponse[source]

Bases: TypedDict

id: BugId
class pkgcore.bugzilla.wire.RawError[source]

Bases: TypedDict

code: int
documentation: NotRequired[str]
error: bool
message: str
class pkgcore.bugzilla.wire.RawFieldChange[source]

Bases: TypedDict

A single field’s delta; both values are comma-and-space joined strings

added: str
removed: str
class pkgcore.bugzilla.wire.RawFlag[source]

Bases: TypedDict

creation_date: str
id: FlagId
modification_date: str
name: str
requestee: NotRequired[str]
setter: str
status: Literal['?', '+', '-']
type_id: FlagTypeId
class pkgcore.bugzilla.wire.RawFlagChange[source]

Bases: TypedDict

id: FlagId
name: str
new: bool
requestee: str
status: Literal['?', '+', '-', 'X']
type_id: FlagTypeId
class pkgcore.bugzilla.wire.RawGetResponse[source]

Bases: TypedDict

GET /rest/bug/{id}, which unlike a search also carries faults

bugs: list[RawBug]
faults: list[dict[str, Any]]
class pkgcore.bugzilla.wire.RawListChange[source]

Bases: TypedDict

add: list[str]
remove: list[str]
set: list[str]
class pkgcore.bugzilla.wire.RawNewBug[source]

Bases: TypedDict

assigned_to: str
blocks: list[BugId]
cc: list[str]
cf_runtime_testing_required: str
cf_stabilisation_atoms: str
component: str
deadline: str
depends_on: list[BugId]
description: str
keywords: list[str]
product: str
see_also: list[str]
severity: str
summary: str
version: str
class pkgcore.bugzilla.wire.RawNewComment[source]

Bases: TypedDict

body: str
is_private: bool
class pkgcore.bugzilla.wire.RawSearchResponse[source]

Bases: TypedDict

bugs: list[RawBug]
class pkgcore.bugzilla.wire.RawUpdateResponse[source]

Bases: TypedDict

bugs: list[RawChanges]
class pkgcore.bugzilla.wire.RawWhoami[source]

Bases: TypedDict

id: int
name: str
real_name: str
type pkgcore.bugzilla.wire.RequestBody = Mapping[str, Any]