Skip to content

Commit c9110f3

Browse files
author
Phillip Simonds
committed
Merge branch 'stable' into ps-issue-4143
2 parents 7b7fb54 + 44a9a84 commit c9110f3

24 files changed

+1585
-373
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,29 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/) and the chang
1111

1212
<!-- towncrier release notes start -->
1313

14+
## [0.14.0](https://github.com/opsmill/infrahub-sdk-python/tree/v0.14.0) - 2024-10-04
15+
16+
### Removed
17+
18+
- Removed depreceted methods InfrahubClient.init and InfrahubClientSync.init ([#33](https://github.com/opsmill/infrahub-sdk-python/issues/33))
19+
20+
### Changed
21+
22+
- Query filters are not validated locally anymore, the validation will be done on the server side instead. ([#9](https://github.com/opsmill/infrahub-sdk-python/issues/9))
23+
- Method client.get() can now return `None` instead of raising an exception when `raise_when_missing` is set to False
24+
25+
```python
26+
response = await clients.get(
27+
kind="CoreRepository", name__value="infrahub-demo", raise_when_missing=False
28+
)
29+
``` ([#11](https://github.com/opsmill/infrahub-sdk-python/issues/11))
30+
31+
### Fixed
32+
33+
- prefix and address attribute filters are now available in the Python SDK ([#10](https://github.com/opsmill/infrahub-sdk-python/issues/10))
34+
- Queries using isnull as a filter are now supported by the Python SDK ([#30](https://github.com/opsmill/infrahub-sdk-python/issues/30))
35+
- `execute_graphql` method for InfrahubClient(Sync) now properly considers the `default_branch` setting ([#46](https://github.com/opsmill/infrahub-sdk-python/issues/46))
36+
1437
## [0.13.1.dev0](https://github.com/opsmill/infrahub-sdk-python/tree/v0.13.1.dev0) - 2024-09-24
1538
1639
### Added

changelog/46.fixed.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

infrahub_sdk/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from infrahub_sdk.exceptions import (
1111
AuthenticationError,
1212
Error,
13-
FilterNotFoundError,
1413
GraphQLError,
1514
NodeNotFoundError,
1615
ServerNotReachableError,
@@ -50,7 +49,6 @@
5049
"InfrahubNodeSync",
5150
"InfrahubRepositoryConfig",
5251
"InfrahubSchema",
53-
"FilterNotFoundError",
5452
"generate_uuid",
5553
"GenericSchema",
5654
"GraphQLQueryAnalyzer",

infrahub_sdk/batch.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class BatchTask:
1010
task: Callable[[Any], Awaitable[Any]]
1111
args: tuple[Any, ...]
1212
kwargs: dict[str, Any]
13-
node: Optional[InfrahubNode] = None
13+
node: Optional[Any] = None
1414

1515

1616
async def execute_batch_task_in_pool(
@@ -43,9 +43,7 @@ def __init__(
4343
def num_tasks(self) -> int:
4444
return len(self._tasks)
4545

46-
def add(
47-
self, *args: Any, task: Callable[[Any], Awaitable[Any]], node: Optional[InfrahubNode] = None, **kwargs: Any
48-
) -> None:
46+
def add(self, *args: Any, task: Callable, node: Optional[Any] = None, **kwargs: Any) -> None:
4947
self._tasks.append(BatchTask(task=task, node=node, args=args, kwargs=kwargs))
5048

5149
async def execute(self) -> AsyncGenerator:

0 commit comments

Comments
 (0)