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

Move Provider import only under TYPE_CHECKING conditions #1489

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

1ucian0
Copy link
Contributor

@1ucian0 1ucian0 commented Nov 15, 2024

Summary

Qiskit 1.1 deprecated the Provider abstract class to be removed in 2.0 (planned for 1Q2025). In those cases where the class is used for only typechecking purposes, the import should only happen when TYPE_CHECKING. For the rest of the cases, I opened #1488

Copy link
Collaborator

@wshanks wshanks left a comment

Choose a reason for hiding this comment

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

Thanks for submitting this and opening #1488. I am confused why our tests don't fail for the Provider deprecation warning because it looks like we do instantiate a Provider instance -- something to look into more later.

@wshanks wshanks added the backport stable potential The issue or PR might be minimal and/or import enough to backport to stable label Nov 15, 2024
@wshanks wshanks added this pull request to the merge queue Nov 15, 2024
Merged via the queue into qiskit-community:main with commit 519bb53 Nov 15, 2024
11 checks passed
mergify bot pushed a commit that referenced this pull request Nov 15, 2024
### Summary

Qiskit 1.1 deprecated the Provider abstract class to be removed in 2.0
(planned for 1Q2025). In those cases where the class is used for only
typechecking purposes, the import should only happen when
`TYPE_CHECKING`. For the rest of the cases, I opened
#1488

(cherry picked from commit 519bb53)
wshanks pushed a commit that referenced this pull request Nov 15, 2024
…1489) (#1490)

### Summary

Qiskit 1.1 deprecated the Provider abstract class to be removed in 2.0
(planned for 1Q2025). In those cases where the class is used for only
typechecking purposes, the import should only happen when
`TYPE_CHECKING`. For the rest of the cases, I opened
#1488
<hr>This is an automatic backport of pull request #1489 done by
[Mergify](https://mergify.com).

Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport stable potential The issue or PR might be minimal and/or import enough to backport to stable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants