Skip to content

Commit

Permalink
deprecate get_runtime_api_base_url
Browse files Browse the repository at this point in the history
  • Loading branch information
cpkurotori committed Sep 10, 2024
1 parent 63c6d48 commit 3a948f6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions qiskit_ibm_runtime/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .utils import (
to_python_identifier,
is_crn,
get_runtime_api_base_url,
default_runtime_url_resolver,
resolve_crn,
are_circuits_dynamic,
Expand Down
14 changes: 14 additions & 0 deletions qiskit_ibm_runtime/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from qiskit.circuit import QuantumCircuit, ControlFlowOp
from qiskit.transpiler import Target
from qiskit.providers.backend import BackendV1, BackendV2
from .deprecation import deprecate_function


def is_simulator(backend: BackendV1 | BackendV2) -> bool:
Expand Down Expand Up @@ -157,6 +158,19 @@ def is_crn(locator: str) -> bool:
return isinstance(locator, str) and locator.startswith("crn:")


@deprecate_function(
"get_runtime_api_base_url()",
"0.30.0",
"Please use default_runtime_url_resolver() instead.",
stacklevel=1,
)
def get_runtime_api_base_url(
url: str, instance: str, private_endpoint: Optional[bool] = False
) -> str:
"""Computes the Runtime API base URL based on the provided input parameters."""
return default_runtime_url_resolver(url, instance, private_endpoint=private_endpoint)


def default_runtime_url_resolver(url: str, instance: str, private_endpoint: bool = False) -> str:
"""Computes the Runtime API base URL based on the provided input parameters.
Expand Down
1 change: 1 addition & 0 deletions release-notes/unreleased/1914.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate util function `get_runtime_api_base_url`: use `default_runtime_url_resolver` instead.

0 comments on commit 3a948f6

Please sign in to comment.