Skip to content

Commit

Permalink
Restrict qiskit.util to actual deprecated functions (#5509)
Browse files Browse the repository at this point in the history
In #5420 the qiskit.util module was migrated to qiskit/utils to be
consistent with imported code from qiskit-aqua in #5422. However, the
backwards compat shim added in that PR has a couple of issues, mainly
around re-exporting the entirety of qiskit.utils which occasionally
causes import cycles and is larger than what functions used to exist in
qiskit.util and should be deprecated. This commit fixes this by changing
the deprecation shim in qiskit.util to only re-export the functions that
previously existed in qiskit.util for backwards compatibility during the
deprecation period.
  • Loading branch information
mtreinish authored Dec 11, 2020
1 parent 5a1768f commit 7c58bd4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion qiskit/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@
"""Common utilities for Qiskit."""

# Deprecated: for backwards compatibility to be removed in a future release
from qiskit.utils import *
from qiskit.utils.deprecation import deprecate_arguments
from qiskit.utils.deprecation import deprecate_function
from qiskit.utils.multiprocessing import is_main_process
from qiskit.utils.multiprocessing import local_hardware_info
from qiskit.utils.units import apply_prefix


__all__ = ['deprecate_arguments', 'deprecate_function', 'is_main_process',
'local_hardware_info', 'apply_prefix']

0 comments on commit 7c58bd4

Please sign in to comment.