Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address BackendV1 deprecation warning oversights #13868

Merged
merged 20 commits into from
Feb 20, 2025

Conversation

ElePT
Copy link
Contributor

@ElePT ElePT commented Feb 18, 2025

Summary

This PR takes care of some oversights in the BackendV1 deprecation.

Details and comments

@ElePT ElePT added this to the 1.4.0 milestone Feb 18, 2025
@ElePT ElePT marked this pull request as ready for review February 20, 2025 11:53
@ElePT ElePT requested review from a team, nonhermitian and jyu00 as code owners February 20, 2025 11:53
@qiskit-bot
Copy link
Collaborator

One or more of the following people are relevant to this code:

  • @enavarro51
  • @Qiskit/terra-core
  • @ajavadia
  • @levbishop
  • @t-imamichi

@ElePT ElePT added the Changelog: Deprecation Include in "Deprecated" section of changelog label Feb 20, 2025
job_id,
success,
results,
*args,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be confusing for people because the signature went from saying backend_name, backend_version, qobj_id, job_id, success, and results were all required arguments to no longer specifying that anywhere. The condition hasn't changed, but nothing is indicating that anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's worse, but it's the only path I found to be able to inspect the args for what I needed. I can add a better description of what is requried in the docstring...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's also important to note that 2.0 will get back the named arguments, this is really just necessary to be able to raise the deprecation warning.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I would add it to the docstring, I think that's all we can do in this situation

Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small question about the docs updates. But I think otherwise it looks good after the merge conflict is resolved.

qobj_id (str): user-generated Qobj id.
job_id (str): unique execution id from the backend.
success (bool): True if complete input qobj executed correctly. (Implies
backend_name (str): (REQUIRED) backend name.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we want this under Args instead of attributes? They're both really because the constructor just does self.backend_name = backend_name. But right now this is under attributes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, args would help covey the message that... well, these are the args. Will do.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done b9d9fee

@ElePT ElePT mentioned this pull request Feb 20, 2025
Copy link
Member

@mtreinish mtreinish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the updates

@mtreinish mtreinish enabled auto-merge February 20, 2025 20:36
@mtreinish mtreinish added this pull request to the merge queue Feb 20, 2025
Merged via the queue into Qiskit:stable/1.4 with commit 7341628 Feb 20, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: Deprecation Include in "Deprecated" section of changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants