pkgcore.bugzilla.changes module¶
Typed payloads for creating and updating bugs.
Bugzilla mutates list valued fields through an {"add": [...], "remove": [...]}
object, and silently ignores anything it doesn’t recognise, so a misspelt key
like cc_add is accepted and does nothing. ListChange and the frozen
payload classes here make that shape the only one expressible.
- class pkgcore.bugzilla.changes.BugUpdate(*, status: Status | None = None, resolution: Resolution | None = None, dupe_of: BugId | None = None, summary: str | None = None, assigned_to: str | None = None, whiteboard: str | None = None, deadline: date | None = None, cc: ListChange[str] = ListChange(add=(), remove=(), replace=None), keywords: ListChange[str] = ListChange(add=(), remove=(), replace=None), blocks: ListChange[BugId] = ListChange(add=(), remove=(), replace=None), depends_on: ListChange[BugId] = ListChange(add=(), remove=(), replace=None), see_also: ListChange[str] = ListChange(add=(), remove=(), replace=None), groups: ListChange[str] = ListChange(add=(), remove=(), replace=None), flags: tuple[FlagChange, ...] = (), comment: NewComment | None = None, package_list: PackageList | None = None, runtime_testing_required: RuntimeTesting | None = None)[source]¶
Bases:
objectA patch to apply to one or more bugs.
Every field defaults to leaving the bug alone. List valued fields only accept a
ListChange, so thecc_addshape Bugzilla ignores is both a static and a runtime error.- blocks: ListChange[BugId]¶
- cc: ListChange[str]¶
- comment: NewComment | None¶
- depends_on: ListChange[BugId]¶
- flags: tuple[FlagChange, ...]¶
- groups: ListChange[str]¶
- keywords: ListChange[str]¶
- classmethod obsoleted_by(bug: BugId | int, **kwargs: Any) BugUpdate[source]¶
Close as OBSOLETE, pointing at the bug that supersedes this one
- package_list: PackageList | None¶
- resolution: Resolution | None¶
- classmethod resolve(resolution: Resolution = Resolution.FIXED, *, comment: str | None = None, **kwargs: Any) BugUpdate[source]¶
- runtime_testing_required: RuntimeTesting | None¶
- classmethod sanity_check(status: bool | None, *, comment: str | None = None, **kwargs: Any) BugUpdate[source]¶
Set the sanity-check flag, None clearing it
- see_also: ListChange[str]¶
- to_wire(ids: Sequence[BugId | int]) RawBugUpdate[source]¶
Render the payload.
The complete id list is always sent, since Bugzilla lets the body override the id in the request path rather than the other way around.
- class pkgcore.bugzilla.changes.FlagChange(name: str, status: FlagStatus, requestee: str | None = None)[source]¶
Bases:
objectSet or clear a flag
- status: FlagStatus¶
- to_wire() RawFlagChange[source]¶
- class pkgcore.bugzilla.changes.ListChange(add: tuple[T, ...] = (), remove: tuple[T, ...] = (), replace: tuple[T, ...] | None = None)[source]¶
Bases:
GenericAn add/remove/set mutation of a list valued field
- classmethod adding(*values: T) ListChange[T][source]¶
- classmethod removing(*values: T) ListChange[T][source]¶
- classmethod setting(*values: T) ListChange[T][source]¶
Replace the field wholesale, Bugzilla’s
set
- to_wire() RawListChange[source]¶
- class pkgcore.bugzilla.changes.NewBug(*, summary: str, description: str, component: Component | str, product: Product | str = Product.GENTOO_LINUX, version: str = 'unspecified', severity: Severity | str = Severity.NORMAL, assigned_to: str | None = None, cc: tuple[str, ...] = (), keywords: tuple[str, ...] = (), depends_on: tuple[BugId, ...] = (), blocks: tuple[BugId, ...] = (), see_also: tuple[str, ...] = (), deadline: date | None = None, package_list: PackageList | None = None, runtime_testing_required: RuntimeTesting | None = None)[source]¶
Bases:
objectA bug to file
- classmethod arch_request(category: BugCategory, package_list: PackageList, *, maintainers: Sequence[str] = (), cc_arches: bool = False, summary: str | None = None, description: str | None = None, **kwargs: Any) NewBug[source]¶
A keywordreq or stablereq, with the bgo conventions applied
- package_list: PackageList | None¶
- classmethod package_mask(summary: str, description: str, *, rites: int, maintainers: Sequence[str] = (), today: date | None = None, **kwargs: Any) NewBug[source]¶
A last rites tracker, masked for
ritesdays
- runtime_testing_required: RuntimeTesting | None¶
- class pkgcore.bugzilla.changes.NewComment(body: str, is_private: bool = False)[source]¶
Bases:
objectA comment to leave alongside an update
- to_wire() RawNewComment[source]¶
- pkgcore.bugzilla.changes.summarise(package_list: PackageList, category: BugCategory) str[source]¶
Build the conventional summary for an arch team request