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

Remove requires_qe_access, deprecated in 0.17 #10823

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion qiskit/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
"""Functionality and helpers for testing Qiskit."""

from .base import QiskitTestCase
from .decorators import requires_aer_provider, online_test, slow_test, requires_qe_access
from .decorators import requires_aer_provider, online_test, slow_test
from .reference_circuits import ReferenceCircuits
from .utils import Path
19 changes: 0 additions & 19 deletions qiskit/test/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import unittest

from qiskit.utils import wrap_method
from qiskit.utils.deprecation import deprecate_func
from .testing_options import get_test_options

HAS_NET_CONNECTION = None
Expand Down Expand Up @@ -141,24 +140,6 @@ def _get_credentials():
)


@deprecate_func(additional_msg="Instead, use ``online_test``", since="0.17.0")
def requires_qe_access(func):
"""Deprecated in favor of `online_test`"""

@functools.wraps(func)
def _wrapper(self, *args, **kwargs):
if TEST_OPTIONS["skip_online"]:
raise unittest.SkipTest("Skipping online tests")

credentials = _get_credentials()
self.using_ibmq_credentials = credentials.is_ibmq()
kwargs.update({"qe_token": credentials.token, "qe_url": credentials.url})

return func(self, *args, **kwargs)

return _wrapper


def online_test(func):
"""Decorator that signals that the test uses the network (and the online API):

Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/deprecate_func-25c04f94964cffb2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
upgrade:
- |
The decorator `requires_qe_access` was deprecated in qiskit-terra 0.17 (released on April 2021)
and now is it being removed. The decorator :func:`.online_test` is a one-to-one replacement of it.
Copy link
Member

Choose a reason for hiding this comment

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

tbh, the whole of qiskit.test should probably be private to Terra and not part of the public API. It's weird that other projects use our test internals that are really meant only for Terra.

online_test is only used for one test that shouldn't be part of Terra anyway.

(also: two backticks around requires_qe_access)

Copy link
Member

Choose a reason for hiding this comment

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

I agree we should have done this a long time ago: #6862

Copy link
Member

Choose a reason for hiding this comment

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

well good to see I'm self-consistent even if I didn't remember that - I'd already thumbs-ed up the issue haha

Copy link
Member Author

@1ucian0 1ucian0 Sep 12, 2023

Choose a reason for hiding this comment

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

true... no need for reno. force of habit. removed in a2ba0ce