bugdantic 0.2__tar.gz → 0.2.1__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 → bugdantic-0.2.1}/PKG-INFO +1 -1
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic/bugzilla.py +7 -3
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic.egg-info/PKG-INFO +1 -1
- {bugdantic-0.2 → bugdantic-0.2.1}/pyproject.toml +1 -1
- {bugdantic-0.2 → bugdantic-0.2.1}/LICENSE +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/README.md +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic/__init__.py +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic/py.typed +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic.egg-info/SOURCES.txt +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic.egg-info/dependency_links.txt +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic.egg-info/requires.txt +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/bugdantic.egg-info/top_level.txt +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/setup.cfg +0 -0
- {bugdantic-0.2 → bugdantic-0.2.1}/test/test_bugzilla.py +0 -0
|
@@ -3,7 +3,7 @@ import json
|
|
|
3
3
|
import logging
|
|
4
4
|
from dataclasses import dataclass
|
|
5
5
|
from datetime import datetime
|
|
6
|
-
from typing import Any, Mapping, MutableMapping, Optional
|
|
6
|
+
from typing import Any, Mapping, MutableMapping, Optional, Sequence
|
|
7
7
|
from urllib.parse import urljoin
|
|
8
8
|
|
|
9
9
|
import httpx
|
|
@@ -11,6 +11,9 @@ from pydantic import BaseModel, ConfigDict
|
|
|
11
11
|
|
|
12
12
|
Json = dict[str, "Json"] | list["Json"] | str | int | float | bool | None
|
|
13
13
|
|
|
14
|
+
QueryValue = Optional[str | int | float | bool]
|
|
15
|
+
QueryParams = Mapping[str, QueryValue | Sequence[QueryValue]]
|
|
16
|
+
|
|
14
17
|
|
|
15
18
|
class BugzillaError(Exception):
|
|
16
19
|
pass
|
|
@@ -133,7 +136,6 @@ class BugSearch(BaseModel):
|
|
|
133
136
|
# Data model for bug history
|
|
134
137
|
|
|
135
138
|
|
|
136
|
-
|
|
137
139
|
class BugHistory(BaseModel):
|
|
138
140
|
id: int
|
|
139
141
|
history: list[History]
|
|
@@ -308,12 +310,14 @@ class Bugzilla:
|
|
|
308
310
|
path: str,
|
|
309
311
|
include_fields: Optional[list[str]] = None,
|
|
310
312
|
exclude_fields: Optional[list[str]] = None,
|
|
311
|
-
params: Optional[
|
|
313
|
+
params: Optional[QueryParams] = None,
|
|
312
314
|
headers: Optional[dict[str, str]] = None,
|
|
313
315
|
json_body: Optional[MutableMapping[str, Json]] = None,
|
|
314
316
|
) -> Mapping[str, Json]:
|
|
315
317
|
if params is None:
|
|
316
318
|
params = {}
|
|
319
|
+
else:
|
|
320
|
+
params = {**params}
|
|
317
321
|
|
|
318
322
|
if include_fields is not None:
|
|
319
323
|
params["include_fields"] = ",".join(include_fields)
|
|
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
|