bugdantic 0.2.4__tar.gz → 0.2.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bugdantic-0.2.4 → bugdantic-0.2.6}/PKG-INFO +4 -4
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic/bugzilla.py +25 -2
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic.egg-info/PKG-INFO +4 -4
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic.egg-info/requires.txt +3 -3
- {bugdantic-0.2.4 → bugdantic-0.2.6}/pyproject.toml +4 -4
- {bugdantic-0.2.4 → bugdantic-0.2.6}/LICENSE +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/README.md +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic/__init__.py +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic/py.typed +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic.egg-info/SOURCES.txt +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic.egg-info/dependency_links.txt +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/bugdantic.egg-info/top_level.txt +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/setup.cfg +0 -0
- {bugdantic-0.2.4 → bugdantic-0.2.6}/test/test_bugzilla.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bugdantic
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Bugzilla client based on pydantic
|
|
5
5
|
Author-email: James Graham <james@hoppipolla.co.uk>
|
|
6
6
|
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
@@ -11,8 +11,8 @@ License-File: LICENSE
|
|
|
11
11
|
Requires-Dist: httpx[http2]>=0.28.1
|
|
12
12
|
Requires-Dist: pydantic>=2.11.3
|
|
13
13
|
Provides-Extra: test
|
|
14
|
-
Requires-Dist: mypy==1.
|
|
15
|
-
Requires-Dist: ruff==0.
|
|
16
|
-
Requires-Dist: pytest==8.
|
|
14
|
+
Requires-Dist: mypy==1.16.0; extra == "test"
|
|
15
|
+
Requires-Dist: ruff==0.12.0; extra == "test"
|
|
16
|
+
Requires-Dist: pytest==8.4.0; extra == "test"
|
|
17
17
|
Requires-Dist: pytest-ruff==0.4.1; extra == "test"
|
|
18
18
|
Dynamic: license-file
|
|
@@ -73,7 +73,7 @@ class History(BaseModel):
|
|
|
73
73
|
|
|
74
74
|
class Bug(BaseModel):
|
|
75
75
|
actual_time: Optional[float] = None
|
|
76
|
-
alias: Optional[
|
|
76
|
+
alias: Optional[str] = None
|
|
77
77
|
assigned_to: Optional[str] = None
|
|
78
78
|
assigned_to_detail: Optional[User] = None
|
|
79
79
|
blocks: Optional[list[int]] = None
|
|
@@ -234,7 +234,7 @@ class BugUpdate(BaseModel):
|
|
|
234
234
|
ids: Optional[list[int]] = None
|
|
235
235
|
id_or_alias: Optional[int | str] = None
|
|
236
236
|
|
|
237
|
-
alias: Optional[
|
|
237
|
+
alias: Optional[str] = None
|
|
238
238
|
assigned_to: Optional[str] = None
|
|
239
239
|
blocks: Optional[BugRelationUpdate] = None
|
|
240
240
|
depends_on: Optional[BugRelationUpdate] = None
|
|
@@ -370,6 +370,7 @@ class Bugzilla:
|
|
|
370
370
|
def bug(
|
|
371
371
|
self, bug_id: int, include_fields: Optional[list[str]] = None
|
|
372
372
|
) -> Optional[Bug]:
|
|
373
|
+
"""Get a single bug specified by id"""
|
|
373
374
|
search_result = BugSearch.model_validate(
|
|
374
375
|
self.request("GET", f"bug/{bug_id}", include_fields=include_fields)
|
|
375
376
|
)
|
|
@@ -381,9 +382,29 @@ class Bugzilla:
|
|
|
381
382
|
assert len(bugs) == 1
|
|
382
383
|
return bugs[0]
|
|
383
384
|
|
|
385
|
+
def bugs(
|
|
386
|
+
self,
|
|
387
|
+
bug_ids: Sequence[int],
|
|
388
|
+
include_fields: Optional[list[str]] = None,
|
|
389
|
+
page_size: int = 100,
|
|
390
|
+
) -> list[Bug]:
|
|
391
|
+
"""Get multiple bugs specified by id"""
|
|
392
|
+
results: list[Bug] = []
|
|
393
|
+
for bug_ids_chunk in [
|
|
394
|
+
bug_ids[n : n + page_size] for n in range(0, len(bug_ids), page_size)
|
|
395
|
+
]:
|
|
396
|
+
results.extend(
|
|
397
|
+
self.search(
|
|
398
|
+
{"id": ",".join(str(id) for id in bug_ids_chunk)},
|
|
399
|
+
include_fields=include_fields,
|
|
400
|
+
)
|
|
401
|
+
)
|
|
402
|
+
return results
|
|
403
|
+
|
|
384
404
|
def bug_history(
|
|
385
405
|
self, bug_id: int, new_since: Optional[datetime] = None
|
|
386
406
|
) -> BugHistory:
|
|
407
|
+
"""Get the history of a single bug"""
|
|
387
408
|
params = {}
|
|
388
409
|
if new_since is not None:
|
|
389
410
|
params["new_since"] = new_since.strftime("%Y-%m-%dT%H:%M:%SZ")
|
|
@@ -404,6 +425,7 @@ class Bugzilla:
|
|
|
404
425
|
include_fields: Optional[list[str]] = None,
|
|
405
426
|
page_size: int = 100,
|
|
406
427
|
) -> list[Bug]:
|
|
428
|
+
"""Search for bugs using the bugzilla query API"""
|
|
407
429
|
query = {**query}
|
|
408
430
|
paginate = False
|
|
409
431
|
offset = 0
|
|
@@ -438,6 +460,7 @@ class Bugzilla:
|
|
|
438
460
|
def update_bugs(
|
|
439
461
|
self, update_params: BugUpdate, bug_id: Optional[int] = None
|
|
440
462
|
) -> list[BugUpdateResponse]:
|
|
463
|
+
"""Update one or more bugs"""
|
|
441
464
|
if bug_id is None:
|
|
442
465
|
if update_params.ids:
|
|
443
466
|
id_str = str(update_params.ids[0])
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bugdantic
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: Bugzilla client based on pydantic
|
|
5
5
|
Author-email: James Graham <james@hoppipolla.co.uk>
|
|
6
6
|
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
|
|
@@ -11,8 +11,8 @@ License-File: LICENSE
|
|
|
11
11
|
Requires-Dist: httpx[http2]>=0.28.1
|
|
12
12
|
Requires-Dist: pydantic>=2.11.3
|
|
13
13
|
Provides-Extra: test
|
|
14
|
-
Requires-Dist: mypy==1.
|
|
15
|
-
Requires-Dist: ruff==0.
|
|
16
|
-
Requires-Dist: pytest==8.
|
|
14
|
+
Requires-Dist: mypy==1.16.0; extra == "test"
|
|
15
|
+
Requires-Dist: ruff==0.12.0; extra == "test"
|
|
16
|
+
Requires-Dist: pytest==8.4.0; extra == "test"
|
|
17
17
|
Requires-Dist: pytest-ruff==0.4.1; extra == "test"
|
|
18
18
|
Dynamic: license-file
|
|
@@ -5,7 +5,7 @@ authors = [
|
|
|
5
5
|
{name = "James Graham", email = "james@hoppipolla.co.uk"}
|
|
6
6
|
]
|
|
7
7
|
|
|
8
|
-
version = "0.2.
|
|
8
|
+
version = "0.2.6"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
classifiers = [
|
|
11
11
|
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
|
|
@@ -20,8 +20,8 @@ dependencies = [
|
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
22
|
test = [
|
|
23
|
-
"mypy==1.
|
|
24
|
-
"ruff==0.
|
|
25
|
-
"pytest==8.
|
|
23
|
+
"mypy==1.16.0",
|
|
24
|
+
"ruff==0.12.0",
|
|
25
|
+
"pytest==8.4.0",
|
|
26
26
|
"pytest-ruff==0.4.1",
|
|
27
27
|
]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|