bugdantic 0.4.1__tar.gz → 0.4.2__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.4.1 → bugdantic-0.4.2}/PKG-INFO +5 -4
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic/bugzilla.py +7 -10
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic/userstory.py +4 -4
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic.egg-info/PKG-INFO +5 -4
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic.egg-info/requires.txt +4 -3
- {bugdantic-0.4.1 → bugdantic-0.4.2}/pyproject.toml +11 -4
- {bugdantic-0.4.1 → bugdantic-0.4.2}/LICENSE +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/README.md +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic/__init__.py +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic/py.typed +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic.egg-info/SOURCES.txt +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic.egg-info/dependency_links.txt +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/bugdantic.egg-info/top_level.txt +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/setup.cfg +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/test/test_bugzilla.py +0 -0
- {bugdantic-0.4.1 → bugdantic-0.4.2}/test/test_userstory.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bugdantic
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Bugzilla client based on pydantic
|
|
5
5
|
Author-email: James Graham <james@hoppipolla.co.uk>
|
|
6
6
|
License-Expression: MPL-2.0
|
|
@@ -11,8 +11,9 @@ 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==
|
|
15
|
-
Requires-Dist: ruff==0.
|
|
16
|
-
Requires-Dist: pytest==
|
|
14
|
+
Requires-Dist: mypy==2.3.0; extra == "test"
|
|
15
|
+
Requires-Dist: ruff==0.16.2; extra == "test"
|
|
16
|
+
Requires-Dist: pytest==9.1.1; extra == "test"
|
|
17
17
|
Requires-Dist: pytest-ruff==0.5; extra == "test"
|
|
18
|
+
Requires-Dist: ty==0.0.71; extra == "test"
|
|
18
19
|
Dynamic: license-file
|
|
@@ -2,15 +2,13 @@ import base64
|
|
|
2
2
|
import enum
|
|
3
3
|
import json
|
|
4
4
|
import logging
|
|
5
|
+
from collections.abc import Mapping, MutableMapping, Sequence
|
|
5
6
|
from dataclasses import dataclass
|
|
6
7
|
from datetime import datetime
|
|
7
8
|
from typing import (
|
|
8
9
|
Any,
|
|
9
10
|
Generic,
|
|
10
|
-
Mapping,
|
|
11
|
-
MutableMapping,
|
|
12
11
|
Optional,
|
|
13
|
-
Sequence,
|
|
14
12
|
Self,
|
|
15
13
|
TypeVar,
|
|
16
14
|
cast,
|
|
@@ -495,8 +493,7 @@ class Bugzilla:
|
|
|
495
493
|
if exclude_fields is not None:
|
|
496
494
|
params["exclude_fields"] = ",".join(exclude_fields)
|
|
497
495
|
|
|
498
|
-
|
|
499
|
-
path = path[1:]
|
|
496
|
+
path = path.removeprefix("/")
|
|
500
497
|
|
|
501
498
|
url = urljoin(self.config.base_url, f"/rest/{path}")
|
|
502
499
|
|
|
@@ -515,13 +512,13 @@ class Bugzilla:
|
|
|
515
512
|
assert response is not None
|
|
516
513
|
try:
|
|
517
514
|
response.raise_for_status()
|
|
518
|
-
except Exception
|
|
515
|
+
except Exception:
|
|
519
516
|
msg = "Request failed"
|
|
520
517
|
json_resp = response.json()
|
|
521
518
|
if json_resp:
|
|
522
519
|
msg += f"\n{json_resp.get('message')}"
|
|
523
520
|
logging.error(msg)
|
|
524
|
-
raise
|
|
521
|
+
raise
|
|
525
522
|
return response.json()
|
|
526
523
|
else:
|
|
527
524
|
logging.info(f"""Not updating, would send {method} request to {path} with body:
|
|
@@ -592,9 +589,9 @@ class Bugzilla:
|
|
|
592
589
|
bug_ids: Sequence[int],
|
|
593
590
|
bug_type: type[BugType],
|
|
594
591
|
page_size: int = 100,
|
|
595
|
-
) -> list[
|
|
592
|
+
) -> list[BugType]:
|
|
596
593
|
"""Get multiple bugs specified by id"""
|
|
597
|
-
results: list[
|
|
594
|
+
results: list[BugType] = []
|
|
598
595
|
for bug_ids_chunk in [
|
|
599
596
|
bug_ids[n : n + page_size] for n in range(0, len(bug_ids), page_size)
|
|
600
597
|
]:
|
|
@@ -675,7 +672,7 @@ class Bugzilla:
|
|
|
675
672
|
|
|
676
673
|
def search_as(
|
|
677
674
|
self, query: QueryParams, bug_type: type[BugType], page_size: int = 100
|
|
678
|
-
):
|
|
675
|
+
) -> list[BugType]:
|
|
679
676
|
include_fields = model_field_names(bug_type)
|
|
680
677
|
return self._search(bug_type, query, include_fields, page_size)
|
|
681
678
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""Utility functions for working with cf_user_story fields that
|
|
2
2
|
are used to store key: value pair data"""
|
|
3
3
|
|
|
4
|
+
import re
|
|
4
5
|
from collections import defaultdict
|
|
5
|
-
from
|
|
6
|
+
from collections.abc import Iterator, Mapping
|
|
6
7
|
from dataclasses import dataclass
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
from typing import Iterator, Optional, Mapping, Self
|
|
8
|
+
from enum import IntEnum
|
|
9
|
+
from typing import Optional, Self
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def parse(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bugdantic
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Bugzilla client based on pydantic
|
|
5
5
|
Author-email: James Graham <james@hoppipolla.co.uk>
|
|
6
6
|
License-Expression: MPL-2.0
|
|
@@ -11,8 +11,9 @@ 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==
|
|
15
|
-
Requires-Dist: ruff==0.
|
|
16
|
-
Requires-Dist: pytest==
|
|
14
|
+
Requires-Dist: mypy==2.3.0; extra == "test"
|
|
15
|
+
Requires-Dist: ruff==0.16.2; extra == "test"
|
|
16
|
+
Requires-Dist: pytest==9.1.1; extra == "test"
|
|
17
17
|
Requires-Dist: pytest-ruff==0.5; extra == "test"
|
|
18
|
+
Requires-Dist: ty==0.0.71; extra == "test"
|
|
18
19
|
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.4.
|
|
8
|
+
version = "0.4.2"
|
|
9
9
|
requires-python = ">=3.11"
|
|
10
10
|
license = "MPL-2.0"
|
|
11
11
|
classifiers = [
|
|
@@ -20,8 +20,15 @@ dependencies = [
|
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
22
|
test = [
|
|
23
|
-
"mypy==
|
|
24
|
-
"ruff==0.
|
|
25
|
-
"pytest==
|
|
23
|
+
"mypy==2.3.0",
|
|
24
|
+
"ruff==0.16.2",
|
|
25
|
+
"pytest==9.1.1",
|
|
26
26
|
"pytest-ruff==0.5",
|
|
27
|
+
"ty==0.0.71",
|
|
27
28
|
]
|
|
29
|
+
|
|
30
|
+
[tool.mypy]
|
|
31
|
+
disallow_untyped_defs = true
|
|
32
|
+
|
|
33
|
+
[tool.ruff.lint]
|
|
34
|
+
ignore = ["UP045", "LOG015"]
|
|
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
|
|
File without changes
|