Skip to content

Commit

Permalink
Deprecate RuntimeJob
Browse files Browse the repository at this point in the history
  • Loading branch information
kt474 committed Mar 3, 2025
1 parent fb67f84 commit 71270df
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion qiskit_ibm_runtime/runtime_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
)
from .utils.result_decoder import ResultDecoder
from .utils.queueinfo import QueueInfo
from .utils.deprecation import issue_deprecation_msg
from .api.clients import RuntimeClient
from .api.exceptions import RequestsApiError
from .api.client_parameters import ClientParameters
Expand Down Expand Up @@ -95,7 +96,7 @@ def __init__(
tags: Optional[List] = None,
version: Optional[int] = None,
) -> None:
"""RuntimeJob constructor.
"""(DEPRECATED) RuntimeJob constructor.
Args:
backend: The backend instance used to run this job.
Expand All @@ -112,6 +113,15 @@ def __init__(
tags: Tags assigned to the job.
version: Primitive version.
"""

issue_deprecation_msg(
msg="The RuntimeJob class is deprecated",
version="0.37.0",
stacklevel=4,
remedy="All primitives now return the RuntimeJobV2 class. The major difference between "
"the two classes is that `Job.status()` is returned as a string in RuntimeJobV2.",
)

Job.__init__(self, backend=backend, job_id=job_id)
BaseRuntimeJob.__init__(
self,
Expand Down

0 comments on commit 71270df

Please sign in to comment.