From 44473cfad56ee144caa17bd0fe92dba1639a6cab Mon Sep 17 00:00:00 2001 From: Kevin Tian Date: Mon, 11 Nov 2024 17:15:57 -0500 Subject: [PATCH] Update job status deprecation msg (#2036) * Update job status deprecation msg * Update qiskit_ibm_runtime/runtime_job.py Co-authored-by: Ian Hincks --------- Co-authored-by: Ian Hincks --- qiskit_ibm_runtime/runtime_job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qiskit_ibm_runtime/runtime_job.py b/qiskit_ibm_runtime/runtime_job.py index 24652edf3..186d9703f 100644 --- a/qiskit_ibm_runtime/runtime_job.py +++ b/qiskit_ibm_runtime/runtime_job.py @@ -195,7 +195,9 @@ def status(self) -> JobStatus: ( "In a future release of qiskit-ibm-runtime no sooner than 3 months " "after the release date of 0.30.0, RuntimeJob.status() will be returned as a string " - "instead of an instance of `JobStatus`." + "instead of an instance of `JobStatus`. " + "To prepare for this change, you can use the idiom " + "`status.name if isinstance(status, JobStatus) else status`." ), DeprecationWarning, stacklevel=2,