Skip to content

Commit

Permalink
Update slow optional import list to include additional packages
Browse files Browse the repository at this point in the history
In Qiskit#5582 we added a script that is used to ensure we don't import
slow optional dependencies in the default 'import qiskit' path. Since
that PR merged we've managed to remove a few more packages from the
default import path (see Qiskit#5619, Qiskit#5485, and Qiskit#5620) which we should add
the same checks to to ensure we don't regress and accidently start
importing them again in the default path. This commit adds all these
packages to the list of imports not allowed as part of 'import qiskit'.
  • Loading branch information
mtreinish committed Feb 5, 2021
1 parent 9d1d6a1 commit e5d72f8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tools/find_optional_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@
import subprocess
import sys

os.environ['QISKIT_SUPPRESS_PACKAGING_WARNINGS'] = 'Y'

import qiskit


def main():
optional_imports = ['networkx', 'sympy', 'pydot', 'ipywidgets',
'scipy.stats']
'scipy.stats', 'matplotlib', 'qiskit.providers.aer',
'qiskit.providers.ibmq', 'qiskit.ignis',
'qiskit.aqua']

modules_imported = []
for mod in optional_imports:
Expand Down

0 comments on commit e5d72f8

Please sign in to comment.