Skip to content
Snippets Groups Projects

API Backward Compatibility and Deprecations

Merged Frederik Hennig requested to merge fhennig/api-compatibility into backend-rework
9 files
+ 243
14
Compare changes
  • Side-by-side
  • Inline
Files
9
from __future__ import annotations
from __future__ import annotations
from typing import Iterable, Iterator
from typing import Iterable, Iterator, Any
from itertools import chain, count
from itertools import chain, count
from types import EllipsisType
from types import EllipsisType
from collections import namedtuple, defaultdict
from collections import namedtuple, defaultdict
@@ -79,6 +79,8 @@ class KernelCreationContext:
@@ -79,6 +79,8 @@ class KernelCreationContext:
self._constraints: list[KernelParamsConstraint] = []
self._constraints: list[KernelParamsConstraint] = []
self._req_headers: set[str] = set()
self._req_headers: set[str] = set()
 
self._metadata: dict[str, Any] = dict()
 
@property
@property
def default_dtype(self) -> PsNumericType:
def default_dtype(self) -> PsNumericType:
return self._default_dtype
return self._default_dtype
@@ -95,6 +97,10 @@ class KernelCreationContext:
@@ -95,6 +97,10 @@ class KernelCreationContext:
@property
@property
def constraints(self) -> tuple[KernelParamsConstraint, ...]:
def constraints(self) -> tuple[KernelParamsConstraint, ...]:
return tuple(self._constraints)
return tuple(self._constraints)
 
 
@property
 
def metadata(self) -> dict[str, Any]:
 
return self._metadata
# Symbols
# Symbols
Loading